IPV4 route cache removed from >= 3.6 linux kernel

2

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 ?

Thanks.

Yusuf Khan

Posted 2012-11-09T08:16:01.697

Reputation:

Answers

5

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.

BatchyX

Posted 2012-11-09T08:16:01.697

Reputation: 1 836

0

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 192.168.3.48
192.168.3.48 dev eth0  src 192.168.1.22
    cache

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 192.168.3.48 -c 10
PING 192.168.3.48 (192.168.3.48) 1460(1488) bytes of data.
From 192.168.2.0 icmp_seq=1 Frag needed and DF set (mtu = 1220)
1468 bytes from 192.168.2.0: icmp_seq=2 ttl=252 time=1973 ms
[...]
--- 192.168.3.48 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 192.168.3.48
192.168.3.48 dev eth0  src 192.168.1.22
    cache  expires 588sec mtu 1220

johnf

Posted 2012-11-09T08:16:01.697

Reputation: 121