Jared Gillis
17 years ago
Hello all,
I'm doing some lab work with zebra on a linux box and one of the goals is to have the linux server learn two default routes from upstream (directly connected) routers and failover its default route to whichever of the two BGP sessions that are up (no preference on which if both are up).
I've got the sessions up and I'm learning default from both, but when I drop the session to which default is currently pointing, the kernel routing table is not updated with a new default.
Here's relevant info:
bgpd.conf:
router bgp 64512
neighbor foo peer-group
neighbor foo remote-as 64512
neighbor foo soft-reconfiguration inbound
neighbor 208.106.121.49 peer-group foo
neighbor 208.106.121.53 peer-group foo
bgpd show ip bgp:
# show ip bgp
BGP table version is 0, local router ID is 208.106.123.141
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*>i0.0.0.0 208.106.123.97 100 0 7065 i
* i 208.106.123.105 100 0 7065 i
*>i208.106.121.48/30
208.106.121.49 10 100 0 ?
*>i208.106.121.52/30
208.106.121.53 10 100 0 ?
*>i208.106.123.96/30
208.106.121.49 10 100 0 ?
*>i208.106.123.100/30
208.106.121.49 10 100 0 ?
*>i208.106.123.104/30
208.106.121.53 10 100 0 ?
*>i208.106.123.108/30
208.106.121.53 10 100 0 ?
*>i208.106.123.138/32
208.106.121.49 10 100 0 ?
*>i208.106.123.139/32
208.106.121.53 10 100 0 ?
*> 208.106.123.141/32
0.0.0.0 0 32768 i
Total number of prefixes 10
zebra show ip route:
# show ip route
Codes: K - kernel route, C - connected, S - static, R - RIP, O - OSPF,
I - ISIS, B - BGP, > - selected route, * - FIB route
B 0.0.0.0/0 [200/0] via 208.106.123.97 inactive, 00:01:15
K>* 0.0.0.0/0 via 208.106.121.49, eth0
C>* 127.0.0.0/8 is directly connected, lo
K>* 169.254.0.0/16 is directly connected, eth0
B 208.106.121.48/30 [200/10] via 208.106.121.49 inactive, 00:01:15
C>* 208.106.121.48/30 is directly connected, eth0
B 208.106.121.52/30 [200/10] via 208.106.121.53 inactive, 00:01:20
C>* 208.106.121.52/30 is directly connected, eth1
B>* 208.106.123.96/30 [200/10] via 208.106.121.49, eth0, 00:01:15
B>* 208.106.123.100/30 [200/10] via 208.106.121.49, eth0, 00:01:15
B>* 208.106.123.104/30 [200/10] via 208.106.121.53, eth1, 00:01:20
B>* 208.106.123.108/30 [200/10] via 208.106.121.53, eth1, 00:01:20
B>* 208.106.123.138/32 [200/10] via 208.106.121.49, eth0, 00:01:15
B>* 208.106.123.139/32 [200/10] via 208.106.121.53, eth1, 00:01:20
C>* 208.106.123.141/32 is directly connected, lo
kernel routing table:
# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
208.106.123.139 208.106.121.53 255.255.255.255 UGH 10 0 0 eth1
208.106.123.138 208.106.121.49 255.255.255.255 UGH 10 0 0 eth0
208.106.123.108 208.106.121.53 255.255.255.252 UG 10 0 0 eth1
208.106.123.104 208.106.121.53 255.255.255.252 UG 10 0 0 eth1
208.106.123.100 208.106.121.49 255.255.255.252 UG 10 0 0 eth0
208.106.121.52 0.0.0.0 255.255.255.252 U 0 0 0 eth1
208.106.123.96 208.106.121.49 255.255.255.252 UG 10 0 0 eth0
208.106.121.48 0.0.0.0 255.255.255.252 U 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0
0.0.0.0 208.106.121.49 0.0.0.0 UG 0 0 0 eth0
# ip route sh
208.106.123.139 via 208.106.121.53 dev eth1 proto zebra metric 10 equalize
208.106.123.138 via 208.106.121.49 dev eth0 proto zebra metric 10 equalize
208.106.123.108/30 via 208.106.121.53 dev eth1 proto zebra metric 10 equalize
208.106.123.104/30 via 208.106.121.53 dev eth1 proto zebra metric 10 equalize
208.106.123.100/30 via 208.106.121.49 dev eth0 proto zebra metric 10 equalize
208.106.121.52/30 dev eth1 proto kernel scope link src 208.106.121.54
208.106.123.96/30 via 208.106.121.49 dev eth0 proto zebra metric 10 equalize
208.106.121.48/30 dev eth0 proto kernel scope link src 208.106.121.50
169.254.0.0/16 dev eth0 scope link
default via 208.106.121.49 dev eth0
When I ifdown'ed eth0, the eth0 routes were removed properly, but a new default route was not added towards the neighbor on eth1.
I'd appreciate any thoughts or suggestions.
Thanks!
I'm doing some lab work with zebra on a linux box and one of the goals is to have the linux server learn two default routes from upstream (directly connected) routers and failover its default route to whichever of the two BGP sessions that are up (no preference on which if both are up).
I've got the sessions up and I'm learning default from both, but when I drop the session to which default is currently pointing, the kernel routing table is not updated with a new default.
Here's relevant info:
bgpd.conf:
router bgp 64512
neighbor foo peer-group
neighbor foo remote-as 64512
neighbor foo soft-reconfiguration inbound
neighbor 208.106.121.49 peer-group foo
neighbor 208.106.121.53 peer-group foo
bgpd show ip bgp:
# show ip bgp
BGP table version is 0, local router ID is 208.106.123.141
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*>i0.0.0.0 208.106.123.97 100 0 7065 i
* i 208.106.123.105 100 0 7065 i
*>i208.106.121.48/30
208.106.121.49 10 100 0 ?
*>i208.106.121.52/30
208.106.121.53 10 100 0 ?
*>i208.106.123.96/30
208.106.121.49 10 100 0 ?
*>i208.106.123.100/30
208.106.121.49 10 100 0 ?
*>i208.106.123.104/30
208.106.121.53 10 100 0 ?
*>i208.106.123.108/30
208.106.121.53 10 100 0 ?
*>i208.106.123.138/32
208.106.121.49 10 100 0 ?
*>i208.106.123.139/32
208.106.121.53 10 100 0 ?
*> 208.106.123.141/32
0.0.0.0 0 32768 i
Total number of prefixes 10
zebra show ip route:
# show ip route
Codes: K - kernel route, C - connected, S - static, R - RIP, O - OSPF,
I - ISIS, B - BGP, > - selected route, * - FIB route
B 0.0.0.0/0 [200/0] via 208.106.123.97 inactive, 00:01:15
K>* 0.0.0.0/0 via 208.106.121.49, eth0
C>* 127.0.0.0/8 is directly connected, lo
K>* 169.254.0.0/16 is directly connected, eth0
B 208.106.121.48/30 [200/10] via 208.106.121.49 inactive, 00:01:15
C>* 208.106.121.48/30 is directly connected, eth0
B 208.106.121.52/30 [200/10] via 208.106.121.53 inactive, 00:01:20
C>* 208.106.121.52/30 is directly connected, eth1
B>* 208.106.123.96/30 [200/10] via 208.106.121.49, eth0, 00:01:15
B>* 208.106.123.100/30 [200/10] via 208.106.121.49, eth0, 00:01:15
B>* 208.106.123.104/30 [200/10] via 208.106.121.53, eth1, 00:01:20
B>* 208.106.123.108/30 [200/10] via 208.106.121.53, eth1, 00:01:20
B>* 208.106.123.138/32 [200/10] via 208.106.121.49, eth0, 00:01:15
B>* 208.106.123.139/32 [200/10] via 208.106.121.53, eth1, 00:01:20
C>* 208.106.123.141/32 is directly connected, lo
kernel routing table:
# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
208.106.123.139 208.106.121.53 255.255.255.255 UGH 10 0 0 eth1
208.106.123.138 208.106.121.49 255.255.255.255 UGH 10 0 0 eth0
208.106.123.108 208.106.121.53 255.255.255.252 UG 10 0 0 eth1
208.106.123.104 208.106.121.53 255.255.255.252 UG 10 0 0 eth1
208.106.123.100 208.106.121.49 255.255.255.252 UG 10 0 0 eth0
208.106.121.52 0.0.0.0 255.255.255.252 U 0 0 0 eth1
208.106.123.96 208.106.121.49 255.255.255.252 UG 10 0 0 eth0
208.106.121.48 0.0.0.0 255.255.255.252 U 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0
0.0.0.0 208.106.121.49 0.0.0.0 UG 0 0 0 eth0
# ip route sh
208.106.123.139 via 208.106.121.53 dev eth1 proto zebra metric 10 equalize
208.106.123.138 via 208.106.121.49 dev eth0 proto zebra metric 10 equalize
208.106.123.108/30 via 208.106.121.53 dev eth1 proto zebra metric 10 equalize
208.106.123.104/30 via 208.106.121.53 dev eth1 proto zebra metric 10 equalize
208.106.123.100/30 via 208.106.121.49 dev eth0 proto zebra metric 10 equalize
208.106.121.52/30 dev eth1 proto kernel scope link src 208.106.121.54
208.106.123.96/30 via 208.106.121.49 dev eth0 proto zebra metric 10 equalize
208.106.121.48/30 dev eth0 proto kernel scope link src 208.106.121.50
169.254.0.0/16 dev eth0 scope link
default via 208.106.121.49 dev eth0
When I ifdown'ed eth0, the eth0 routes were removed properly, but a new default route was not added towards the neighbor on eth1.
I'd appreciate any thoughts or suggestions.
Thanks!
--
Jared Gillis - ***@corp.sonic.net Sonic.net, Inc.
Network Operations 2260 Apollo Way
707.522.1000 (Voice) Santa Rosa, CA 95407
707.547.3400 (Support) http://www.sonic.net/
Jared Gillis - ***@corp.sonic.net Sonic.net, Inc.
Network Operations 2260 Apollo Way
707.522.1000 (Voice) Santa Rosa, CA 95407
707.547.3400 (Support) http://www.sonic.net/