- R4 and R6 should peer with BB3 and BB1 respectively, who are in AS 54.
- R1 should peer with R3, R4, and R6 as a route reflector.
- Configure R4 and R6 to advertise the network 155.X.0.0/16 to AS 54.
- Configure BGP to IGP redistribution on R3 so that all internal devices have reachability to the prefixes learned from AS 54.
So what’s wrong with redistributing iBGP prefixes into IGP? As you remember, BGP uses AS_PATH attributes to detect routing loops. When exchanging iBGP routes, AS_PATH attributes are not prepended and thus the route loop prevention technique does not work. Because of that, feeding iBGP prefixes into an IGP may result in routing loops, as the “split-horizon” rules for BGP prefixes may be broken. To make this situation even worse, iBGP has the AD value that makes it less preferred than any IGP. Thus, iBGP prefixes
redistributed into an IGP may preempt iBGP learned prefixes on other iBGP speakers.
redistributed into an IGP may preempt iBGP learned prefixes on other iBGP speakers.
To prevent the above mentioned issues, iBGP learned prefixes are not automatically redistributed into IGP when you issue the statement redistribute bgp under any IGP process on the router – only eBGP prefixes are propagated. In order to make iBGP redistribution possible, you need an additional statement configured under the BGP process: bgp redistribute internal. Be very careful when enabling this feature, as you may quickly end
up with routing loops, and try avoiding multiple points of iBGP to IGP.
up with routing loops, and try avoiding multiple points of iBGP to IGP.
detailed config:
R1:
router eigrp 100
network 150.1.1.1 0.0.0.0
network 155.1.0.0
no auto-summary
!
router bgp 100
neighbor 155.1.146.4 remote-as 100
neighbor 155.1.146.6 remote-as 100
neighbor 155.1.13.3 remote-as 100
neighbor 155.1.146.4 route-reflector-client
neighbor 155.1.146.6 route-reflector-client
neighbor 155.1.13.3 route-reflector-client
router eigrp 100
network 150.1.1.1 0.0.0.0
network 155.1.0.0
no auto-summary
!
router bgp 100
neighbor 155.1.146.4 remote-as 100
neighbor 155.1.146.6 remote-as 100
neighbor 155.1.13.3 remote-as 100
neighbor 155.1.146.4 route-reflector-client
neighbor 155.1.146.6 route-reflector-client
neighbor 155.1.13.3 route-reflector-client
R3:
router eigrp 100
redistribute bgp 100 metric 100000 1000 255 1 1500
!
router bgp 100
neighbor 155.1.13.1 remote-as 100
neighbor 155.1.13.1 route-map SET_NEXT_HOP_FROM_R1 in
bgp redistribute internal
!
route-map SET_NEXT_HOP_FROM_R1 permit 10
set ip next-hop 155.1.13.1
router eigrp 100
redistribute bgp 100 metric 100000 1000 255 1 1500
!
router bgp 100
neighbor 155.1.13.1 remote-as 100
neighbor 155.1.13.1 route-map SET_NEXT_HOP_FROM_R1 in
bgp redistribute internal
!
route-map SET_NEXT_HOP_FROM_R1 permit 10
set ip next-hop 155.1.13.1
R4:
router eigrp 100
passive-interface FastEthernet0/0
network 150.1.4.4 0.0.0.0
network 155.1.0.0
network 204.12.1.0
no auto-summary
!
router bgp 100
neighbor 155.1.146.1 remote-as 100
neighbor 155.1.146.1 next-hop-self
neighbor 204.12.1.254 remote-as 54
network 155.1.146.0 mask 255.255.255.0
aggregate-address 155.1.0.0 255.255.0.0
passive-interface FastEthernet0/0
network 150.1.4.4 0.0.0.0
network 155.1.0.0
network 204.12.1.0
no auto-summary
!
router bgp 100
neighbor 155.1.146.1 remote-as 100
neighbor 155.1.146.1 next-hop-self
neighbor 204.12.1.254 remote-as 54
network 155.1.146.0 mask 255.255.255.0
aggregate-address 155.1.0.0 255.255.0.0
R6:
router eigrp 100
passive-interface Serial0/0
network 54.0.0.0
network 150.1.6.6 0.0.0.0
network 155.1.0.0
no auto-summary
!
router bgp 100
neighbor 155.1.146.1 remote-as 100
neighbor 155.1.146.1 next-hop-self
neighbor 54.1.1.254 remote-as 54
network 155.1.146.0 mask 255.255.255.0
aggregate-address 155.1.0.0 255.255.0.0
passive-interface Serial0/0
network 54.0.0.0
network 150.1.6.6 0.0.0.0
network 155.1.0.0
no auto-summary
!
router bgp 100
neighbor 155.1.146.1 remote-as 100
neighbor 155.1.146.1 next-hop-self
neighbor 54.1.1.254 remote-as 54
network 155.1.146.0 mask 255.255.255.0
aggregate-address 155.1.0.0 255.255.0.0
SW4
router eigrp 100
no auto-summary
network 150.1.10.10 0.0.0.0
network 155.1.0.0
network 204.12.1.10 0.0.0.0
!
router bgp 100
synchronization
bgp log-neighbor-changes
network 150.1.10.0 mask 255.255.255.0
neighbor 155.1.0.1 remote-as 100
no auto-summary
no auto-summary
network 150.1.10.10 0.0.0.0
network 155.1.0.0
network 204.12.1.10 0.0.0.0
!
router bgp 100
synchronization
bgp log-neighbor-changes
network 150.1.10.0 mask 255.255.255.0
neighbor 155.1.0.1 remote-as 100
no auto-summary
@sw4 tracing 112.0.0.1 will show a loop between R1 and R3 This is because the EIGRP route in R1 preempted the iBGP learned route. However, R1 is the route-reflector to R3, and thus R3 thinks it should route back to R1 for prefix 112.0.0.1.
Rack1SW4#traceroute 112.0.0.1
Type escape sequence to abort.
Tracing the route to 112.0.0.1
1 155.1.108.8 0 msec 4 msec 0 msec
2 155.1.58.5 20 msec 8 msec 8 msec
3 155.1.0.3 20 msec 24 msec 16 msec
4 155.1.13.1 16 msec 8 msec 12 msec
5 155.1.13.3 16 msec 12 msec 16 msec
6 155.1.13.1 16 msec 12 msec 28 msec
7 155.1.13.3 20 msec 24 msec 28 msec
8 155.1.13.1 32 msec 24 msec 16 msec
9 155.1.13.3 28 msec 16 msec 36 msec
10 155.1.13.1 20 msec 24 msec 24 msec
11 155.1.13.3 88 msec 32 msec 24 msec
12 155.1.13.1 36 msec 44 msec 24 msec
13 155.1.13.3 28 msec 36 msec 48 msec
14 155.1.13.1 76 msec 20 msec 32 msec
15 155.1.13.3 28 msec 28 msec 28 msec
16 155.1.13.1 36 msec 32 msec 32 msec
17 155.1.13.3 40 msec 48 msec 56 msec
18 155.1.13.1 72 msec 36 msec 32 msec
19 155.1.13.3 36 msec 40 msec 36 msec
20 155.1.13.1 56 msec 40 msec 36 msec
21 155.1.13.3 48 msec 48 msec 36 msec
22 155.1.13.1 52 msec 36 msec 32 msec
23 155.1.13.3 56 msec 36 msec 36 msec
24 155.1.13.1 40 msec 48 msec 64 msec
25 155.1.13.3 92 msec 56 msec 52 msec
26 155.1.13.1 60 msec 48 msec 64 msec
27 155.1.13.3 64 msec 52 msec 56 msec
28 155.1.13.1 60 msec 100 msec 76 msec
29 155.1.13.3 60 msec 68 msec 124 msec
30 155.1.13.1 120 msec 76 msec 64 msec
Type escape sequence to abort.
Tracing the route to 112.0.0.1
1 155.1.108.8 0 msec 4 msec 0 msec
2 155.1.58.5 20 msec 8 msec 8 msec
3 155.1.0.3 20 msec 24 msec 16 msec
4 155.1.13.1 16 msec 8 msec 12 msec
5 155.1.13.3 16 msec 12 msec 16 msec
6 155.1.13.1 16 msec 12 msec 28 msec
7 155.1.13.3 20 msec 24 msec 28 msec
8 155.1.13.1 32 msec 24 msec 16 msec
9 155.1.13.3 28 msec 16 msec 36 msec
10 155.1.13.1 20 msec 24 msec 24 msec
11 155.1.13.3 88 msec 32 msec 24 msec
12 155.1.13.1 36 msec 44 msec 24 msec
13 155.1.13.3 28 msec 36 msec 48 msec
14 155.1.13.1 76 msec 20 msec 32 msec
15 155.1.13.3 28 msec 28 msec 28 msec
16 155.1.13.1 36 msec 32 msec 32 msec
17 155.1.13.3 40 msec 48 msec 56 msec
18 155.1.13.1 72 msec 36 msec 32 msec
19 155.1.13.3 36 msec 40 msec 36 msec
20 155.1.13.1 56 msec 40 msec 36 msec
21 155.1.13.3 48 msec 48 msec 36 msec
22 155.1.13.1 52 msec 36 msec 32 msec
23 155.1.13.3 56 msec 36 msec 36 msec
24 155.1.13.1 40 msec 48 msec 64 msec
25 155.1.13.3 92 msec 56 msec 52 msec
26 155.1.13.1 60 msec 48 msec 64 msec
27 155.1.13.3 64 msec 52 msec 56 msec
28 155.1.13.1 60 msec 100 msec 76 msec
29 155.1.13.3 60 msec 68 msec 124 msec
30 155.1.13.1 120 msec 76 msec 64 msec
@R1. Notice that the best route is via EIGRP toward R3 in which BGP was redistributed, while BGP prefixes learned point to R4 and R6. But since the BGP prefixes were learned via iBGP, they are preempted by the IGP route in the RIB.
as mentioned previously
"To prevent the above mentioned issues, iBGP learned prefixes are not automatically redistributed into IGP when you issue the statement redistribute bgp under any IGP process on the router – only eBGP prefixes are propagated. In order to make iBGP redistribution possible, you need an additional statement configured under the BGP process: bgp redistribute internal. Be very careful when enabling this feature, as you may quickly end up with routing loops, and try avoiding multiple points of iBGP to IGP.
Rack1R1#show ip route 112.0.0.0
Routing entry for 112.0.0.0/8
Known via "eigrp 100", distance 170, metric 2425856
Tag 54, type external
Redistributing via eigrp 100
Last update from 155.1.13.3 on Serial0/1, 00:05:49 ago
Routing Descriptor Blocks:
* 155.1.13.3, from 155.1.13.3, 00:05:49 ago, via Serial0/1
Route metric is 2425856, traffic share count is 1
Total delay is 30000 microseconds, minimum bandwidth is 1544 Kbit
Reliability 255/255, minimum MTU 1500 bytes
Loading 1/255, Hops 1
Route tag 54
Routing entry for 112.0.0.0/8
Known via "eigrp 100", distance 170, metric 2425856
Tag 54, type external
Redistributing via eigrp 100
Last update from 155.1.13.3 on Serial0/1, 00:05:49 ago
Routing Descriptor Blocks:
* 155.1.13.3, from 155.1.13.3, 00:05:49 ago, via Serial0/1
Route metric is 2425856, traffic share count is 1
Total delay is 30000 microseconds, minimum bandwidth is 1544 Kbit
Reliability 255/255, minimum MTU 1500 bytes
Loading 1/255, Hops 1
Route tag 54
Rack1R1#show ip bgp 112.0.0.0
BGP routing table entry for 112.0.0.0/8, version 21
Paths: (2 available, best #2, table Default-IP-Routing-Table, RIB-failure(17))
Advertised to update-groups:
1
54 50 60, (Received from a RR-client)
155.1.146.6 from 155.1.146.6 (150.1.6.6)
Origin IGP, metric 0, localpref 100, valid, internal
54 50 60, (Received from a RR-client)
155.1.146.4 from 155.1.146.4 (150.1.4.4)
Origin IGP, metric 0, localpref 100, valid, internal, best
BGP routing table entry for 112.0.0.0/8, version 21
Paths: (2 available, best #2, table Default-IP-Routing-Table, RIB-failure(17))
Advertised to update-groups:
1
54 50 60, (Received from a RR-client)
155.1.146.6 from 155.1.146.6 (150.1.6.6)
Origin IGP, metric 0, localpref 100, valid, internal
54 50 60, (Received from a RR-client)
155.1.146.4 from 155.1.146.4 (150.1.4.4)
Origin IGP, metric 0, localpref 100, valid, internal, best
Now apply the Administrative Distance fix in R1 and see how that affects the routing table. Now R1 selects the BGP route as the best one and inserts it into the routing table. At the same time, tracing the route from SW4 reveals that the routing loop has gone and packets can reach the final destination.
Rack1R1(config)#router eigrp 100
Rack1R1(config-router)#distance eigrp 90 201
Rack1R1(config-router)#
*Mar 1 00:30:05.343: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 100: Neighbor 155.1.146.4 (FastEthernet0/0) is down: route configuration changed
*Mar 1 00:30:05.371: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 100: Neighbor 155.1.146.6 (FastEthernet0/0) is down: route configuration changed
*Mar 1 00:30:05.375: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 100: Neighbor 155.1.0.5 (Serial0/0.1) is down: route configuration changed
*Mar 1 00:30:05.379: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 100: Neighbor 155.1.13.3 (Serial0/1) is down: route configuration changed
*Mar 1 00:30:05.431: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 100: Neighbor 155.1.146.4 (FastEthernet0/0) is up: new adjacency
Rack1R1(config-router)#
*Mar 1 00:30:05.575: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 100: Neighbor 155.1.146.6 (FastEthernet0/0) is up: new adjacency
Rack1R1(config-router)#
*Mar 1 00:30:07.435: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 100: Neighbor 155.1.13.3 (Serial0/1) is up: new adjacency
*Mar 1 00:30:10.099: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 100: Neighbor 155.1.0.5 (Serial0/0.1) is up: new adjacency
Rack1R1(config-router)#distance eigrp 90 201
Rack1R1(config-router)#
*Mar 1 00:30:05.343: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 100: Neighbor 155.1.146.4 (FastEthernet0/0) is down: route configuration changed
*Mar 1 00:30:05.371: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 100: Neighbor 155.1.146.6 (FastEthernet0/0) is down: route configuration changed
*Mar 1 00:30:05.375: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 100: Neighbor 155.1.0.5 (Serial0/0.1) is down: route configuration changed
*Mar 1 00:30:05.379: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 100: Neighbor 155.1.13.3 (Serial0/1) is down: route configuration changed
*Mar 1 00:30:05.431: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 100: Neighbor 155.1.146.4 (FastEthernet0/0) is up: new adjacency
Rack1R1(config-router)#
*Mar 1 00:30:05.575: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 100: Neighbor 155.1.146.6 (FastEthernet0/0) is up: new adjacency
Rack1R1(config-router)#
*Mar 1 00:30:07.435: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 100: Neighbor 155.1.13.3 (Serial0/1) is up: new adjacency
*Mar 1 00:30:10.099: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 100: Neighbor 155.1.0.5 (Serial0/0.1) is up: new adjacency
Rack1R1#show ip bgp 112.0.0.0
*Mar 1 00:30:11.559: %SYS-5-CONFIG_I: Configured from console by console
Rack1R1#show ip route 112.0.0.0
Routing entry for 112.0.0.0/8
Known via "bgp 100", distance 200, metric 0
Tag 54, type internal
Last update from 155.1.146.4 00:00:09 ago
Routing Descriptor Blocks:
* 155.1.146.4, from 155.1.146.4, 00:00:09 ago
Route metric is 0, traffic share count is 1
AS Hops 3
Route tag 54
verification at sw4:
Rack1SW4#traceroute 112.0.0.1
Type escape sequence to abort.
Tracing the route to 112.0.0.1
1 155.1.108.8 0 msec 0 msec 4 msec
2 155.1.58.5 8 msec 8 msec 4 msec
3 155.1.0.3 20 msec 24 msec 12 msec
4 155.1.13.1 8 msec 12 msec 4 msec
5 155.1.146.4 32 msec 16 msec 16 msec
6 204.12.1.254 36 msec 24 msec 24 msec
7 172.16.4.1 40 msec * 44 msec
Type escape sequence to abort.
Tracing the route to 112.0.0.1
1 155.1.108.8 0 msec 0 msec 4 msec
2 155.1.58.5 8 msec 8 msec 4 msec
3 155.1.0.3 20 msec 24 msec 12 msec
4 155.1.13.1 8 msec 12 msec 4 msec
5 155.1.146.4 32 msec 16 msec 16 msec
6 204.12.1.254 36 msec 24 msec 24 msec
7 172.16.4.1 40 msec * 44 msec
No comments:
Post a Comment