1

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.

bot47
  • 317
  • 1
  • 4
  • 17
  • 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. – jeffatrackaid Dec 09 '11 at 16:40
  • 1
    Dunno 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. – Marcin Dec 09 '11 at 17:25

1 Answers1

2

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.

Good Person
  • 359
  • 6
  • 18
voretaq7
  • 79,345
  • 17
  • 128
  • 213
  • 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 A Mar 02 '18 at 16:45