How to view cached PMTU under Linux (and all other OSs)

mtunetworking

When I ping a remote site with the DF bit set and a packet size that is too big for my router the first ICMP "fragmentation required" message is sent from the router. After that the message comes from my localhost.

Netstat -rC (on Linux) allows me to view the routing table cache, but

1) Seems to show MTUs under a column called MSS (which I would expect to be the lower TCP MSS of the link)

2) Always shows the value as 1500

My localhost must be caching the PMTU somewhere so it can generate the fragmentation required message. But how do I see that?

Here is an example on my machine (-n on netstat inhibits reverse DNS lookups):

[root@vbcentos ~]# ping -c 4 -M do -s 1431 212.58.244.69
PING 212.58.244.69 (212.58.244.69) 1431(1459) bytes of data.
From 217.155.134.6 icmp_seq=1 Frag needed and DF set (mtu = 1458)
From 217.155.134.4 icmp_seq=2 Frag needed and DF set (mtu = 1458)
From 217.155.134.4 icmp_seq=2 Frag needed and DF set (mtu = 1458)
From 217.155.134.4 icmp_seq=2 Frag needed and DF set (mtu = 1458)

--- 212.58.244.69 ping statistics ---
1 packets transmitted, 0 received, +4 errors, 100% packet loss, time 1002ms

[root@vbcentos ~]# netstat -rCn
Kernel IP routing cache
Source          Destination     Gateway         Flags   MSS Window  irtt Iface
217.155.134.3   217.155.134.4   217.155.134.4   il        0 0          0 lo
217.155.134.4   212.58.244.69   217.155.134.6          1500 0          0 eth0
217.155.134.4   217.155.134.4   217.155.134.4   l     16436 0          0 lo
217.155.134.3   217.155.134.255 217.155.134.255 ibl       0 0          0 lo
217.155.134.4   212.58.244.69   217.155.134.6          1500 0          0 eth0
217.155.134.6   217.155.134.4   217.155.134.4   il        0 0          0 lo
212.58.244.69   217.155.134.4   217.155.134.4   l         0 0          0 lo
[root@vbcentos ~]#

EDIT:
As per suggestion:

ip route get to 212.58.244.69

gives

212.58.244.69 via 217.155.134.6 dev eth1  src 217.155.134.4
    cache  mtu 1500 advmss 1460 hoplimit 64

Which also seems wrong as the MSS is just 40 less than the mtu, which is the interface
mtu rather than the PMTU

Best Answer

Maybe

ip route get to 212.58.244.69