Re: routing behaviour change between 2.2 and 2.0? Why?

Oleg Drokin (green@ccssu.ccssu.crimea.ua)
Sun, 11 Apr 1999 00:33:33 +0400 (MSD)


Hello!

> > With good old 2.0 kernels if I have 2 routes to one address,
> > last added one is in effect, but under 2.2 kernels
> > the first one is in effect.
> > May I ask why the change?
> There was no change. Please, explain.
> > Isn't the using last added one should be considered correct behavior?
> Yes. And to all that I know, 2.2 behaves exactly in this way.
At the start we have this route:
ccssu:~# route -n | grep 202
195.5.61.202 62.244.13.19 255.255.255.255 UGH 0 0 0 eth0
ccssu:~# traceroute -n 195.5.61.202
traceroute to 195.5.61.202 (195.5.61.202), 30 hops max, 40 byte packets
1 62.244.13.19 1.105 ms 0.886 ms 1.028 ms
And all work as expected, packets go to 62.244.13.19.
then dialin PPP connection appears, with remote addres being 195.5.61.202
new route added and rouuting table is now:
ccssu:~# route -n | grep 202
195.5.61.202 62.244.13.19 255.255.255.255 UGH 0 0 0 eth0
195.5.61.202 0.0.0.0 255.255.255.255 UH 0 0 0 ppp1

But hey! Look at this traceroute:
ccssu:~# traceroute -n 195.5.61.202
traceroute to 195.5.61.202 (195.5.61.202), 30 hops max, 40 byte packets
1 62.244.13.19 1.064 ms 0.862 ms 1.01 ms
It still sending packets to 62.244.13.19!

Now we deleting offending route:
ccssu:~# route del -host 195.5.61.202 gw 62.244.13.19
and all is fine:
ccssu:~# !tr
traceroute -n 195.5.61.202
traceroute to 195.5.61.202 (195.5.61.202), 30 hops max, 40 byte packets
1 195.5.61.202 1106.32 ms 889.851 ms 909.895 ms
that is ppp device (if it helps)
ccssu:~# ifconfig ppp1
ppp1 Link encap:Point-to-Point Protocol
inet addr:195.5.61.20 P-t-P:195.5.61.202 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1
RX packets:61 errors:0 dropped:0 overruns:0 frame:0
TX packets:61 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:10

I am pretty sure that sometimes I can add second route and it still will
redirect packet a of previous one
(like route add -host 195.5.61.202 gw 195.5.61.19 ; route add -host 195.5.61.202 gw 195.5.61.129
will send packets to 195.5.61.19)
Before today I was sure it is always the case but after todays reboot
I can reproduce 100% only the PPP case.
Is PPP so special?

Bye,
Oleg

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/