3-2 bgp bestpath as-path ignore

 < Free Open Study > 

3-2 bgp bestpath as- path ignore

Syntax Description:

This command has no arguments.

Purpose: If multiple BGP routes to the same destination exist, BGP selects the best path based on the route attributes in the following order:

  1. Ignore a route if the next hop is not known.

  2. Ignore IBGP routes that are not synchronized.

  3. Prefer the route with the largest weight.

  4. Prefer the route with the largest local preference.

  5. Prefer the route that was locally originated.

  6. Prefer the route with the shortest AS path.

    If you're using bgp bestpath as-path ignore, skip this step. When you use the as-set option for aggregated routes, as_set counts as 1 regardless of the number of AS entries in the set. Confederation sub-AS numbers are not used to determine the AS-path length.

  7. Prefer the route with the lowest origin (IGP < EGP < Incomplete).

  8. Prefer the route with the lowest MED.This comparison is only between routes advertised by the same external AS.

    If you're using bgp always-compare-med , compare MEDs for all paths. If used, this command needs to be configured on every BGP router in the AS.

    If you're using bgp bestpath med- confed , the MEDs are compared only for routes that have an AS confederation sequence in their AS-path attribute.

    If a prefix is received with no MED value, the prefix is assigned a MED value of 0. If you're using bgp bestpath med missing-as-worst, a prefix with a missing MED value is assigned a MED value of 4,294,967,294.

  9. Prefer EBGP routes to IBGP routes.

  10. Prefer the route with the nearest IGP neighbor.

  11. Prefer the oldest route.

  12. Prefer the path received from the router with the lowest router ID.

The shortest AS-path normally is used to select the best path if there are multiple routes to the same destination. This command allows the router to ignore AS-path information when making a best path determination.

Cisco IOS Software Release: 12.0

Configuration Example: Ignoring the AS-Path Attribute When Making a Best Path Selection

In Figure 3-2, Router B is learning about network 193.16.1.0/24 from Routers A and C. ASs 4 and 5 are simulated using loopbacks, a static route, and a route map. The simulated autonomous systems are used to create a longer AS-path attribute for the route being advertised by Router A.

Figure 3-2. The AS-Path Attribute Is Normally Used to Make a Best Path Determination

graphics/03fig02.gif

 Router A  interface Loopback0   ip address 5.5.5.5 255.255.255.255   !   interface FastEthernet0   ip address 172.17.1.2 255.255.255.0   !   router bgp 1   redistribute static   neighbor 172.17.1.1 remote-as 2   neighbor 172.17.1.1 route-map setas out   no auto-summary   !   ip route 193.16.1.0 255.255.255.0 Loopback0   route-map setas permit 10   set as-path prepend 5 4   ___________________________________________________________________________  Router B  interface Ethernet0/0   ip address 172.17.1.1 255.255.255.0   !   interface Serial2/0   ip address 10.1.1.1 255.255.255.252   clockrate 64000   !   router bgp 2   neighbor 10.1.1.2 remote-as 3   neighbor 172.17.1.2 remote-as 1   ___________________________________________________________________________  Router C  interface Loopback1   ip address 6.6.6.6 255.255.255.255   !   interface Serial0   ip address 10.1.1.2 255.255.255.252   !   router bgp 3   redistribute static   neighbor 10.1.1.1 remote-as 2   neighbor 10.1.1.1 route-map setas out   no auto-summary   !   route-map setas permit 10   set as-path prepend 4   ip route 193.16.1.0 255.255.255.0 Loopback1  

Router A is advertising network 193.16.1.0/24 with an AS-path of 1 5 4, and Router C is advertising network 193.16.1.0/24 with an AS-path of 3 4. Router B selects the path for 193.16.1.0/24 from Router C as the best path because the AS-path is shorter than the AS-path from Router A.

 rtrB#  show ip bgp  BGP table version is 2, 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 *  193.16.1.0       172.17.1.2               0             0 1 5 4 ?  *>                  10.1.1.2                 0             0 3 4 ?  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, 1 subnets 10.0.0.0/30 is subnetted, 1 subnets C       10.1.1.0 is directly connected, Serial2/0  B    193.16.1.0/24 [20/0] via 10.1.1.2, 00:19:15  

Modify the BGP configuration on Router B so that the AS-path is not used to make the best path selection.

 Router B  router bgp 2    bgp bestpath as-path ignore    neighbor 10.1.1.2 remote-as 3   neighbor 172.17.1.2 remote-as 1  
Verification

Router A has a lower router ID than Router C. If all other path selection criteria are equal, the route learned from Router A is used. Because the AS-path attribute is being ignored, the best path should be toward Router A due to its lower router ID value. The router ID values can be found using the show ip bgp command on Routers A and C:

 rtrA#  show ip bgp   BGP table version is 5, local router ID is 5.5.5.5  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 *  193.16.1.0       172.17.1.1                             0 2 3 4 ? *>                  0.0.0.0                  0         32768 ?  _____________________________________________________________________________________  rtrC#  show ip bgp   BGP table version is 3, local router ID is 6.6.6.6  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 *> 193.16.1.0       0.0.0.0                  0         32768 ? 

Verify that the best path to 193.16.1.0/24 has changed to the route advertised by Router A:

 rtrB#  show ip bgp  BGP table version is 2, 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 * >193.16.1.0       172.17.1.2               0             0 1 5 4 ? *                   10.1.1.2                 0             0 3 4 ? 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, 1 subnets 10.0.0.0/30 is subnetted, 1 subnets C       10.1.1.0 is directly connected, Serial2/0  B    193.16.1.0/24 [20/0] via 172.17.1.2, 00:08:48  
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. The BGP decision algorithm might determine the best path based on parameters that have a higher priority than AS-path (weight, local preference, and locally originated). Make sure you understand the BGP decision process.

 < 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