Bug!? Bird destroy routing table on exit

Ondrej Filip feela at network.cz
Sat Oct 25 13:30:06 CEST 2003


On Sun, 12 Oct 2003, Michael Roth wrote:

> Hello,

Hello!

> 
> I have a problem with bird (I'm new to bird, ospf and dynamic routing): 
> When bird exits (using birdc command "down", or using kill), it destroys
> one of my network link I think it shouldn't.
> 
> 1.) Before I start bird, my configuration of host1 looks like that:
> 
> host1:/# ip route
> 192.168.1.0/24 dev tun10  proto kernel  scope link  src 192.168.1.254 
> 192.168.11.0/24 dev eth0  proto kernel  scope link  src 192.168.11.9 
> default via 192.168.11.254 dev eth0 
> 
> host1:/# ifconfig tun10
> tun10     Link encap:Ethernet  HWaddr 00:FF:69:85:61:EB  
>           inet addr:192.168.1.254  Bcast:192.168.1.255  Mask:255.255.255.0
>           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
>           RX packets:25736 errors:0 dropped:0 overruns:0 frame:0
>           TX packets:28769 errors:0 dropped:66 overruns:0 carrier:0
>           collisions:0 txqueuelen:100 
>           RX bytes:2043460 (1.9 MiB)  TX bytes:13343994 (12.7 MiB)
> 
> host1:/# cat /etc/bird.conf:
> protocol device {
> }
> protocol direct {
>   interface "eth*";
>   interface "tun*";
> }
> protocol kernel {
>   import all;
>   export all;
> }
> protocol ospf {
>   area 0 {
>     interface "eth*" { };
>     interface "tun*" { };
>   };
> }
> 
> The network device 'tun10' is a linux tuntap device which simulates a
> normal ethernet network device on host1. The other side of 'tun10' is
> connected to a linux-user-mode kernel which I will name host2. Inside
> host2 the network device 'tun10' of host1 appears as device 'eth0'. This
> is a simulated ethernet network with two hosts on it. In host1 the
> device name of the ethernet card is 'tun10' and in host2 the device name
> oh the ethernet card is 'eth0'.
> 
> The bird configuration of host2 is identical to host1, except that all
> lines with "tun*" are omitted. The routing table of host2 before I start
> bird looks like:
> 
> host2:/# ip route
> 192.168.1.0/24 dev eth0  proto kernel  scope link  src 192.168.1.1 
> 
> 2.) Now, I start bird on both hosts and after about a minute the routing
> table of host2 is updated:
> 
> host2:/# ip route
> 192.168.1.0/24 dev eth0  proto kernel  scope link  src 192.168.1.1 
> 192.168.11.0/24 via 192.168.1.254 dev eth0  proto bird 
> 
> The routing table oh host1 doesn't change. I think this is ok, because
> host1 can't learn new routes from host2 because there aren't any new
> facts which host2 tells about routing to host1.  The table of host1
> still looks like:
> 
> host1:/# ip route
> 192.168.1.0/24 dev tun10  proto kernel  scope link  src 192.168.1.254 
> 192.168.11.0/24 dev eth0  proto kernel  scope link  src 192.168.11.9 
> default via 192.168.11.254 dev eth0 
> 
> 3.) Now I stop bird running on host1:
> 
> host1:/# killall bird
> 
> After this command, the routing table of host1 is destroyed!
> 
> host1:/# ip route
> 192.168.1.0/24 via 192.168.1.1 dev tun10  proto bird 
> 192.168.11.0/24 dev eth0  proto kernel  scope link  src 192.168.11.9 
> default via 192.168.11.254 dev eth0 
> 
> Look at the 192.168.1.0/24 entry: 'proto' is changed to 'bird' from
> 'kernel', the source address is deleted, and the scope is set to
> 'global' (not printed), and a gateway route via 192.168.1.1 is added?!?!
> 
> I think this is totally wrong.
> 
> A short note: The device 'tun10' is still correct configured after bird
> scrambled the routing table:
> 
> host1:/# ifconfig tun10
> tun10     Link encap:Ethernet  HWaddr 00:FF:69:85:61:EB  
>           inet addr:192.168.1.254  Bcast:192.168.1.255  Mask:255.255.255.0
>           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
>           RX packets:25766 errors:0 dropped:0 overruns:0 frame:0
>           TX packets:28800 errors:0 dropped:66 overruns:0 carrier:0
>           collisions:0 txqueuelen:100 
>           RX bytes:2045912 (1.9 MiB)  TX bytes:13346364 (12.7 MiB)
> 
> Restarting bird on host1 doesn't work, because there isn't any correct
> route to the network connected through 'tun10' and bird can't reach
> host2. The source address is missing and the gateway is just plain
> wrong.
> 
> Is this a bug? Or is this my fault?

I'm afraid, this could be a bug. OSPF is rewritting some device routes 
during synchonization of OSPF routing table and BIRD's routing table. I'll 
think of it and I'll try to fix it in 1.0.8.


				Ondrej Filip

> 
> cu
> 
> Michael Roth
> 
> ______________________________________________________________________________
> Die Besten ihrer Klasse! WEB.DE FreeMail (1,7) und WEB.DE Club (1,9) -
> bei der Stiftung Warentest - ein Doppelsieg! http://f.web.de/?mc=021184
> 




More information about the Bird-users mailing list