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

Localpref Impact with Equal Distance AS Paths

Hi all,

Given two equal distance AS Paths I would like to prefer one over the other. What is the best mechanism to implement this functionality? If one AS Path is shorter than another I want this path to be preferred regardless.

Thanks in advance,

Max

2 REPLIES

Re: Localpref Impact with Equal Distance AS Paths

Max,

The best way to do is to assign a HIGHER weight or higher local preference to the routes received from a particular router

BGP path selection is according to the below order.

1.Prefer the path with the highest WEIGHT

2.Prefer the path with the highest LOCAL_PREF

3.Prefer the path that was locally originated

4.Prefer the path with the shortest AS_PATH

5.Prefer the path with the lowest origin type

6.Prefer the path with the lowest

7.Prefer eBGP over iBGP paths

8.Prefer the path with the lowest IGP metric to the BGP next hop

9.Prefer the route that comes from the BGP router with the lowest router ID

10.Prefer the path that comes from the lowest neighbor address.

The Weight and the local pref attributes are checked first before checking the AS-Path. Hence by manipulating these attributes you can achieve what you want.

Check these links for config examples

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

http://www.cisco.com/en/US/tech/tk1330/tsd_technology_support_technical_reference_chapter09186a00807597c7.html#wp1020583

HTH, rate if it does

Narayan

Community Member

Re: Localpref Impact with Equal Distance AS Paths

Narayan,

Okay - so to my original question, if I want to prefer one route over another only if the AS Paths are the same how would I do that? Setting a higher localpref will always superceed the AS Path length.

-Max

251
Views
0
Helpful
2
Replies
CreatePlease to create content