Hello,
I'm playing with injecting default route using bgp and/or ospf. I'm using
dynamips, emulating 7200
routers running 12.4(23) IOS. I'm seeing some behavior I cannot explain, so I
thought I'd ask the list.
Here's the setup:
- 2 border routers connected to 2 upstreams using EBGP and running both OSPF
and IBGP internally
ISP1 ISP2
| |
|EBGP |EBGP
| |
CORE1 -------------------- CORE2
IBGP
OSPF
Both CORE routers learn BGP defaults from their upstreams. CORE1 sets localpref
to 150.
CORE1:
router bgp 65100
neighbor <ISP1> remote_as <ISP1_AS>
neighbor <ISP1> route-map FROM-ISP1 in
neighbor <CORE2> remote_as 65100
neighbor <CORE2> next-hop-self
!
ip prefix-list DEFAULT-ROUTE seq 5 permit 0.0.0.0/0
!
route-map FROM-ISP1
match ip address prefix-list DEFAULT-ROUTE
set local-preference 150
Also both routers originate default in OSPF:
CORE1:
router ospf 100
default-information originate
OSPF default is needed because other routers in the AS (not configured in this
lab) won't run BGP and need
default route through OSPF. Config on CORE2 is the same except setting bgp
local preference.
so with this config here's what I see:
CORE1#sh ip bgp
BGP table version is 57, local router ID is <CORE1>
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*> 0.0.0.0 <ISP1_next_hop> 0 150 0 <ISP1_AS> i
CORE1#sh ip route 0.0.0.0
Routing entry for 0.0.0.0/0, supernet
Known via "bgp 65100", distance 20, metric 0, candidate default path
Tag 65001, type external
Last update from <ISP1> 00:04:04 ago
Routing Descriptor Blocks:
* <ISP1>, from <ISP1>, 00:04:04 ago
Route metric is 0, traffic share count is 1
AS Hops 1
Route tag 65001
CORE2#sh ip bgp
BGP table version is 60, local router ID is <CORE2>
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
r>i0.0.0.0 <CORE1> 0 150 0 <ISP1_AS> i
r <ISP2_next_hop> 0 0 <ISP2_AS> i
CORE2#sh ip route 0.0.0.0
Routing entry for 0.0.0.0/0, supernet
Known via "ospf 100", distance 110, metric 1, candidate default path
Tag 100, type extern 2, forward metric 10
Last update from <CORE1> on FastEthernet0/0.2000, 00:02:32 ago
Routing Descriptor Blocks:
* <CORE1>, from <CORE1>, 00:02:32 ago, via FastEthernet0/0.2000
Route metric is 1, traffic share count is 1
Route tag 100
Now as expected on CORE2 IBGP default conflicts with OSPF default and OSPF
default wins due to lower AD.
IBGP default is in 'RIB-failure' status and OSPF default is in routing table.
Now on CORE2 I add 'always' keyword to OSPF 'default-originate' command, making
it:
CORE2:
router ospf 100
default-information originate always
For some reason I don't understand it changes the game completely. Now IBGP
route is preferred over OSPF:
CORE2#sh ip bgp
BGP table version is 61, local router ID is <CORE2>
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*>i0.0.0.0 <CORE1> 0 150 0 <ISP1_AS> i
* <ISP2_next_hop> 0 0 <ISP2_AS> i
CORE2#sh ip route 0.0.0.0
Routing entry for 0.0.0.0/0, supernet
Known via "bgp 65100", distance 200, metric 0, candidate default path
Tag 65001, type internal
Last update from <CORE1> 00:03:56 ago
Routing Descriptor Blocks:
* <CORE1>, from <CORE1>, 00:03:56 ago
Route metric is 0, traffic share count is 1
AS Hops 1
Route tag 65001
Why is that? Can somebody explain it to me please?
Thank you,
Michael
_______________________________________________
cisco-nsp mailing list [email protected]
https://puck.nether.net/mailman/listinfo/cisco-nsp
archive at http://puck.nether.net/pipermail/cisco-nsp/