Dave Huang <khym%azeotrope.org@localhost> writes: > It seems that the ICMP fragmentation needed packet contains the > interface MTU rather than the route MTU if the route MTU is lower > than the iface's: see sys/netinet/ip_input.c, ip_forward(), case > EMSGSIZE--around line 1337: destmtu = rt->rt_ifp->if_mtu; > > Is that what it should be doing? It seems wrong and isn't what I > expected... if I artificially lower the MTU of a route, e.g., > route add www.netbsd.org $my_gateway_ip -mtu 1200 > > Then ping -Ds 1300 www.netbsd.org from another machine that routes > through the above router, I get: > PING www.netbsd.org (149.20.53.86): 1300 data bytes > 36 bytes from foxy.azeotrope.org (10.1.1.67): frag needed and DF set. > Next MTU=1500 for icmp_seq=0 > > Shouldn't Next MTU=1200, rather than 1500? That's a good question. I would suggest reading the standards, and checking what other systems do. My quick reaction is that MTU on a route is a local matter used to choose MTU on outgoing packets that are originated, and I don't see why it would affect forwarding. But I can also see that a philosophy that it's better to send ICMP fragmentation required as soon as possible. Regardless, it seems clear that a packet rejected because of a route MTU should provoke an ICMP fragmentation required with a value no great than the route MTU. But the first question is about route MTUs in the first place.
Attachment:
pgpXmSWovdbdZ.pgp
Description: PGP signature