08-21-2012 08:23 AM - edited 03-04-2019 05:19 PM
Lets say I have two routers: R1 and R2. Each of them is connected to each other with an iBGP relationship in AS 50.
R1 connects to ISP1 in AS 10 via eBGP
R2 connects to ISP2 in AS 20 via eBGP
This is a Single Multihomed setup.
Both R1 and R2 recieved a route for public network A via eBGP from their respecitve ISP Router.
The AS Path and Origin from each ISP is the same. All the defaults are the same.
---
This is very similar to a setup I currently have in GNS3. I am finding that the LOCAL_PREF is the deciding factor (I think).
When R1 gets its route for network A it gives it to R2 and says " this is my best path to A and has LOCAL_PREF of 100 (default)"
R2 looks at where it is getting its routes from. It has two paths:
1. Through R1
2. Through ISP2
R1 has LOCAL_PREF of 100
ISP2 has LOCAL_PREF of <blank> (in show ip bgp table)
In my GNS3 lab R2 is chosing the link via R1 because of the LOCAL_PREF. If I use a route-map and set an inbound filter for everything from ISP2 to have a LOCAL_PREF of 100, the competing routes now draw on LOCAL_PREF and the deciding step then becomes Neighbor Type (eBGP via ISP2 is preferred over iBGP through R1).
At least I THINK this is what is happening. But my questions are as follows:
> Why does the same thing not happen to R1 (i.e. why doesn't R1 see R2's route with a LOCAL_PREF of 100 and prefer the link over R2 as opposed the ISP1. My first thought was "because R2 will only advertise its BEST route to R1 which it has already decided on being the route through R1. Becasue BGP will not advertise a route back the supplying router, it sends nothing". But then why does it happen in one particular direction (from R1 to R2) and not the other? Maybe the route age? But if I reset R1s BGP neighborships (thus making its routes the NEWER routes) nothing changes.
> In any given scenario, if a router receives two routes, one from iBGP and one from eBGP, the iBGP will have LOCAL_PREF 100 by default and eBGP will have no LOCAL_PREF (at least the column in the show ip bgp output is blank ... is this zero?). Does this mean it will always prefer iBGP routes over eBGP routes simply because the LOCAL_PREF comes before the Neighbor Type when looking at characteristics for choosing the best BGP route?
I hope these questions are clear enough. I have copied my network diagram below. A lot of it is redundant to this question but shows my basic setup. I am more than happy to copy and paste any output requested.
Any help would be appreciated. Thanks in advance.
Solved! Go to Solution.
08-21-2012 10:35 AM
Hi,
no local pref = local pref of 100. Which prefix do you want to go to from AS 50 ?
do a sh ip bgp x.x.x.x where x.x.x.x is the prefix and post here.
Regards.
Alain
Don't forget to rate helpful posts.
08-21-2012 10:35 AM
Hi,
no local pref = local pref of 100. Which prefix do you want to go to from AS 50 ?
do a sh ip bgp x.x.x.x where x.x.x.x is the prefix and post here.
Regards.
Alain
Don't forget to rate helpful posts.
08-21-2012 11:16 AM
Thanks. Your response has guided me to the answer. No local pref mean the default local pref. I had set the local pref default to 94 on R2. It wasnt showing in the show ip bgp output. I should have used the show ip bgp x.x.x.x command.
My output if you are interested:
R2(config)#router bgp 50
R2(config-router)#no bgp default local-preference 94 <<<
R2(config-router)#^Z
R2#coinf t
*Mar 1 00:10:17.595: %SYS-5-CONFIG_I: Configured from console by console
R2#show ip bgp 78.15.1.192
BGP routing table entry for 78.15.1.192/26, version 15
Paths: (2 available, best #1, table Default-IP-Routing-Table)
Flag: 0x820
Advertised to update-groups:
2
4569, (received & used)
202.202.202.2 from 202.202.202.2 (20.20.20.20)
Origin IGP, metric 0, localpref 100, valid, external, best <<<<<<
27, (received & used)
11.11.11.1 (metric 31) from 11.11.11.1 (1.1.1.1)
Origin IGP, metric 0, localpref 100, valid, internal
R2#
Thank you very much for your help.
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