Options

BGP Local_Pref PA

CoolhandlukeCoolhandluke Member Posts: 118
Hi everyone,
Can someone clear something up for me - reading through BGP sections of the OCG for ROUTE it gives an example:

An org is single-multihomed as per the useless diagram below:


[R1]
[ISP1]
|
[R2]
[ISP2]


R1 and R2 have eBGP to their relative ISP + an iBGP connection to each other.

Lets say R1 and R2 both learn a prefix to 81.0.0.0/8 from their ISP.

Both will advertise them to each other - but because they are iBGP they will also default their local_pref to be 100.

As Local_pref is the second PA to be tested - the route through the iBGP should be the prefered.

That being said - I know I am wrong somewhere, I just don't know where. Does it simply come down to eBGP having a lower AD ?

Thanks to anyone that can put me on the right track !!
[CCENT]->[CCNA]->[CCNP-ROUTE]->COLOR=#0000ff]CCNP SWITCH[/COLOR->[CCNP-TSHOOT]

Comments

  • Options
    f0rgiv3nf0rgiv3n Member Posts: 598 ■■■■□□□□□□
    I think the statement "the route through the iBGP should be preferred" is a little confusing.

    Local Preference is used to tell your network(AS) which egress point it wants to use in the case of having multiple egress routes. Like in your illustration both routers have a route for 81./8. You would use Local Preference to determine which router you would want to use to leave your network in order to get to that network.

    Hopefully that makes sense?
  • Options
    CoolhandlukeCoolhandluke Member Posts: 118
    Thanks f0rgiv3n. I realise that local_pref is used to choose a more desirable egress point for a given network (i.e with routemaps) - but if all defaults were in place (local_pref set to 100 for iBGP peers) then why is the connection via the ISP the chosen path ?
    I can only assume that AD comes into play with this one (20 vs 200) as this takes precedence.

    Thanks again
    [CCENT]->[CCNA]->[CCNP-ROUTE]->COLOR=#0000ff]CCNP SWITCH[/COLOR->[CCNP-TSHOOT]
  • Options
    srgsrg Member Posts: 140
    Does it simply come down to eBGP having a lower AD ?
    In short; yes.
  • Options
    networker050184networker050184 Mod Posts: 11,962 Mod
    iBGP is 200 and eBGP is 20 in IOS (though this isn't the case in all vendor implementations). You can also check out the path selection criteria here. BGP Best Path Selection Algorithm  [IP Routing] - Cisco Systems
    An expert is a man who has made all the mistakes which can be made.
  • Options
    f0rgiv3nf0rgiv3n Member Posts: 598 ■■■■□□□□□□
    Ah there we go. Sorry, I was a little confused as to what the bottom-line question was. Double answers there^
  • Options
    EdTheLadEdTheLad Member Posts: 2,111 ■■■■□□□□□□
    R1 receives the eBGP prefix via ISP1, local pref is 0. R2 receives eBGP via ISP2, local preference is 0.
    R1 advertises the prefix to R2 with default local preference 100 and R2 t R1 the same.

    R1 has received the prefix from 2 neighbors ISP1 and R2, and runs the best path algorithm.Highest LP wins, i.e. prefix to R2, this route is then installed in the rib if that route isn't already there with a lower AD.

    Remember the AD is used on the RIB, the "bgp best path" is used to find best bgp path.
    Networking, sometimes i love it, mostly i hate it.Its all about the $$$$
  • Options
    vishaw1986vishaw1986 Member Posts: 40 ■■□□□□□□□□
    BGP best path selection criteria is based on the various attributes , that are checked in proper sequence.

    e.g when we talk about weight (local to router ) and local Preference (Local to AS ) , used to manipulate the traffic going from inside to outside

    And AS pre-pending and MED use to manipulate the traffic going from outside to inside.

    like one attribute is there, in which EBGP routes are preferred over iBGP.

    Si in short all depends upon attributes.
  • Options
    AwesomeGarrettAwesomeGarrett Member Posts: 257
    The eBGP route will be assigned by default a local preference of 100. Thus tie and it comes down to whether the route was learned from iBGP or eBGP. Just use the show ip bgp x.x.x.x/xx command and you will see it.

    Yes, local preference is non transitive but the router will set it 100 by default.
Sign In or Register to comment.