direct protocol behaviour

Dan Rimal danrimal at gmail.com
Thu Sep 5 09:32:44 CEST 2013


Hello,

I have problem with direct protocol. I try to export connected routes to 
"custom" kernel tables, so i have kernel protocol, pipe protocol and 
appropriate config switches (i hope), see below.

Everything seems ok, but there is bad behaviour in one situation. When i 
have added secondary IP from same subnet to the same interface (like 
VRRP does) and delete this secondary IP subsequently (like VRRP does on 
backup state), direct record disappear from bird table too, although 
primary address is stil up on the interface. To restore connected routes 
in bird table, i must restart direct protocol which initiate bgp 
reconnecting on all peers.

Steps to reproduce problem:

1)
[root at router.devel.f16 ~]# ip addr
eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state 
UP qlen 1000
     link/ether 52:54:00:56:ee:a8 brd ff:ff:ff:ff:ff:ff
     inet 172.20.24.2/24 brd 172.20.24.255 scope global eth1

[root at router.devel.f16 ~]# birdc
BIRD 1.3.9 ready.
bird> show route
10.0.10.0/24       dev eth0 [direct1 16:03] * (240)
172.20.24.0/24     dev eth1 [direct1 16:03] * (240)
bird>


2)
[root at router.devel.f16 ~]# ip addr add 172.20.24.15/24 dev eth1

[root at router.devel.f16 ~]# ip addr
eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state 
UP qlen 1000
     link/ether 52:54:00:56:ee:a8 brd ff:ff:ff:ff:ff:ff
     inet 172.20.24.2/24 brd 172.20.24.255 scope global eth1
     inet 172.20.24.15/24 scope global secondary eth1

3)
[root at router.devel.f16 ~]# ip addr del 172.20.24.15/24 dev eth1

[root at router.devel.f16 ~]# birdc
BIRD 1.3.9 ready.
bird> show route
10.0.10.0/24       dev eth0 [direct1 16:03] * (240)
bird> restart direct1
direct1: restarted
bird> show route
10.0.10.0/24       dev eth0 [direct1 16:09] * (240)
172.20.24.0/24     dev eth1 [direct1 16:09] * (240)
bird>


config file:

table t_cust;

filter to_t_cust {
     if ( source = RTS_DEVICE ) then {
         accept;
     }
     else {
         reject;
     }
}

protocol kernel {
         scan time 180;
         import all;
         export all;
}


protocol device {
         scan time 10;
}

protocol direct {
}


protocol pipe p_cust {
         table t_cust;
         peer table master;
         import filter to_t_cust;
         export none;
}

protocol kernel k_cust {
         kernel table 90;
         table t_cust;
         persist;
         device routes;
         scan time 180;
         import none;            # z kernelu do birda
         export all;             # z birda do kernelu
}


Regards,

Dan Rimal




More information about the Bird-users mailing list