RE: BGP route selection criteria.

From: Brian McGahan (brian@cyscoexpert.com)
Date: Wed Nov 13 2002 - 19:10:59 GMT-3


E.D.

        "Locally originated" in BGP means that the local router is
originating the prefix in question into the BGP domain via the "network"
statement under BGP, "aggregate-address" statement under BGP, or the
"redistribute" statement under BGP. Suppose we have the following
scenario:

ISP_A ISP_B
  | |
 R1-------------R2
__|______________|__
          |
         R3

R1, R2, & R3 are running some IGP together.
R1, R2, ISP_A, & ISP_B are running BGP.
R1 peers EBGP with ISP_A, and iBGP with R2.
R2 peers EBGP with ISP_B, and iBGP with R1.
R3 advertises a prefix 3.3.3.3/32 into IGP.

R1 and R2 both use the "network 3.3.3.3 mask 255.255.255.255" statement
under their BGP processes. Assume that the synchronization rule has
been met, next-hop reachability is maintained, and all attributes are
left to default.

The BGP decision process is as follows:

Weight
Local-preference
Locally-originated
AS-PATH
Origin
MED
EBGP over iBGP
Shortest Internal Path (IGP metric to next-hop)
Router-ID (lowest)

The decision that will be the tie breaker in this case is
locally-originated. R1 will select it's own locally-originated prefix
as best, as will R2. When you "show ip bgp 3.3.3.3" you will see
something like this:

BGP routing table entry for 3.3.3.3/32, version 3
Paths: (2 available, best #2, table Default-IP-Routing-Table)
  Advertised to non peer-group peers:
  150.5.24.2 150.5.111.5
  Local
    150.5.12.1 (metric 1) from 150.5.24.2 (150.5.2.2)
      Origin IGP, metric 1, localpref 1, weight 32768, valid, internal,
synchronized
  Local
    150.5.14.1 from 0.0.0.0 (150.5.4.4)
      Origin IGP, metric 1, localpref 1, weight 32768, valid, sourced,
local, best

"from 0.0.0.0" means locally originated, hence it is the best path.

For more info on the BGP best path selection process:

http://www.cisco.com/en/US/tech/tk648/tk365/technologies_tech_note09186a
0080094431.shtml

HTH

Brian McGahan, CCIE #8593
Director of Design and Implementation
brian@cyscoexpert.com

CyscoExpert Corporation
Internetwork Consulting & Training
Voice: 847.674.3392
Fax: 847.674.2625

> -----Original Message-----
> From: nobody@groupstudy.com [mailto:nobody@groupstudy.com] On Behalf
Of
> enginedrive2002
> Sent: Wednesday, November 13, 2002 2:45 PM
> To: ccielab@groupstudy.com
> Subject: BGP route selection criteria.
>
> The BGP route selection criteria after the tie at "weight" and "local
> preference" is "Prefer the route that was locally originated".
>
> Could anyone give me a scenario that the BGP route selection is break
base
> on
> this?
>
> Thank you!
>
>
> E.D.



This archive was generated by hypermail 2.1.4 : Tue Dec 03 2002 - 07:22:59 GMT-3