Specifications

Page 88 /148
How the Routing and Forwarding Tables Are Synchronized
The JUNOS routing protocol process is responsible for synchronizing the routing
information between the routing and forwarding tables. To do this, the routing
protocol process calculates the active routes from all the routes in the routing
table and installs them into the forwarding table. The routing protocol process
then copies the forwarding table to the router’s Packet Forwarding Engine, the
part of the router that forwards packets.
Route Preferences
For unicast routes, the JUNOS routing protocol process uses the information in
its routing table, along with the properties set in the configuration file, to choose
an active route for each destination. While the JUNOS software might know of
many routes to a destination, the active route is the preferred route to that
destination and is the one that is installed in the forwarding table and used when
actually routing packets.
The routing protocol process generally determines the active route by selecting
the route with the lowest preference value. The preference is an arbitrary value in
the range 0 through 255 that software uses to rank routes received from different
protocols, interfaces, or remote systems.
When routes in the routing table are nearly identical, the routing protocol process
prefers the route whose next hop has the lowest IP address.
The preference value is used to select routes to destinations in external ASs or
routing domains; it has no effect on the selection of routes within an AS (that is,
within an IGP). Routes within an AS are selected by the IGP and are based on
that protocol’s metric or cost value.
Alternate and Tie-Breaker Preferences
The JUNOS software provides support for alternate and tie-breaker preferences,
and some of the routing protocols, including BGP and label switching, use these
additional preferences.
With these protocols, you can specify a primary route preference, preference, and
a secondary preference, preference2, that is used as a tie breaker. You can also
mark route preferences with additional route tie-breaker information by specifying
a color, color, and a tie-breaker color, color2.
The software uses a 4-byte value to represent the route preference value. When
using the preference value to select an active route, the software first compares
the primary route preference values, choosing the route with the lowest value. If
there is a tie and if a secondary preference has been configured, the software
compares the secondary preference values, choosing the route with the lowest
value. If there is still a tie, the software continues the comparison process,
comparing the configured primary and secondary preference values.
How the Active Route Is Determined
For each prefix in the routing table, the routing protocol process selects a single
best path, called the active path. The algorithm for determining the active path 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:
a. 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.
b. 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 these have lower
origin codes that incomplete routes (routes whose origin is unknown).
c. Depending on whether nondeterministic routing table path selection behavior is
configured, there are two possible cases:
Routing Engine
Routing
Table
Packet Forwarding Engine
Internet
Processor
ASIC
Forwarding
Table
Forwarding
Table