Step 3: Examine the EBGP over IBGP Selection
Action
To examine a route to determine if EBGP is selected over IBGP as 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.3.0 detailinet.0: 20 destinations, 24 routes (20 active, 0 holddown, 0 hidden)100.100.3.0/24 (2 entries, 1 announced)*BGPPreference: 170/-101Source: 10.1.45.2Next hop: 10.1.45.2 via so-0/0/2.0, selectedState: <Active Ext>Local AS: 65002 Peer AS: 65001Age: 5d 0:31:25Task: BGP_65001.10.1.45.2+179Announcement bits (3): 0-KRT 3-BGP.0.0.0.0+179 4-Resolve inet.0AS path: 65001 ILocalpref: 100Router ID: 10.0.0.5BGP Preference: 170/-101Source: 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: <NotBest Int Ext>Inactive reason: Interior > Exterior > Exterior via InteriorLocal AS: 65002 Peer AS: 65002Age: 2:48:18 Metric2: 10Task: BGP_65002.10.0.0.2+179AS path: 65001 ILocalpref: 100Router ID: 10.0.0.2What It Means
The sample output shows that
R4received two instances of the100.100.3.0route: one from10.1.45.2(R5) and one from10.0.0.2(R2).R4selected the path fromR5as its active path, as indicated by the asterisk (*). The selection is based on a preference for routes learned from an EBGP peer over routes learned from an IBGP.R5is an EBGP peer.You can determine if a path is received from an EBGP or IBGP peer by examining the
Local AsandPeer Asfields. For example, the route fromR5shows the local AS is 65002 and the peer AS is 65001, indicating that the route is received from an EBGP peer. The route fromR2shows that both the local and peer AS is 65002, indicating that it is received from an IBGP peer.The reason that the inactive path is not selected is displayed in the
Inactive reasonfield, in this case,Interior > Exterior > Exterior via Interior. The wording of this reason shows the order of preferences applied when the same route is received from two routers. The route received from a strictly internal source (IGP) is preferred first, the route received from an external source (EBGP) is preferred next, and any route which comes from an external source and is received internally (IBGP) is preferred last.