Re: 2.1.71 cant delete ipv4 routes

Andreas Jaeger (aj@arthur.rhein-neckar.de)
Mon, 8 Dec 1997 22:44:08 +0100 (CET)


Hi Andi,

>>>>> Andi Kleen writes:

Andi> Andreas Jaeger <aj@arthur.rhein-neckar.de> writes:
>> I've just tried 2.1.71 and noticed that even if I ifconfig down an
>> interface the route is not deleted (just the Up flag is removed). And

Andi> Just wait about 30s. Linux does delayed deletion of routes now to prevent
Andi> too much stress of the routing table on big routers that run dynamic routing
Andi> protocols.

I don't see this behaviour. Ten minutes ago I did an "ifconfig dummy0 down".
Have a look yourself:
root:/home/aj # cat /proc/net/dev
Inter-| Receive | Transmit
face |bytes packets errs drop fifo frame|bytes packets errs drop fifo colls carrier
lo: 538840 2862 0 0 0 0 538840 2862 0 0 0 0 0 0
dummy0: 0 0 0 0 0 0 0 0 0 0 0 0 0 0
isdn0: 0 0 0 0 0 0 0 0 0 0 0 0 0 0
isdn1: 0 63 0 0 0 0 0 63 0 0 0 0 0 0
isdn3: 0 0 0 0 0 0 0 0 0 0 0 0 0 0
isdn4: 0 0 0 0 0 0 0 0 0 0 0 0 0 0
isdn5: 0 0 0 0 0 0 0 0 0 0 0 0 0 0
root:/home/aj # cat /proc/net/route
Iface Destination Gateway Flags RefCnt Use Metric Mask MTU Window IRTT
isdn3 051BA8C0 00000000 0005 0 0 0 FFFFFFFF0 0 0
isdn5 5BB0F683 00000000 0005 0 0 0 FFFFFFFF0 0 0
isdn0 15B0F683 00000000 0005 0 0 0 FFFFFFFF0 0 0
isdn4 0114007E 00000000 0005 0 0 0 FFFFFFFF0 0 0
isdn4 0014007E 0114007E 0003 0 0 0 80FFFFFF0 0 0
isdn1 00B0F683 00000000 0001 0 0 0 00FFFFFF0 0 0
dummy0 001BA8C0 00000000 0001 0 0 0 00FFFFFF0 0 0
lo 0000007F 00000000 0001 0 0 0 000000FF0 0 0
isdn1 00000000 FEB0F683 0003 0 0 0 000000000 0 0
root:/home/aj # netstat -i
Kernel Interface table
Iface MTU Met RX-OK RX-ERR RX-DRP RX-OVR TX-OK TX-ERR TX-DRP TX-OVR Flags
lo 3584 0 2862 0 0 0 2862 0 0 0 LRU
lo:0 3584 0 0 0 0 0 0 0 0 0 LRU
isdn0 1500 0 0 0 0 0 0 0 0 0 ORU
isdn1 1500 0 63 0 0 0 63 0 0 0 ORU
isdn3 1500 0 0 0 0 0 0 0 0 0 ORU
isdn4 1500 0 0 0 0 0 0 0 0 0 ORU
isdn5 1500 0 0 0 0 0 0 0 0 0 ORU
root:/home/aj # netstat -rn
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
192.168.27.5 0.0.0.0 255.255.255.255 UH 0 0 0 isdn3
131.246.176.91 0.0.0.0 255.255.255.255 UH 0 0 0 isdn5
131.246.176.21 0.0.0.0 255.255.255.255 UH 0 0 0 isdn0
126.0.20.1 0.0.0.0 255.255.255.255 UH 0 0 0 isdn4
126.0.20.0 126.0.20.1 255.255.255.128 UG 0 0 0 isdn4
131.246.176.0 0.0.0.0 255.255.255.0 U 0 0 0 isdn1
192.168.27.0 0.0.0.0 255.255.255.0 U 0 0 0 dummy0
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
0.0.0.0 131.246.176.254 0.0.0.0 UG 0 0 0 isdn1
root:/home/aj # ifconfig dummy0
dummy0 Link encap:Ethernet HWaddr 00:00:00:00:00:00
inet addr:192.168.27.1 Bcast:0.0.0.0 Mask:255.255.255.0
NOARP MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 coll:0

root:/home/aj # route del 192.168.27.0 dummy0
SIOCDELRT: No such process

It gets even worse:
root:/home/aj # lsmod
Module Size Used by
hisax 77392 2
isdn 55508 8 [hisax]
dummy0 740 0
If I rmmod dummy0 now, I get a kernel oops when I call "cat /proc/net/route".
Btw. why am I allowed to rmmod dummy0 at all? The usage count is 0 -
but it's still has a kernel route. I haven't done the cat this time
since I know the result and did instead (after the oops happened I've
rebooted already) the following:
root:/home/aj # rmmod dummy0
root:/home/aj # modprobe dummy0
root:/home/aj # lsmod
Module Size Used by
dummy0 740 0 (unused)
hisax 77392 2
isdn 55508 8 [hisax]
root:/home/aj # ifconfig dummy0
dummy0 Link encap:Ethernet HWaddr 00:00:00:00:00:00
unspec addr:[NONE SET] Bcast:[NONE SET] Mask:[NONE SET]
NOARP MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 coll:0
root:/home/aj # netstat -rn
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
192.168.27.5 0.0.0.0 255.255.255.255 UH 0 0 0 isdn3
131.246.176.91 0.0.0.0 255.255.255.255 UH 0 0 0 isdn5
131.246.176.21 0.0.0.0 255.255.255.255 UH 0 0 0 isdn0
126.0.20.1 0.0.0.0 255.255.255.255 UH 0 0 0 isdn4
126.0.20.0 126.0.20.1 255.255.255.128 UG 0 0 0 isdn4
131.246.176.0 0.0.0.0 255.255.255.0 U 0 0 0 isdn1
192.168.27.0 0.0.0.0 255.255.255.0 0 0 0 dummy0
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
0.0.0.0 131.246.176.254 0.0.0.0 UG 0 0 0 isdn1
root:/home/aj # sleep 30;netstat -rn
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
192.168.27.5 0.0.0.0 255.255.255.255 UH 0 0 0 isdn3
131.246.176.91 0.0.0.0 255.255.255.255 UH 0 0 0 isdn5
131.246.176.21 0.0.0.0 255.255.255.255 UH 0 0 0 isdn0
126.0.20.1 0.0.0.0 255.255.255.255 UH 0 0 0 isdn4
126.0.20.0 126.0.20.1 255.255.255.128 UG 0 0 0 isdn4
131.246.176.0 0.0.0.0 255.255.255.0 U 0 0 0 isdn1
192.168.27.0 0.0.0.0 255.255.255.0 0 0 0 dummy0
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
0.0.0.0 131.246.176.254 0.0.0.0 UG 0 0 0 isdn1

Fifteen minutes later still nothing has changed.:-(.

Andreas

-- 
 Andreas Jaeger   aj@arthur.rhein-neckar.de    jaeger@informatik.uni-kl.de
  for pgp-key finger ajaeger@alma.student.uni-kl.de
    http://www.student.uni-kl.de/~ajaeger/