Let's try it!
- Code: Select all
emanon-Bellerive(config)#do sh ip ro b
B* 0.0.0.0/0 [20/0] via 74.143.0.45, 12:09:02
[20/0] via 74.143.0.33, 12:09:02
emanon-Bellerive(config)#router ospf 1
emanon-Bellerive(config-router)#network 10.10.100.0 0.0.0.255 area 0
emanon-Bellerive(config-router)#redist bgp 10340 sub
emanon-Bellerive(config-router)#do sh ip o d
OSPF Router with ID (206.81.23.1) (Process ID 1)
Router Link States (Area 0)
Link ID ADV Router Age Seq# Checksum Link count
206.81.23.1 206.81.23.1 5 0x80000002 0x002121 1
Type-5 AS External Link States
Link ID ADV Router Age Seq# Checksum Tag
206.81.23.0 206.81.23.1 4 0x80000001 0x003709 0
emanon-Bellerive(config-router)#sh ip o d e
OSPF Router with ID (206.81.23.1) (Process ID 1)
Type-5 AS External Link States
LS age: 26
Options: (No TOS-capability, DC)
LS Type: AS External Link
Link State ID: 206.81.23.0 (External Network Number )
Advertising Router: 206.81.23.1
LS Seq Number: 80000001
Checksum: 0x3709
Length: 36
Network Mask: /24
Metric Type: 2 (Larger than any link state path)
TOS: 0
Metric: 1
Forward Address: 0.0.0.0
External Route Tag: 0
We see a route there, but not the default!
emanon-Bellerive(config)#do sh ip bgp
BGP table version is 15, local router ID is 206.81.23.1
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 74.143.0.45 0 0 36727 i
* 74.143.0.33 0 0 36727 i
*> 206.81.23.0 0.0.0.0 0 32768 i
emanon-Bellerive(config)#
So we only got the internally advertised route, but NOT the externally learned 0/0 one.... (Which is actually interesting considering I didn't do "bgp redistribute-internal" anywhere)
What about prefix-list?
- Code: Select all
emanon-Bellerive(config)#ip prefix-list default permit 0.0.0.0/0
emanon-Bellerive(config)#route-map B2O permit 10
emanon-Bellerive(config-route-map)#match ip address prefix default
emanon-Bellerive(config-route-map)#exit
emanon-Bellerive(config)#
emanon-Bellerive(config)#router ospf 1
emanon-Bellerive(config-router)#redist bgp 10340 sub route-map B2O
emanon-Bellerive(config-router)#
emanon-Bellerive(config-router)#do sh ip o d ex
OSPF Router with ID (206.81.23.1) (Process ID 1)
emanon-Bellerive(config-router)#
Well, now we actually get nothing. The 0/0, although matched, is not "allowed" to come in to OSPF. As noted above, using the default-information command will allow you to bring in the default route. OSPF is mildly protective.
Scott