How to specify the MTU of ocserv adapters

Nikos Mavrogiannopoulos n.mavrogiannopoulos at gmail.com
Wed May 11 00:23:18 PDT 2016


On Tue, May 10, 2016 at 7:53 PM, Yick Xie <yick.xie at gmail.com> wrote:
> Hello,
> As the title indicated, ocserv just dynamically and frequently adjust
> the MTU value of virtual adapters according to peer-endings, which
> sometimes even was set to 576. But actually the network is still
> stable, only with certain kind of packet loss, yet totally acceptable.

That's a nice observation. I've reviewed the code, and as it is now,
the MTU is being lowered when the kernel thinks that the MTU is too
big (typically when some router sends an ICMP notification for that).
However there is only logic to account lowering the MTU, but not
raising it when the user's connection is no longer bounded. That is
most likely you see clients (probably on mobile networks) drop to 576
and never increase their MTU.

> worse even unusable. Is there some way to explicitly fix it like
> OpenVPN? or some other way to work around it? Since I am sure ISP will
> never ever change the MTU less than certain value as 1450 or 1400. I
> have been stuck into this for long time, and still no clue of its
> mechanism.

I'm not sure what is the best approach to tackle that. Something that
would partially address it is to reset the MTU on rehandshake or when
the UDP stream changes (often due to roaming).

regards,
Nikos



More information about the openconnect-devel mailing list