let's hope narbik doesn't mind the free publicity...
R5#sh ip bgp
R5#
When redistributing between OSPF and BGP, we should review BGP’s synchronization rule which states:
An IBGP learned prefix will not be advertised to another BGP speaker unless that same prefix resides in the IBGP speaker’s local IGP table.
Basically this rule was set to stop blackholing routes. This rule is well defined in RFC 1745 and it possesses another requirement, and that’s when OSPF is the IGP used within the AS. This rule does not apply if the IGP is NOT OSPF.
This RFC states that if OSPF is used as the IGP in the AS, the router ids of OSPF and BGP on the border router, which is the router that performs the redistribution of BGP into OSPF must be the same.
to wit:
R2#sh run | b router
router ospf 1
router-id 0.0.0.2
redistribute bgp 234 subnets
network 10.1.23.0 0.0.0.255 area 0
!
router bgp 234
synchronization
bgp router-id 2.2.2.2
bgp log-neighbor-changes
neighbor 10.1.12.1 remote-as 100
neighbor 10.1.23.3 remote-as 234
neighbor 10.1.23.3 next-hop-self
neighbor 10.1.34.4 remote-as 234
neighbor 10.1.34.4 next-hop-self
not so fast with the router id's...
first:
R3#sh ip bgp | b Net
Network Next Hop Metric LocPrf Weight Path
* i 1.0.0.0 10.1.23.2 0 100 0 100 i
good... now match the id's and clear bgp and ospf on r2...
R2#sh run | b router
router ospf 1
router-id 2.2.2.2
redistribute bgp 234 subnets
network 10.1.23.0 0.0.0.255 area 0
!
router bgp 234
synchronization
bgp router-id 2.2.2.2
and this is what we accomplished... a rib failure...
R3#sh ip bgp | b Net
Network Next Hop Metric LocPrf Weight Path
r>i 1.0.0.0 10.1.23.2 0 100 0 100 i
and it's what we wanted...
R3#sh ip bgp rib-fa
Network Next Hop RIB-failure RIB-NH Matches
1.0.0.0 10.1.23.2 Higher admin distance n/a
although a route now exists in r5 to 1.0.0.0 there is no way back...
R5#sh ip route bgp | b Gate
Gateway of last resort is not set
B 1.0.0.0/8 [20/0] via 10.1.45.4, 08:33:40
r1 is still not in the game...
R1#sh ip route ospf
R1#
R2
router bgp 234
neighbor 10.1.12.1 default-originate
and R4
R4(config)#router ospf 1
R4(config-router)#netw 10.1.45.4 0.0.0.255 area 0
solves the dilemma...
R1#sh ip route | b Gate
Gateway of last resort is 10.1.12.2 to network 0.0.0.0
B* 0.0.0.0/0 [20/0] via 10.1.12.2, 00:04:19
R5#ping 1.1.1.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 1.1.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 48/66/76 ms
No comments:
Post a Comment