Cisco Support Community
Community Member

BGP best path


I have a customer with whom I have 2 bgp session. The problem is I have a single BGP source which is pointing to 2 different BGP destination at customer end.{BGP1(ME:x.x.x.2----x.x.x.3:cust) and BGP2( ME:x.x.x.2-----x.x.x.4:cust)}. Now I need to choose one of them as best path. What is the possible way to do so? Thx.


Re: BGP best path

You can use "weight" or "local-preference" to achieve this.

Re: BGP best path


"Weight" attribute is the Cisco Defined attribute.

Weight values are not propgated or carried through any of the Routing Updates.


BGP Path selection is based on the following:

1-If NextHop is inaccessible do not consider it.

2-Prefer the largest Weight.

3-If same weight prefer largest Local Preference.

4-If same Local Preference prefer the route that the

specified router has originated.

5-If no route was originated prefer the shorter AS path.

6-If all paths are external prefer the lowest origin code


7-If origin codes are the same prefer the path with the lowest


8-If path is the same length prefer External path over Internal.

9-If IGP synchronization is disabled and only internal path remain prefer

the path through the closest IGP neighbor.

10-Prefer the route with the lowest ip address value for BGP router ID.


Best Regards,

Guru Prasad R

Community Member

Re: BGP best path

BGP is the protocol you can make it to work the way you want to, no matter what the scenario is,

1st you may need to understand what exactly you want to do. When you say Primary Path what is that you have in mind. BGP attributes can be configured how you want Traffic to get in to your AS and how you want your Traffic to exit out of you AS

Weight is a Cisco-defined attribute that is local to a router. The weight attribute is not advertised to

Neighboring routers so you can?t influence how you?re Neighbor send traffic to you AS. All its does is how you send traffic out of your Router

The local preference attribute is used to prefer an exit point from the local autonomous system (AS). So you can?t influence how you?re Neighbor send traffic to you AS. All its does is how you send traffic out of your AS

The multi-exit discriminator (MED) or metric attribute is used as a suggestion regarding the preferred route into the AS that is advertising the metric.

So you may need to use the combination of both. I think you can do better design for more scalable and effective way of utilize both the link

Re: BGP best path

if weight is used alone, you might end up with assymetric routing.

if MED alone is used, same issue.

however if wantt o control both inbound and outbound in an easy way, use prepending.

so append ur AS when advertising( outbound) and append it when receiving from customer session ( inbound). then u are sure to have 2 clear paths, one active one backup.



CreatePlease to create content