R2:
router ospf 1
router-id 192.168.0.2
log-adjacency-changes
network 192.168.0.0 0.0.255.255 area 0
default-information originate
R5:
router bgp 5
no synchronization
bgp router-id 192.168.0.5
bgp log-neighbor-changes
redistribute ospf 1
neighbor 172.16.45.4 remote-as 4
neighbor 172.16.45.4 default-originate route-map DEFAULT
no auto-summary
!
ip prefix-list DEFAULT seq 5 permit 0.0.0.0/0
!
route-map DEFAULT permit 10
match ip address prefix-list DEFAULT
Now let's head to R4 and check BGP routes:
R4#sho ip route bgp
B 192.168.25.0/24 [20/0] via 172.16.45.5, 00:55:28
192.168.0.0/32 is subnetted, 2 subnets
B 192.168.0.2 [20/2] via 172.16.45.5, 00:55:28
B 192.168.0.5 [20/0] via 172.16.45.5, 00:55:28
B* 0.0.0.0/0 [20/0] via 172.16.45.5, 00:37:36
I am still trying to find out why OSPF would not redistribute static default route. BGP will not redistribute default route even it's in source protocol routing table. It must be loop prevention mechanism, but I can not come up with a scenario when redistributing default route as oppose to originating it can cause routing loop. Especially in OSPF, where "default-information originate" creates Type5 LSA - same type as "redistribute" command would have created:
R2#sho ip ospf database | begin Type-5
Type-5 AS External Link States
Link ID ADV Router Age Seq# Checksum Tag
0.0.0.0 192.168.0.2 391 0x80000003 0x001F26 1
No comments:
Post a Comment