10-4 redistribute protocol route-map route-map-name metric metric

 <  Free Open Study  >  

10-4 redistribute protocol route-map route-map- name metric metric

Syntax Description:

  • protocol ” Routes learned via protocol will be redistributed into BGP.

  • route-map-name ” Name of the route map used to control which routes will be redistributed into BGP. The route map can also be used to modify the BGP attributes of the redistributed routes.

  • metric ” Metric to assign to the redistributed routes. The value is in the range of 0 to 4294967295.

Purpose: To redistribute routes into BGP that have been learned via a routing protocol other than BGP. The metric of the non-BGP-learned routes is transferred to the metric or multi-exit discriminator (MED) of the new BGP route if the metric option is not used. If the metric option is used, the assigned metric will be applied to all routes redistributed from the protocol. A route map can be used for each redistributed protocol to control which routes are redistributed. A route map can also be used to modify the BGP attributes of the redistributed routes. 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: Selectively Redistributing Connected, Static, and EIGRP Learned Routes into BGP

In Figure 10-3, 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. On Router B, you want to block the redistribution of the EIGRP route 172.16.2.0. On Router A, you want to allow only the redistribution of network 172.16.1.0/24. Another route map is used on Router B to set the weight of the redistributed static route to 88.

Figure 10-3. Selectively Redistributing Routes into BGP

graphics/10fig03.gif

 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 and filtering 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. Because the form of the redistribute command that you will use does not contain a metric, the router will use the EIGRP metric for the BGP MED for the redistributed EIGRP routes. 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. On Router A, allow only the connected network 172.16.1.0/24 to be redistributed. On Router B, block the 172.16.2.0/24 route from being redistributed, and set the weight of the redistributed static route to 88.

 Router A  router bgp 1   network 172.17.1.0 mask 255.255.255.0    redistribute connected route-map allow    neighbor 172.17.1.1 remote-as 2    no auto-summary    !    access-list 1 permit 172.16.1.0 0.0.0.255     route-map allow permit 10     match ip address 1    ___________________________________________________________________________  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 route-map setwt     redistribute eigrp 1 route-map block    neighbor 172.17.1.2 remote-as 2    no auto-summary    !   access-list 1 deny 172.16.2.0 0.0.0.255   access-list 1 permit any   route-map block permit 10   match ip add 1   route-map setwt permit 10   set weight 88  
Verification

Verify that the selected connected routes are being redistributed in BGP on Router A and that the static and selected EIGRP routes are being redistributed on Router B. Also verify that the weight of the static route is being set to 88:

 rtrA#  show ip bgp  BGP table version is 14, 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.1.0/24    0.0.0.0                  0         32768 ?   *> 172.16.3.0/24    172.17.1.1         1889792             0 2 ?   *> 172.16.4.0/24    172.17.1.1               0             0 2 ?  *  172.17.1.0/24    172.17.1.1               0             0 2 i *>                  0.0.0.0                  0         32768 I  ___________________________________________________________________________  rtrB#  show ip bgp  BGP table version is 6, 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.1.0/24    172.17.1.2               0             0 1 ? *> 172.16.3.0/24    10.1.1.2           1889792         32768 ? *> 172.16.4.0/24    0.0.0.0                  0            88 ? *  172.17.1.0/24    172.17.1.2               0             0 1 i *>                  0.0.0.0                  0         32768 i 
Troubleshooting
Step 1. Verify that the BGP neighbors are in the Established state using the show ip bgp neighbors command.

If the neighbor relationship is not in the Established state, see section 8-23.

Step 2. Verify that the protocol you are redistributing routes from is active on the router.

Step 3. When redistributing from a protocol that requires a process ID, verify that you are using the proper process ID in the redistribute command.

Step 4. Use the no auto-summary command under router BGP when redistributing routes into BGP.

Step 5. Verify the syntax of any route maps and access lists. Remember that an IP access list has an implicit deny all as the last statement.

 <  Free Open Study  >  


Cisco[r] BGP-4 Command and Configuration Handbook
Cisco BGP-4 Command and Configuration Handbook
ISBN: 1587055732
EAN: 2147483647
Year: 2001
Pages: 300

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net