Step 1: Examine the Local Preference Selection
Action
To examine a route to determine if local preference is the selection criteria for the single, active path, enter the following JUNOS CLI operational mode command:
user@host>show routedestination-prefix< detail >Sample Output
user@R4>show route 100.100.1.0 detailinet.0: 20 destinations, 24 routes (20 active, 0 holddown, 0 hidden)100.100.1.0/24 (2 entries, 1 announced)*BGPPreference: 170/-201Source: 10.0.0.2Next hop: 10.1.24.1 via so-0/0/3.0, selectedProtocol next hop: 10.0.0.2 Indirect next hop: 8644000 277State: <Active Int Ext>Local AS: 65002 Peer AS: 65002Age: 2:22:34 Metric: 5 Metric2: 10Task: BGP_65002.10.0.0.2+179Announcement bits (3): 0-KRT 3-BGP.0.0.0.0+179 4-Resolve inet.0AS path: 65001 ILocalpref: 200Router ID: 10.0.0.2BGP Preference: 170/-101Source: 10.1.45.2Next hop: 10.1.45.2 via so-0/0/2.0, selectedState: <Ext>Inactive reason: Local PreferenceLocal AS: 65002 Peer AS: 65001Age: 2w0d 1:28:31 Metric: 10Task: BGP_65001.10.1.45.2+179AS path: 65001 ILocalpref: 100Router ID: 10.0.0.5What It Means
The sample output shows that
R4received two instances of the100.100.1.0route: one from10.0.0.2(R2) and one from10.1.45.2(R5).R4selected the path fromR2as its active path, as indicated by the asterisk (*). The selection is based on the local preference value contained in theLocalpreffield. The path with the highest local preference is preferred. In the example, the path with the higher local preference value is the path fromR2, 200.The reason that the route from
R5is not selected is in theInactive reasonfield, in this case,Local Preference.Note that the two paths are from the same neighboring network: AS 65001.