On 12/17/19 11:39 AM, Celejar wrote:
Now I just have have to figure out the best place to configure this. I'm using dhcp via /etc/network/interfaces, but the 'dhcp' method doesn't seem to support manual MTU setting. I could use a 'supersede interface-mtu' line in dhclient.conf, but AFAICT, options there apply to all dhcp connections, and I can't make out a simple way to set them on a per connection basis. I suppose I could always just put 'ip link set wlan0 mtu 1440' in a script and hook it in to the appropriate 'iface' stanza in e/n/i with a 'post-up' line.
Personally, I'd just use the post-up line.Ideally whichever device is the DHCP server would set the appropriate MTU via its DHCP response, but if that's the phone, I have no idea how you'd fix that easily. (That's why there is a supersede setting for it, it can be part of the DHCP response — that's how different MTUs from different DHCP connections should work.)
Another option might be to use Network Manager, I think its connections can set a custom MTU, but I'm not 100% sure as I've never tried it.
BTW: dhclient.conf options can be per-interface (via an interface section), so your wifi and wired adapters could be different.