Route change trouble with bird
michael_moore at csnw.com
michael_moore at csnw.com
Fri Jan 21 06:40:00 CET 2005
Greetings:
I am beginning to use bird 1.0.9 under Linux 2.2 on a small IPv4-only
network and uncovered a difficulty with using the "ip route change"
command. The linux router in question is configured with "protocol kernel"
having "preference 180" so that local "alien" routes will supercede
equivalent RIP routes (so that backup routes managed by the linux router
will be taken instead of routes available on other routers).
I noticed that if I try to use the "ip route change ..." command to modify
an "alien" route, the route is instead removed and replaced by the RIP
route. I can use the same command a second time to replace the RIP route
with the "alien" route and it works properly. Also, if I first delete the
original "alien" route, wait a second for the RIP route to take its place,
then issue the "ip route change..." command, the change works properly.
For example:
- The route (via "ip route list") is:
206.163.40.96/27 via 65.100.46.254 dev ipsec0
- I execute:
ip route change 206.163.40.96/27 via 65.100.46.254 dev ipsec0 src
206.163.40.44
- The following items appear in the log:
20-01-2005 16:14:55 <TRACE> kernel1: 206.163.40.96/27: [alien async] removed
20-01-2005 16:14:55 <TRACE> rip1 < forced accept by protocol
206.163.40.96/27 via 206.163.40.33 on ipsec1
20-01-2005 16:14:55 <TRACE> rip1 < replaced 206.163.40.96/27 via
206.163.40.33 on ipsec1
20-01-2005 16:14:55 <TRACE> kernel1 < replaced 206.163.40.96/27 via
206.163.40.33 on ipsec1
20-01-2005 16:14:55 <TRACE> kernel1 > removed [replaced] 206.163.40.96/27
via 65.100.46.254 on ipsec0
20-01-2005 16:14:55 <TRACE> kernel1: 206.163.40.96/27: [alien async] created
20-01-2005 16:14:55 <TRACE> kernel1 > added [best] 206.163.40.96/27 via
65.100.46.254 on ipsec0
20-01-2005 16:14:55 <TRACE> rip1 < replaced 206.163.40.96/27 via
65.100.46.254 on ipsec0
20-01-2005 16:14:55 <TRACE> kernel1 < replaced 206.163.40.96/27 via
65.100.46.254 on ipsec0
20-01-2005 16:14:55 <TRACE> kernel1: 206.163.40.96/27: [alien async] removed
20-01-2005 16:14:55 <TRACE> rip1 < forced accept by protocol
206.163.40.96/27 via 206.163.40.33 on ipsec1
20-01-2005 16:14:55 <TRACE> rip1 < replaced 206.163.40.96/27 via
206.163.40.33 on ipsec1
20-01-2005 16:14:55 <TRACE> kernel1 < replaced 206.163.40.96/27 via
206.163.40.33 on ipsec1
20-01-2005 16:14:55 <TRACE> kernel1 > removed [replaced] 206.163.40.96/27
via 65.100.46.254 on ipsec0
- The route (via "ip route list") now shows a totally different (RIP)
route:
206.163.40.96/27 via 206.163.40.33 dev eth1 proto bird
Looking at the code, I couldn't spot the trouble spot. I am left to imagine
that the timing of the "ip route change" command conflicts with the timing
of bird adding its own RIP route. I just don't know how it works in the
Netlink interface.
As indicated above, preceding the route change command with a delete and a
delay results in the change working properly:
ip route del 206.163.40.96/27
sleep 1
ip route change 206.163.40.96/27 via 65.100.46.254 dev ipsec0 src
206.163.40.44
I noticed lots of low-level debugging output in the netlink code, but I
couldn't figure out how to output it. When I configure with
"--enable-debug", I don't see any additional output in the debug file or or
stderr (with "-d") or in the "debug output file" (with "-D bugout"), but I
do have to specify the locations of the bird.conf and bird.ctl files. If
you have any hints for debugging, I'm eager for those as well.
Thanks,
-Michael
More information about the Bird-users
mailing list