Hello,
We know that local preference is local to the AS, and it wont leave the AS, so it is specific to iBGP peers.
Since R3 have iBGP sessions with R1 and R2, it will advertise the routes received from R4 to both R1 and R2 since it is full mesh.
If I check the best route selection algorithm:
- Verify that the next hop can be resolved.
- Choose the path with the lowest preference value (routing protocol process preference).
Routes that are not eligible to be used for forwarding (for example, because they were rejected by routing policy or because a next hop is inaccessible) have a preference of –1 and are never chosen.
- Prefer the path with higher local preference.
Since both iBGP and eBGP have the same route preference value of 170 and it is the same it will move to the 3rd tiebreaker which is local preference, where R3 have the highest one = 300, and it should be chosen as the best path.
So R2 will see as the best path R2 -> R1 -> R3 -> R4.
Am i missing something?
------------------------------
ALEXANDRU MINZAT
------------------------------
Original Message:
Sent: 05-01-2021 01:55
From: AARON GOULD
Subject: Local preference atribute
I understand local preference is local to the AS in which it is configured.... and so is advertised to all local i-bgp peers...
https://www.juniper.net/documentation/us/en/software/junos/bgp/topics/ref/statement/local-preference-edit-protocols-bgp.html
"The LOCAL_PREF path attribute always is advertised to internal BGP peers and to neighboring confederations. It is never advertised to external BGP peers."
Also, a router will chose ebgp learned paths over ibgp learned paths.
So it seems that if R2 is learning about reachability to R4 via ebgp between AS 123 and AS 4... and R2 is also learning about R4 reachability via it's local ibgp sessions.... R2 will choose its ebgp learned path, and so the local pref you mention is not regarded at all
https://www.juniper.net/documentation/en_US/junos/topics/topic-map/bgp-route-preference.html#jd0e506
"...Junos OS always prefers EBGP routes over IBGP routes"
------------------------------
Aaron Gould
Senior Network Engineer
aaron@gvtc.com
https://www.linkedin.com/in/agould123/
Original Message:
Sent: 04-30-2021 11:06
From: ALEXANDRU MINZAT
Subject: Local preference atribute
Given this article:
Example: Configuring BGP Local Preference
If the local preference is modified on R3 and iBGP send local preference to all iBGP neighbours, does this mean that under default condition with only local preference altered to 300, if R2 will want to send traffic to R4, does this mean it will follow the following path to R4 : R2 -> R1 -> R3 -> R4?
Thanks you.
------------------------------
ALEXANDRU MINZAT
------------------------------