While going through 3.6 linux kernel change log, i came a across a mail (http://article.gmane.org/gmane.linux.network/238256) from David S Miller regarding removal of routing cache for IPV4 in kernel. i am wondering how would now the ICMP redirect, PMTU features would work ? Mail also mentions that routes would be pre-cached but multiple routes depending on the subnet mask can have multiple possible entries , how would that work ? any one have any idea on this ?


2 Answers 2


Just read the actual patches.

Instead of storing PMTU and ICMP redirects in the routing cache, they are stored in a "routing exception" structure which is a part of the routing entry. And for any (source, input interface, tos, destination, mark), there is only one route entry being selected. so the routing exceptions will always be used as long as the route entry is not changed.


You can get detailed information on the path MTU for a host as follows. Note that the cache information must be populated first. This testing was performed with a 3.13 Ubuntu kernel. I first validate the current cache for a host, I haven't communicated with it and have no information:

johnf@mtutest:~$ ip ro get dev eth0  src

I then try to ping it with a packet larger than the MTU (but not so large that the packet must be fragmented by the OS). You may miss the first few pings when you test, you should see the Frag needed message.

johnf@mtutest:~$ ping -s 1460 -c 10
PING ( 1460(1488) bytes of data.
From icmp_seq=1 Frag needed and DF set (mtu = 1220)
1468 bytes from icmp_seq=2 ttl=252 time=1973 ms
--- ping statistics ---
10 packets transmitted, 9 received, +1 errors, 10% packet loss, time 9016ms
rtt min/avg/max/mdev = 95.681/516.815/1973.697/568.969 ms, pipe 2

After you receive the ICMP MTU Exceeded message the kernel should adjust your route cache to reflect the path limitations:

johnf@mtutest:~$ ip ro get dev eth0  src
    cache  expires 588sec mtu 1220

You must log in to answer this question.