[c-nsp] BGP Route Selection

Andy Saykao andy.saykao at staff.netspace.net.au
Tue Mar 10 23:30:17 EDT 2009


Hi All,
 
Just trying to get my head around why BGP prefers a certain route over
others in my example below. I've read up on how BGP makes it's path
selection decision but I can't follow why it hasn't chosen a route with
a higher local preferences.
 
Here's my example...

Edge-Router#sh ip bgp 202.134.39.34

BGP routing table entry for 202.134.39.0/24, version 1469850
Paths: (6 available, best #2, table Default-IP-Routing-Table)
  Advertised to update-groups:
     7          8          9

  7606 9837 9837 9837 18250, (Received from a RR-client), (received &
used)
    198.32.212.61 (metric 20) from 203.17.96.105 (203.17.101.40)
      Origin IGP, metric 0, localpref 90, valid, internal
      Community: 4854:6002
      Originator: 203.17.101.24, Cluster list: 203.17.101.40,
203.17.101.22

  7606 9837 9837 9837 18250, (Received from a RR-client), (received &
used)
    198.32.212.61 (metric 20) from 203.17.96.101 (203.17.101.40)
      Origin IGP, metric 0, localpref 90, valid, internal, best
      Community: 4854:6002
      Originator: 203.17.101.24, Cluster list: 203.17.101.40,
203.17.101.22

  1221 2764 9837 18250, (received-only)
    203.62.252.39 from 203.62.252.39 (203.62.252.39)
      Origin IGP, localpref 100, valid, external

  1221 2764 9837 18250
    203.62.252.241 from 203.62.252.241 (203.62.252.241)
      Origin IGP, metric 120, localpref 50, valid, external
      Community: 4854:2001

  1221 2764 9837 18250, (received-only)
    203.62.252.241 from 203.62.252.241 (203.62.252.241)
      Origin IGP, localpref 100, valid, external

  1221 2764 9837 18250, (received-only)
    203.62.252.240 from 203.62.252.240 (203.62.252.240)
      Origin IGP, localpref 100, valid, external

 
Edge-Router#sh ip route 202.134.39.34
Routing entry for 202.134.39.0/24
  Known via "bgp 4854", distance 200, metric 0
  Tag 7606, type internal
  Redistributing via ospf 200
  Last update from 198.32.212.61 6d11h ago
  Routing Descriptor Blocks:
  * 198.32.212.61, from 203.17.96.101, 6d11h ago
      Route metric is 0, traffic share count is 1
      AS Hops 5
      Route tag 7606

 
I can only imagine it has something to do with the output below which
gives me a better indication of which prefixes have been received by
this router and their local preference. After looking at that, it would
make sense why it chose #2 from above.
 
Edge-Router#sh ip bgp 202.134.39.0 255.255.255.0 longer-prefixes
BGP table version is 1511449, local router ID is 203.17.101.35
Status codes: s suppressed, d damped, h history, * valid, > best, i -
internal,
              S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
 
   Network          Next Hop            Metric LocPrf Weight Path
* i202.134.39.0     198.32.212.61            0     90      0 7606 9837
9837 9837 18250 i
*>i                 198.32.212.61            0     90      0 7606 9837
9837 9837 18250 i
*                   203.62.252.241         120     50      0 1221 2764
9837 18250 i

What's the relationship between the "sh ip bgp A.B.C.D" and "sh ip bgp
longer-prefixes" command? Why are there "(received-only)" routes and
what does that mean? The "(received-only)" routes have a higher local
preferences but why aren't they shown with the "sh ip bgp
longer-prefixes" command?
 
Thanks for everyone's help...
 
Andy

This email and any files transmitted with it are confidential and intended
 solely for the use of the individual or entity to whom they are addressed. 
Please notify the sender immediately by email if you have received this 
email by mistake and delete this email from your system. Please note that
 any views or opinions presented in this email are solely those of the
 author and do not necessarily represent those of the organisation. 
Finally, the recipient should check this email and any attachments for 
the presence of viruses. The organisation accepts no liability for any 
damage caused by any virus transmitted by this email.



More information about the cisco-nsp mailing list