< Free Open Study > |
10-2 redistribute protocol metric metricSyntax Description:
Purpose: To redistribute routes into BGP that have been learned via a routing protocol other than BGP. The metric value is assigned to the metric or multi-exit discriminator (MED) of the new BGP route. Routes can be redistributed from connected, dvmrp, egp, eigrp, igrp, isis, iso-igrp, mobile, odr, ospf, rip, and static. Cisco IOS Software Release: 10.0 Configuration Example: Redistributing Connected, Static, and EIGRP Learned Routes into BGPIn Figure 10-2, Router C is advertising 172.16.2.0/24 and 172.16.3.0/24 to Router B via EIGRP. Routers A and B have an EBGP relationship. This example redistributes EIGRP and static into BGP on Router B and redistributes connected on Router A. The static routes are assigned a metric of 10, the EIGRP routes a metric of 15, and the connected routes a metric of 5. Figure 10-2. Redistributing Routes into BGP
Router A interface loopback 0 ip address 172.16.0.1 255.255.255.0 ! interface loopback 1 ip address 172.16.1.1 255.255.255.0 ! router bgp 1 network 172.17.1.0 mask 255.255.255.0 neighbor 172.17.1.1 remote-as 2 ___________________________________________________________________________ Router B router eigrp 1 network 10.0.0.0 network 172.17.0.0 no auto-summary ! router bgp 2 network 10.1.0.0 mask 255.255.255.252 network 172.17.1.0 mask 255.255.255.0 neighbor 172.17.1.2 remote-as 1 ! ip route 172.16.4.0 255.255.255.0 s2/0 ___________________________________________________________________________ Router C interface loopback 0 ip address 172.16.2.1 255.255.255.0 ! interface loopback 1 ip address 172.16.3.1 255.255.255.0 ! router eigrp 1 network 172.16.0.0 network 10.0.0.0 no auto-summary Before proceeding with the redistribution of routes into BGP, inspect the IP and BGP routing tables on Routers A and B. Router B should be learning routes 172.16.2.0/24 and 172.16.3.0/24 from Router C via EIGRP. Because you are not redistributing routes on Router B, Router A should not be learning about the 172.16.2.0/24 or 172.16.3.0/24 routes. rtrB# 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, ia - IS-IS inter area * - candidate default, U - per-user static route, o - ODR P - periodic downloaded static route Gateway of last resort is not set 172.17.0.0/24 is subnetted, 1 subnets C 172.17.1.0 is directly connected, Ethernet0/0 172.16.0.0/24 is subnetted, 3 subnets S 172.16.4.0 is directly connected, Serial2/0 D 172.16.2.0 [90/1889792] via 10.1.1.2, 00:26:32, Serial2/0 D 172.16.3.0 [90/1889792] via 10.1.1.2, 00:26:32, Serial2/0 10.0.0.0/30 is subnetted, 1 subnets C 10.1.1.0 is directly connected, Serial2/0 rtrB# show ip bgp BGP table version is 3, local router ID is 172.17.1.1 Status codes: s suppressed, d damped, h history, * valid, > best, i - internal Origin codes: i - IGP, e - EGP, ? - incomplete Network Next Hop Metric LocPrf Weight Path *> 10.1.1.0/30 0.0.0.0 0 32768 i * 172.17.1.0/24 172.17.1.2 0 0 1 i *> 0.0.0.0 0 32768 i ___________________________________________________________________________ rtrA# 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, ia - IS-IS inter area * - candidate default, U - per-user static route, o - ODR P - periodic downloaded static route Gateway of last resort is not set 172.17.0.0/24 is subnetted, 1 subnets C 172.17.1.0 is directly connected, FastEthernet0 172.16.0.0/24 is subnetted, 2 subnets C 172.16.0.0 is directly connected, Loopback0 C 172.16.1.0 is directly connected, Loopback1 10.0.0.0/30 is subnetted, 1 subnets B 10.1.1.0 [20/0] via 172.17.1.1, 00:25:38 rtrA# show ip bgp BGP table version is 4, local router ID is 172.16.1.1 Status codes: s suppressed, d damped, h history, * valid, > best, i - internal Origin codes: i - IGP, e - EGP, ? - incomplete Network Next Hop Metric LocPrf Weight Path *> 10.1.1.0/30 172.17.1.1 0 0 2 i *> 172.17.1.0/24 0.0.0.0 0 32768 i * 172.17.1.1 0 0 2 i Notice that the metric for the EIGRP learned routes on Router B is 1889792. The form of the redistribute command that you will use does not use the metric of the route that is being redistributed but assigns one statically. Now modify the BGP configuration on Router B to enable the redistribution of the EIGRP and static routes into BGP. Also modify the configuration on Router A to enable the redistribution of connected routes. Router A router bgp 1 network 172.17.1.0 mask 255.255.255.0 redistribute connected metric 5 neighbor 172.17.1.1 remote-as 2 ___________________________________________________________________________ Router B router bgp 1 network 10.1.0.0 mask 255.255.255.0 network 172.17.1.0 mask 255.255.255.0 redistribute static metric 10 redistribute eigrp 1 metric 15 neighbor 172.17.1.2 remote-as 2 VerificationVerify that the connected routes are being redistributed in BGP on Router A and that the static and EIGRP routes are being redistributed on Router B. rtrA# show ip bgp BGP table version is 15, local router ID is 172.16.1.1 Status codes: s suppressed, d damped, h history, * valid, > best, i - internal Origin codes: i - IGP, e - EGP, ? - incomplete Network Next Hop Metric LocPrf Weight Path *> 10.0.0.0 172.17.1.1 0 0 2 ? *> 10.1.1.0/30 172.17.1.1 0 0 2 i * 172.16.0.0 172.17.1.1 10 0 2 ? *> 0.0.0.0 5 32768 ? *> 172.17.0.0 0.0.0.0 5 32768 ? * 172.17.1.0/24 172.17.1.1 0 0 2 i *> 0.0.0.0 5 32768 i ___________________________________________________________________________ rtrB# show ip bgp BGP table version is 8, local router ID is 172.17.1.1 Status codes: s suppressed, d damped, h history, * valid, > best, i - internal Origin codes: i - IGP, e - EGP, ? - incomplete Network Next Hop Metric LocPrf Weight Path *> 10.0.0.0 0.0.0.0 0 32768 ? *> 10.1.1.0/30 0.0.0.0 0 32768 i *> 172.16.0.0 0.0.0.0 10 32768 ? * 172.17.1.2 5 0 1 ? *> 172.17.0.0 172.17.1.2 5 0 1 ? *> 172.17.1.0/24 0.0.0.0 0 32768 i * 172.17.1.2 5 0 1 i Why is the mask for the 172.16.x.x routes /16 (the entire Class B address 172.16.x.x)? By default, BGP summarizes redistributed routes on a classful boundary (see Chapter 2). Routers A and B now indicate that they can reach the entire Class B address block 172.16.x.x. Typically, this is not the behavior you want. When redistributing routes into BGP, it is a good idea to turn off auto-summarization. Modify the BGP configuration on Routers A and B to do this. Notice that Router A also summarizes the 10.0.0.0 and 172.17.0.0 networks because they are also directly connected. Router A router bgp 1 network 172.17.1.0 mask 255.255.255.0 redistribute connected 5 neighbor 172.17.1.1 remote-as 2 no auto-summary ___________________________________________________________________________ Router B router bgp 1 network 10.1.0.0 mask 255.255.255.252 network 172.17.1.0 mask 255.255.255.0 redistribute static 10 redistribute eigrp 1 15 neighbor 172.17.1.2 remote-as 2 no auto-summary Reinspect the BGP tables on Routers A and B: rtrA# show ip bgp BGP table version is 9, local router ID is 172.16.1.1 Status codes: s suppressed, d damped, h history, * valid, > best, i - internal Origin codes: i - IGP, e - EGP, ? - incomplete Network Next Hop Metric LocPrf Weight Path *> 10.1.1.0/30 172.17.1.1 0 0 2 i *> 172.16.0.0/24 0.0.0.0 5 32768 ? *> 172.16.1.0/24 0.0.0.0 5 32768 ? *> 172.16.2.0/24 172.17.1.1 15 0 2 ? *> 172.16.3.0/24 172.17.1.1 15 0 2 ? *> 172.16.4.0/24 172.17.1.1 10 0 2 ? *> 172.17.1.0/24 0.0.0.0 5 32768 i * 172.17.1.1 0 0 2 i ___________________________________________________________________________ rtrB# show ip bgp BGP table version is 20, local router ID is 172.17.1.1 Status codes: s suppressed, d damped, h history, * valid, > best, i - internal Origin codes: i - IGP, e - EGP, ? - incomplete Network Next Hop Metric LocPrf Weight Path *> 10.1.1.0/30 0.0.0.0 0 32768 i *> 172.16.0.0/24 172.17.1.2 5 0 1 ? *> 172.16.1.0/24 172.17.1.2 5 0 1 ? *> 172.16.2.0/24 10.1.1.2 15 32768 ? *> 172.16.3.0/24 10.1.1.2 15 32768 ? *> 172.16.4.0/24 0.0.0.0 10 32768 ? * 172.17.1.0/24 172.17.1.2 5 0 1 i *> 0.0.0.0 0 32768 i Troubleshooting
|
< Free Open Study > |