[nsp] BGP Best Path Selection Algorithm

Bob Tinkelman bob at tink.com
Fri May 7 09:52:25 EDT 2004


Hi Scott,

A more specific (e.g., a /17 inside a /14) *always* wins.

The rules (regarding the order in which the various bgp metrics
are considered) apply only in comparing routes for exactly the
same prefix.
--
Bob Tinkelman <bob at tink.com>
ISPnet, Inc.    718-464-4747


> Hi,
> 	According to :
> 		http://www.cisco.com/warp/public/459/25.shtml

> 	The weight is first, local pref is second. But I'm not sure
> how it handles :

> TTSG-6509b>sho ip bgp 62.253.162.218
> BGP routing table entry for 62.253.128.0/17, version 1699823546
> Paths: (3 available, best #3, table Default-IP-Routing-Table)
>   Advertised to non peer-group peers:
>   199.224.14.29
>   4436 3549 1239 5089
>     69.31.95.53 from 69.31.95.53 (69.31.95.240)
>       Origin IGP, metric 200, localpref 100, valid, external
>       Community: 3549:2082 3549:30840 4474:3111 13945:1000 13954:1006
>   4436 3549 1239 5089, (received-only)
>     69.31.95.53 from 69.31.95.53 (69.31.95.240)
>       Origin IGP, metric 0, localpref 100, valid, external
>       Community: 3549:2082 3549:30840 4474:3111
>   4436 3549 1239 5089, (received & used)
>     216.231.107.225 (metric 2) from 216.231.107.225 (216.231.107.225)
>       Origin IGP, metric 100, localpref 110, valid, internal, best
>       Community: 3549:2082 3549:30840 4474:3111 13945:1000 13954:1006

> 			and then

> BGP routing table entry for 62.252.0.0/14, version 1677738739
> Paths: (7 available, best #7, table Default-IP-Routing-Table)
>   Advertised to non peer-group peers:
>   199.224.14.29
>   6461 5089
>     198.32.160.22 from 198.32.160.22 (209.249.254.55)
>       Origin IGP, metric 200, localpref 170, valid, external
>       Community: 6461:1001 6461:2004 6461:2107 6461:2215 6461:2434 13945:2000 13
> 945:2001
>   6461 5089, (received-only)
>     198.32.160.22 from 198.32.160.22 (209.249.254.55)
>       Origin IGP, metric 4241, localpref 100, valid, external
>       Community: 6461:1001 6461:2004 6461:2107 6461:2215 6461:2434
>   1273 5089
>     198.32.160.112 from 198.32.160.112 (195.2.1.4)
>       Origin IGP, metric 200, localpref 170, valid, external
>       Community: 1273:12826 13945:2000 13945:2001
>   1273 5089, (received-only)
>     198.32.160.112 from 198.32.160.112 (195.2.1.4)
>       Origin IGP, metric 0, localpref 100, valid, external
>       Community: 1273:12826
>   4436 1273 5089
>     69.31.95.53 from 69.31.95.53 (69.31.95.240)
>       Origin IGP, metric 200, localpref 100, valid, external
>       Community: 1273:12826 4474:1111 13945:1000 13954:1006
>   4436 1273 5089, (received-only)
>     69.31.95.53 from 69.31.95.53 (69.31.95.240)
>       Origin IGP, metric 0, localpref 100, valid, external
>       Community: 1273:12826 4474:1111
>   1273 5089, (received & used)
>     216.231.107.225 (metric 2) from 216.231.107.225 (216.231.107.225)
>       Origin IGP, metric 100, localpref 180, valid, internal, best
>       Community: 1273:12826 13945:2000 13945:2001


> 	Is it using the one with the /17 because its more specific,
> correct? But where does it say it takes that into account? It seems like
> it talks about it per entry, but not between entries.

> 		Thanks, Tuc/TTSG Internet Services, Inc.



More information about the cisco-nsp mailing list