Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. If you'd prefer to explore, try our test area to get started. And see here for current known issues.

New Member

BGP - how does it select path

Hi all

Can anyone tell me at a basic level how BGP selects its path

If I have currently an MPLS running bgp to my provider, they then want to put in a new circuit, which would be same BGP/VRF i should imagine, if this is new circuit connects to the same router, will it continue to use the old link until i change an attribute ?

if I unplug the old link, how was would it fail over to the new one ?

cheers

Everyone's tags (4)
3 REPLIES
Gold

Re: BGP - how does it select path

Hi,

Below is the BGP Path selection process as Cisco stated, but remember if at any level there is a winner, the process stops there and we'll have our best path:

1. Prefer the path with the highest WEIGHT. (local to the router)

2. Prefer the path with the highest Local Preference. (within an AS)

3. Prefer the path that was locally originated via a network or aggregate BGP subcommand or through redistribution from an IGP.

4. Prefer the path with the shortest AS_PATH.

5. Prefer the path with the lowest origin type. Origin:  IGP < EGP < INCOMPLETE

6. Prefer the path with the lowest MED (multi exit discriminator) Multi-Exit to a same AS.

7. Prefer eBGP over iBGP paths.

Reference:

http://www.cisco.com/en/US/tech/tk365/technologies_tech_note09186a0080094431.shtml

Hope it Helps.

Soroush.

Hope it Helps, Soroush.

Re: BGP - how does it select path

As said by Soroush, the BGP path selection order of operation. By default, BGP will choose only one path among the other possible routes. As per my understanding from your query, you would be having the same service provider link terminated on your existing router. By default BGP Configurations, we cannot assure if your existing link itself will be used to route out the traffic. The reason is, there could be a chance that all the above order of route selection may be a "TIE" So, there are still more possible tie-breakers in BGP which it may use. See the below

  • 1)  Prefer the route that comes from the BGP router with the lowest router ID.

    2) Prefer the path that comes from the lowest neighbor address.

    For sure, any one of the above may become a tie-breaker & can make  your secondary link (new link) utilized to route out the traffic.

    Complete list of the best route selection criteria can be found on the below link

    http://www.cisco.com/en/US/tech/tk365/technologies_tech_note09186a0080094431.shtml

    So, its wise idea to set a higher "weight" on your existing link (existing neighbor) before getting your new link terminated.

    Regards

    Vivek

    Hall of Fame Super Silver

    Re: BGP - how does it select path

    Hello Carl,

    going down the ordered list of criteria for BGP best selection you will find out that between two eBGP routes the oldest is preferred.

    So when you start the new link it will not be used at first, if you make the old link to flap (the eBGP session has to flap) the new link will be used.

    If I remember correctly your new link has more bandwidth then the old one.

    In cooperation with the SP weight or local preference can be used on both sides (PE and CE) to prefer the new link over the old one  avoiding to cause the flap.

    From CE side the use of weight/local preference + two different values of BGP MED can make the job with BGP MED lowest value preferred.

    Hope to help

    Giuseppe

    541
    Views
    0
    Helpful
    3
    Replies