Hello,
We have changed nothing in our network infrastructure but only upgraded
from Linux kernel 2.6.36.2 to 3.0.3. Here is the problem we are
experiencing:
ICMP redirected routes are cached forever, and they can be cleared only
by a reboot.
Here is an example:
root@machine5:~# ip route get 1.1.1.1
1.1.1.1 via 9.0.0.1 dev eth0 src 5.5.5.5
cache ipid 0xfb5d rtt 1475ms rttvar 450ms cwnd 10
root@machine5:~# ip route list cache match 1.1.1.1
1.1.1.1 tos lowdelay via 9.0.0.1 dev eth0 src 5.5.5.5
cache ipid 0xfb5d rtt 1475ms rttvar 450ms cwnd 10
1.1.1.1 via 9.0.0.1 dev eth0 src 5.5.5.5
cache ipid 0xfb5d rtt 1475ms rttvar 450ms cwnd 10
...(two more entries, all go via 9.0.0.1)...
1.1.1.1 is the test destination address
5.5.5.5 is the source IP address of "machine5" via dev eth0, the only
interface besides "lo"
9.0.0.1 is the incorrect gateway which we were redirected to; we want to
change the route to 9.0.0.8
I found no way to clear this route. What I tried:
root@machine5:~# ip route flush cache ### CACHE FLUSH ###
root@machine5:~# ip route list cache match 1.1.1.1 # empty
root@machine5:~# ip route flush cache ### CACHE FLUSH ###
root@machine5:~# echo 1 > /proc/sys/net/ipv4/route/flush
root@machine5:~# ip route list cache match 1.1.1.1 # empty
root@machine5:~# ip route get 1.1.1.1 # magically re-inserts the
route, tcpdump sees NO ICMP traffic
1.1.1.1 via 9.0.0.1 dev eth0 src 5.5.5.5
cache ipid 0xfb5d rtt 1475ms rttvar 450ms cwnd 10
I also tried to force a scheduled route flush:
root@machine5:~# echo 1 > /proc/sys/net/ipv4/route/gc_timeout
root@machine5:~# echo 1 > /proc/sys/net/ipv4/route/gc_interval
A reboot fixed it all.
0 comentários:
Postar um comentário