I'd like to change the MTU per host as I have a mixed infrastructure where not all devices support the same MTU. I'm on OS X 10.7 and like to set some MTU per destination host and a default one.
-
Not sure with MacOS specifically, but it should support MTU Path Discovery as it is partly based on FreeBSD. I would look for MacOS related info for MTU Path Discovery.– jeffatrackaidDec 9, 2011 at 16:40
-
1Dunno about OSX, but in normal *nixes, MTU tends to be set per interface, not per host. Maybe you could create a bunch of virtual interfaces with individual MTU's, and give them IP's on different networks, so routing would take care of picking the right interface, and the different MTU in the process? Just an idea... don't shoot me.– MarcinDec 9, 2011 at 17:25
Add a comment
|
1 Answer
As the others pointed out in the comments, MTU is set per-interface, and the only "per-host" capability available is Path MTU Discovery (PMTU).
OS X has the sysctl knob for Path MTU Discovery -- It appears to be on by default in Lion:
% sysctl net.inet.tcp.path_mtu_discovery
net.inet.tcp.path_mtu_discovery: 1
so things should be pretty much self-tuning.
-
On Debian based Linux
sysctl net.ipv4.ip_no_pmtu_disc
would be the equivalent? By default is 0. If PMTUD is requires an ICMP reply to get the maximum MTU possible.– Pablo AMar 2, 2018 at 16:45