Previous | Table of Contents | Next |
The second route map "setlocalpref" assigns a value of 300 to all the RTA's IBGP routes. This makes all IBGP routes preferred over EBGP routes.
RTF is also originating a default into OSPF only on the condition that RTF is learning the default from its exterior link (next hop 192.68.5.2). In case of a NY link failure, RTF will stop advertising a 0/0, even though it might be getting a 0/0 from RTA via IBGP.
RTF configuration:
router ospf 10 network 172.16.0.0 0.0.255.255 area 0 default-information originate route-map SEND_DEFAULT_IF router bgp 3 no synchronization network 172.16.50.0 mask 255.255.255.0 neighbor 172.16.70.1 remote-as 3 neighbor 172.16.70.1 next-hop-self neighbor 192.68.5.2 remote-as 2 neighbor 192.68.5.2 filter-list 10 out no auto-summary ip as-path access-list 10 permit ^$ access-list 1 permit 0.0.0.0 access-list 2 permit 192.68.5.2 route-map SEND_DEFAULT_IF permit 10 match ip address 1 match ip next-hop 2
RTG is running OSPF only and following the 0/0 default for routes outside AS3.
RTG configuration:
router ospf 10 network 172.16.0.0 0.0.255.255 area 0
The following is RTA's IP routing table. Note that RTA is preferring the 0/0 default via its IBGP peer RTF with next hop 172.16.50.1. Because the next hop is different from 172.16.20.1 (the external peer), RTA will not inject any default inside OSPF.
RTA#show ip route Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, * - candidate default U - per-user static route, o - ODR Gateway of last resort is 172.16.50.1 to network 0.0.0.0 B 192.68.6.0/24 [200/0] via 172.16.50.1, 00:03:06 B 192.68.11.0/24 [200/0] via 172.16.50.1, 00:03:06 B 193.78.0.0/16 [200/0] via 172.16.50.1, 00:03:06 172.16.0.0/16 subnetted, 4 subnets C 172.16.20.0/24 is directly connected, Serial0 C 172.16.220.0/24 is directly connected, Ethernet1 O 172.16.50.0/24 [110/164] via 172.16.70.2, 02:17:37, Serial1 C 172.16.70.0/24 is directly connected, Serial1 B* 0.0.0.0/0 [200/0] via 172.16.50.1, 00:03:07
The following is RTG's IP routing table. Note how RTG is setting its default to RTF. Both the BGP policies and the IGP defaults are now in sync.
RTG#show ip route Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, * - candidate default U - per-user static route, o - ODR Gateway of last resort is 172.16.50.1 to network 0.0.0.0 172.16.0.0/16 is subnetted, 4 subnets O 172.16.20.0/24 [110/128] via 172.16.70.1, 02:21:04, Serial0 O 172.16.220.0/24 [110/74] via 172.16.70.1, 02:21:04, Serial0 C 172.16.50.0/24 is directly connected, Serial1 C 172.16.70.0/24 is directly connected, Serial0 O*E2 0.0.0.0/0 [110/1] via 172.16.50.1, 00:41:26, Serial1
In case the NY link fails, RTA will learn the BGP 0/0 via its external link with next hop 172.16.20.1 and will inject a default into OSPF.
Notes:
Redistributing the 0/0 from BGP into OSPF via the redistribute router command is not allowed or implemented.
Using RIP as IGP
The Cisco RIP implementation behaves differently from OSPF when dealing with the 0/0 defaults. The BGP-learned 0/0 default is automatically injected into RIP. A default-metric router command is required under the RIP process to assign a metric (hop count) to the default. In our example (figure 11-11, assume that RTA, RTF, and RTG are running RIP. We will set the metric of the 0/0 injected into RIP by RTA in such a way that the internal router (RTG) always prefers RTF.
RTA will set the 0/0 default metric to 5. Note that no redistribution was necessary to inject the BGP default into RIP.
RTA configuration:
router rip passive-interface Serial0 network 172.16.0.0 default-metric 5 router bgp 3 no synchronization network 172.16.220.0 mask 255.255.255.0 network 172.16.70.0 mask 255.255.255.0 neighbor 172.16.20.1 remote-as 1 neighbor 172.16.20.1 filter-list 10 out neighbor 172.16.50.1 remote-as 3 neighbor 172.16.50.1 route-map setlocalpref in no auto-summary ip as-path access-list 10 permit ^$ route-map setlocalpref permit 10 set local-preference 300
RTF will inject the 0/0 into RIP with a hop count of 1.
RTF configuration:
router rip network 172.16.0.0 default-metric 1 router bgp 3 no synchronization network 172.16.50.0 mask 255.255.255.0 neighbor 172.16.70.1 remote-as 3 neighbor 172.16.70.1 next-hop-self neighbor 192.68.5.2 remote-as 2 neighbor 192.68.5.2 filter-list 10 out no auto-summary ip as-path access-list 10 permit ^$
RTG is running RIP only and is following the 0/0 default for routes outside AS3.
RTG configuration:
router rip network 172.16.0.0
The following is RTG's IP routing table. Note that RTG has set its default to RTF because of the lower metric of 1.
RTG#show Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, * - candidate default U - per-user static route, o - ODR Gateway of last resort is 172.16.50.1 to network 0.0.0.0 172.16.0.0/16 is subnetted, 4 subnets R 172.16.220.0/24 [120/1] via 172.16.70.1, 00:00:03, Serial0 C 172.16.50.0/24 is directly connected, Serial1 R 172.16.20.0/24 [120/1] via 172.16.70.1, 00:00:03, Serial0 C 172.16.70.0/24 is directly connected, Serial0 R* 0.0.0.0/0 [120/1] via 172.16.50.1, 00:00:22, Serial1
Notes:
If more conditions are needed to inject the 0/0 into RIP, redistribution and route maps could be used to inject the default from BGP into RIP.
Previous | Table of Contents | Next |