Table of Contents
What is BGP Local Preference Attribute?
In BGP Path selection algorithm, if your device is a different vendor product (not Cisco), the first BGP Path Attribute that is taken into account during path selection is Local Preference attribute.
Local Preference is not a vendor specific BGP Path Attribute like all the BGP path attributes except Weight Attribute.
Local Preference attribute is used to choose external BGP paths. Different edge routers has different Local Preferences to an external destination. These values are sent between IBGP (Interior BGP) neighbours and according to these values, the AS (Autonomous System) exit point is determined. Local Preference is applied to the inbound interface and shows the best outbound interface towards another AS. In other words, here, it shows the exit point of your AS towards another AS.
The default value of Local Preference is 100. And always the highest one is choosen as a Best BGP path.
Think about the previous Weight Attribute. Weight attribute was configured as local to that router. But Local Preference attribute is not like this. Different routers has different Local Preference values for that destination. And these Local Preference values are shared withing the AS (Autonomous System).
Local Preference attribute is a Well-known and Discretionary BGP Path Attribute. As we mentined before, this means, it is supported by every BGP implementation (well-known) and every BGP router recognize it, but optionally present in the BGP Update packet (discretionary).
How to Assign BGP Local Preference to a Router?
BGP Local Preference value can be assigned to a router in two ways:
• By BGP default local-preference command
• By Route Maps
Let’s give an example for each of these BGP Local Preference assign ways. As a reference topology, we will use the below basic topology:
You can also test yourself with BGP Tests and Questions.
You can find other BGP Path Attribute Articles below:
BGP Path Attributes – Weight
BGP Path Attributes – Local Preference
BGP Path Attributes – AS Path
BGP Path Attributes – Origin
BGP Path Attributes – MED
Main BGP Article Series :
BGP – Part 1
BGP – Part 2 (BGP Peers, BGP Sessions, BGP Messages)
BGP – Part 3 (IBGP, IBGP Topologies and EBGP)
BGP – Part 4 (BGP Administrative Distance and BGP Path Attributes)
BGP – Part 5 (Packet Tracer BGP Configuration Example)
Leave a Reply