Attribute Problems


BGP routes are characterized by a number of attributes, based upon which the best path to a destination is selected by using the BGP path selection algorithm. The BGP attributes are AS path, Origin, Next Hop, Weight, Local Preference, Multi Exit Discriminator, and Community.

An incorrect setting of the attribute values can lead to nonoptimal path selection in BGP. Figure 11.7 illustrates an example to show the effect of problems related to BGP attributes and ways to detect and correct them. The figure shows a BGP network with three different ASs, AS5555, AS6666, and AS7777. AS5555-AS6666, AS5555-AS7777, and AS6666-AS7777 are running on eBGP. Routers B1 and B2 in AS6666 are running on iBGP.

click to expand
Figure 11.7: A BGP network depicting problems related to attributes.

In Figure 11.7, the route to the network 192.168.1.0/24 of AS5555 at C1 in AS7777 is via B1 in AS6666 and not via the direct connectivity to AS5555, as shown in Listing 11.21.

Listing 11.21 Output of show ip route 192.168.1.0 Command

start example
C1#show ip route 192.168.1.0 Routing entry for 192.168.1.0/24   Known via "bgp 7777", distance 200, metric 0   Tag 4657, type internal   Last update from 10.3.1.1 01:12:49 ago   Routing Descriptor Blocks:   * 10.3.1.1, from 10.3.1.1, 01:12:49 ago       Route metric is 0, traffic share count is 1       AS Hops 1           
end example

The optimal path should be directly through AS5555. To obtain the optimal path:

  1. Check if the neighbor relationship is established with A1 of AS5555.

  2. Check if route 192.168.1.0/24 has been learned from A1 by using the command

    C1#show ip bgp neighbor 10.2.1.1 routes | include 192.168.1.0

    If the route has not been learned, execute proper troubleshooting steps as provided in a previous section. If the route has been learned from both B1 and A1, check the attributes.

  3. Check the BGP configuration at C1 corresponding to neighbors B1 and A1 for any weight attribute that might be set. You can do this by using the show running-config command. The relevant part of the configuration is shown in Listing 11.22.

    Listing 11.22 Configuration at C1

    start example
    router bgp 7777 neighbor 10.3.1.1 remote-as 6666 neighbor 10.3.1.1 weight 200 neighbor 10.2.1.1 remote-as 5555 neighbor 10.2.1.1 weight 100 
    end example

    In Listing 11.22, the bold code lines show that the weight for routes from neighbor 10.3.1.1 is set to a higher value of 200 and the routes from neighbor 10.2.1.1 are set to 100. As a result, the path via B1 is preferred for all routes.

  4. Check the other attribute setting if the weight attribute is set to the same value for both neighbors or the default value is maintained.

  5. Check the local preference attribute by using the show running-config command and checking the relevant parts, as shown in Listing 11.23.

    Listing 11.23 Relevant Configuration at C1

    start example
    router bgp 7777 neighbor 10.3.1.1 remote-as 6666 neighbor 10.3.1.1 route-map LOCAL1 in neighbor 10.2.1.1 remote-as 5555 neighbor 10.2.1.1 route-map LOCAL2 in route-map LOCAL1 permit 10 match ip address 1 set local-preference 500 route-map LOCAL2 permit 10 match ip address 1 set local-preference 200 access-list 1 permit any
    end example

    In Listing 11.23, a higher local preference value of 500 is set to routes learned from B1, and therefore, B1 is preferred.

  6. Check the AS path attribute if there is no change in the local preference attribute. The configuration of A1 and B1 is to be checked to find if the path is being advertised with any AS path prepend. The relevant part of the configuration for A1 is shown in Listing 11.24.

Listing 11.24 Configuration at A1

start example
router bgp 5555 neighbor 10.2.1.2 remote-as 7777 neighbor 10.2.1.2 route-map AS1 out route-map AS2 permit 10 match ip address 1 set as-path prepend 5555 5555 5555
end example

The relevant part of the configuration for B1 is shown in Listing 11.25.

Listing 11.25 Configuration at B1

start example
router bgp 6666 neighbor 10.3.1.2 remote-as 7777
end example

In Listings 11.24 and 11.25, the AS path corresponding to route 192.168.1.0/24 learned from the B1 is 6666 5555. This path is shorter than that learned from A1, which is 5555 5555 5555 5555. Therefore, the path via Router B1 is preferred.




Cisco IP Routing Protocols(c) Trouble Shooting Techniques
Cisco IP Routing Protocols: Trouble Shooting Techniques (Charles River Media Networking/Security)
ISBN: 1584503416
EAN: 2147483647
Year: 2006
Pages: 130

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