LOCAL_PREF
Overview of LOCAL_PREF
- LOCAL_PREF is a crucial attribute in BGP (Border Gateway Protocol) used to influence the flow of outbound traffic.
- It plays a significant role in the Best Path Selection Algorithm, where it is ranked second in importance.
- LOCAL_PREF is categorized as a Well-Known Discretionary attribute, which means it is not required to be included in all BGP UPDATE messages but must be recognized by all BGP speakers.
Role and Influence
- LOCAL_PREF affects the selection of the outbound path for traffic. It's used to specify a "degree of preference" for a particular route, indicating how preferable a specific route is for traffic leaving an autonomous system (AS).
- The value of LOCAL_PREF can be set differently for various routes, allowing network administrators to influence the traffic distribution effectively.
- LOCAL_PREF values range from 0 to 4,294,967,295, providing a broad range for expressing preferences.
Setting LOCAL_PREF
- LOCAL_PREF can be set in two primary ways:
1. As a Local Router Default Setting:
- Setting LOCAL_PREF at the local router level means that it applies to all NLRI (Network Layer Reachability Information) routes. In this case, all routes will have the same LOCAL_PREF value unless overridden by specific Route Maps.
2. In a Route Map Statement Per Neighbor:
- LOCAL_PREF can also be defined within a Route Map statement per neighbor. This approach allows network administrators to set LOCAL_PREF values based on their specific preferences for subsets of NLRI routes, providing granular control over traffic flow.
Default LOCAL_PREF Value
- The default value for LOCAL_PREF is typically 100. However, this value can be modified according to network requirements.
- It's essential to note that LOCAL_PREF is a locally significant attribute, meaning it is used within an AS to control outbound traffic.
Communication to iBGP Peers
- One crucial aspect of LOCAL_PREF is that it is communicated and propagated to all iBGP (Internal BGP) peers within an autonomous system (AS). This allows for consistent route preference within the AS.
Not Passed to eBGP Peers
- LOCAL_PREF is not passed to eBGP (External BGP) peers. Its influence is limited to controlling the flow of traffic within an AS.
Summary
- LOCAL_PREF is a pivotal attribute in BGP used to influence the outbound traffic flow from an AS. It can be set as a default value for all NLRI routes or fine-tuned for specific subsets of routes using Route Maps. It is a Well-Known Discretionary attribute with a broad range of values and is communicated to all iBGP peers in an AS.
Note:
- When setting LOCAL_PREF in BGP configurations, network administrators should follow best practices and guidelines to ensure optimal traffic routing based on their network requirements.