BGP - Local Preference

Unanswered Question
Aug 25th, 2008


I am trying to figure out why the route with the localPrf of 110 is chosen as the best route over the one with the localPrf of 200 ? I was under the impression that the route with the highest local preference is usually chosen. Any help appreciated.

The 'sh ip bgp' output is in the attached file.


I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (2 ratings)

I can't seem to grab that text file.

However, my first thought is, are both routes for the same size network? Or is one a more specific route, like a /24 and a /26 or something?

I'm sure its probably not something as simply as that, but without being able to see that text file or any other config information, it was the first obvious thing I could think of..


Richard Burts Mon, 08/25/2008 - 08:29

Here is the content of the file:

router_b#sh ip bgp

BGP table version is 3, local router ID is

Status codes: s suppressed, d damped, h history, * valid, > best, i - internal

Origin codes: i - IGP, e - EGP, ? - incomplete

Network Next Hop Metric LocPrf Weight Path

*> 110 0 100 i

* i 200 0 100 i

* i221.10.1.0 0 100 0 i

*> 0 32768 i


It seems to pretty clearly be two advertisements for the same prefix.


Since the next hop is in the same subnet I am wondering if there is something in the peering arrangement that is affecting this. Perhaps it would be helpful if we could get the output of show ip bgp and perhaps the complete bgp configuration.

[edit] it is a little easier to read in the file since the spacing of the fields shows relationships that are not so obvious with the acsii rendition of spacing in this post.



Giuseppe Larosa Mon, 08/25/2008 - 08:39

Hello Paul,

from your file:

*> 110 0 100 i

* i 200 0 100 i

the one with a greater local preference is received on an iBGP session, the one with a lower local preference comes from a direct eBGP session.

Have you disabled bgp sync ?

router bgp

no sync

on the router, otherwise it will wait to receive the same prefix on an IGP protocol.

Hope to help


I'll have to bow to Giuseppe's expertise on this matter, but I thought the sychronization with the local IGP only affected if the route was announced by BGP. I didn't think it affected whether or not the route would be picked up by the local routing table for use. (But I'm a novice at BGP)

I was thinking you might want to go one more step up the decision ladder. Is the next-hop ( a reachable IP from that router?

If not, then you may need to add the route, or configure next-hop-self..

Please let us know what you find, I'm curious as to what the problem is.


Harold Ritter Mon, 08/25/2008 - 11:56

It would definitely be easier if we had the output of the "show ip bgp" command.


PAUL CHEN Mon, 08/25/2008 - 17:28

Hi Everyone,

Thanks for the input. Attached is the file with the output for sh ip bgp and router_b's config.

I am trying to simulate a primary and backup link scenario.

AS 200 is advertising a default route to 2 routers in AS 100.

The intention is to have router_b as the backup link, hence the local preference of 110.

It appears it has chosen the best route based on the eBGP admin distance of 20 instead of the local preference.

Any comments appreciated.



Harold Ritter Mon, 08/25/2008 - 17:36


According to the output you provided, the issue is with synchronization. You need to configure "no synchronization" under the bgp process to make the path with the local preference of 200 preferred over the other.


CriscoSystems Mon, 08/25/2008 - 15:09

In deciding on a BGP route, the decision process on a Cisco router is

Step 1. Is synchronization DISABLED? If yes, go to Step 2. If not, is the route available via IGP, static, or connected? If yes go to Step 2; if not, drop the route.

Step 2. Choose whichever route has the highest WEIGHT value.

Step 3. Choose the route with the highest local preference.

So if you've vetted the synchronization issues, make sure both routes have the same weight in the "sh ip bgp" command output. If they do, then I defer to the smarter folks here.

Check out policy maps assigned either to the neighbors or the interfaces.


This Discussion