Refer to the Exhibit.
Router 2 is receiving two announcements of a route to 10.0.0.0/8. Router 2 learned one version of the route from ISP-2; this announcement of the route was received first. The second announcement of the route was received from Router 1 using IBGP.
What will Router 2 do with the routes shown in the exhibit?
A.
Router 2 will choose to forward traffic toward ISP 2 because this route was learned first.
B.
Router 2 will choose to forward traffic toward Router 1 because newer routes are preferable.
C.
Router 2 will choose to forward traffic toward ISP 2 because EBGP-learned routes are preferred over IBGP-learned routes.
D.
Router 2 will choose to forward traffic toward Router 1 because IBGP-learned routes are preferred over EBGP-learned routes.
Explanation:
How the Active Route Is DeterminedFor each prefix in the routing table, the routing protocol process selects a single best path, called the active route. The algorithm for determining the active route is as follows:
1. 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.
2. For BGP, prefer the path with higher local preference. For non-BGP paths, choose the path with the lowest preference2 value.
3. If the path includes an AS path:
Prefer the route with a shorter AS path.
Confederation sequences are considered to have a path length of 0, and AS and confederation sets are considered to have a path length of 1.
Prefer the route with the lower origin code. Routes learned from an IGP have a lower origin code than those learned from an EGP, and both have lower origin codes than incomplete routes (routes whose origin is unknown).
Depending on whether nondeterministic routing table path selection behavior is configured, there are two possible cases:
If nondeterministic routing table path selection behavior is not configured (that is, if the path-selection cisco-nondeterministic statement is not included in the BGP configuration), for paths with the same neighboring AS numbers at the front of the AS path, prefer the path with the lowest multiple exit discriminator (MED) metric. Confederation AS numbers are not considered when deciding what the neighbor AS number is. When you display the routes in the routing table using the show route command, they generally appear in order from most preferred to least preferred. Routes that share the same neighbor AS are grouped together in the command output. Within a group, the best route is listed first and the other routes are marked with the NotBest flag in the State field of the show route detail command.
To always compare MEDs whether or not the peer ASs of the compared routes are the same, use the path-selection (always-compare-med) statement. For an example, see http://www.juniper.net/techpubs/software/junos/junos95/swconfig-routing/id-13242143.html#id-13242143If nondeterministic routing table path selection behavior is configured (that is, the path-selection cisco-nondeterministic statement is included in the BGP configuration), prefer the path with the lowest MED metric. When you display the routes in the routing table using the show route command, they generally appear in order from most preferred to least preferred and are ordered with the best route first, followed by all other routes in order from newest to oldest.
4. In both cases, confederations are not considered when determining neighboring ASs. Also, in both cases, a missing metric is treated as if a MED were present but zero.
5. Prefer strictly internal paths, which include IGP routes and locally generated routes (static, direct, local, and so forth).
6. Prefer strictly external (EBGP) paths over external paths learned through interior sessions (IBGP).
7. For BGP, prefer the path whose next hop is resolved through the IGP route with the lowest metric.
8. For BGP, if both paths are external, prefer the currently active path to minimize route-flapping. This rule is not used if:
path-selection external-router-id is configured.
Peers are from the same AS.
Neither path is the current active path.
9. For BGP, prefer the path from the peer with the lowest router ID; for any path with an originator ID attribute, substitute the originator ID for the router ID during router ID comparison.
10. For BGP, prefer the path with the shortest cluster list length; length is 0 for no list.
11. For BGP, prefer the path from the peer with the lowest peer IP address.