08-25-2008 07:09 AM - edited 03-03-2019 11:15 PM
Hi,
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.
Thanks.
08-25-2008 08:11 AM
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..
-Cheers
08-25-2008 08:29 AM
Here is the content of the file:
router_b#sh ip bgp
BGP table version is 3, local router ID is 172.16.1.1
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
*> 0.0.0.0 10.0.0.4 110 0 100 i
* i 10.0.0.2 200 0 100 i
* i221.10.1.0 11.1.1.1 0 100 0 i
*> 0.0.0.0 0 32768 i
router_b#
It seems to pretty clearly be two advertisements for the same prefix.
Paul
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 0.0.0.0 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.
HTH
Rick
08-25-2008 08:39 AM
Hello Paul,
from your file:
*> 0.0.0.0 10.0.0.4 110 0 100 i
* i 10.0.0.2 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 0.0.0.0/0 on an IGP protocol.
Hope to help
Giuseppe
08-25-2008 10:37 AM
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 (10.0.0.2) 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.
-Cheers
08-25-2008 11:56 AM
It would definitely be easier if we had the output of the "show ip bgp 0.0.0.0" command.
Regards,
08-25-2008 05:28 PM
Hi Everyone,
Thanks for the input. Attached is the file with the output for sh ip bgp 0.0.0.0 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.
Thanks,
Paul
08-25-2008 05:36 PM
Paul,
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.
Regards,
08-25-2008 03:09 PM
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.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide