[Netkit.users] lab #6, route and zebra
Roberto Pariset
robertopari a fastwebnet.it
Sab 13 Nov 2004 18:16:25 CET
Howdy, I am reporting issues with lab #6
(http://www.netkit.org/software/netkit_labs/bgp/lab-bgp-6-as100-simple/). To make lan B pingable from as100r1 we need to add a static
route in as20r2. So we can either do "route add -net 11.0.0.32/30 gw
20.1.1.1" or add it via zebra, editing /etc/zebra/zebra.conf and adding
"ip route 11.0.0.32/30 20.1.1.1 1". The both seem to work.
If we now sniff lan E from as20r2 and lan F from as20r1 and ping
100.1.0.1 from as200r1, we notice that echo requests pass by A F lan's
(should be A C E), while echo replies pass by E C A. To preproduce the
same behaviour on as100r1 pinging B lan, we better use an extra box, in
J lan. So we can "vstart pc100 --eth0=J --new", "ifconfig eth0
100.1.0.2" and "route add default gw 100.1.0.1". Now, pinging 200.2.0.1
from pc100 will produce specular effects as before (in this case replies
pass by A F instead of A C E).
Solution is (on as20r1) either "route add -net 11.0.0.0/30 gw 20.1.1.2"
or "ip route 11.0.0.0/30 20.1.1.2 1" appended to /etc/zebra/zebra.conf.
To put it short, we have to add two routes on two different routers.
It is important to notice that:
* first, the route command works with zebra (i.e. I can add a route
using route rather than telnetting zebra)
* second, the output of 'route -n' already contains the routes I am
going to add but, apparently, they do not work unless I force them in by
re-adding the routes. I hope telnetting zebra and typing the "show ip
route" command might help explaining this: at the beginning the routes
are announced by bgp; on r1 I see:
B>* 11.0.0.0/30 [200/0] via 20.1.1.2, eth2, 00:01:09
and on r2 I see:
B>* 11.0.0.32/30 [200/0] via 20.1.1.1, eth1, 00:01:25
after "route add ..." a kernel route is added, so that it becomes:
K>* 11.0.0.32/30 via 20.1.1.1, eth1
B 11.0.0.32/30 [200/0] via 20.1.1.1, eth1, 00:05:44
on r2, and:
K>* 11.0.0.0/30 via 20.1.1.2, eth2
B 11.0.0.0/30 [200/0] via 20.1.1.2, eth2, 00:06:18
on r1. Appending "ip route ..." to /etc/zebra/zebra.conf would have
created a static route (S) instead of the kernel route (K). As I said,
the both seem to work.
My questions are:
1) Why are those Bgp announced routes not working untill I add a Kernel
or Static route? Are they not enough?
2) Shouldn't i-bgp take care of this all? In my opinion I shouldn't need
to add those static routes, expecially since r1 can ping lan B and r2
can ping lan J. Am I right or just lazy?
All the best,
r.
Maggiori informazioni sulla lista
Netkit.users