published: 23rd of February 2019
Juniper protocol-independent routing covers IP routing components such as static routes and the various route tables within Junos that are not particular to any dynamic routing protocol.
The RE holds a copy of all routes from all protocols in its routing table. The best routes based on the protocol preference are declared active and placed in the forwarding table. The forwarding table is shared with the PFE.
The PFE stores a local copy of the forwarding table received from the RE containing the best routes to each destination.
Both the layer 2 and layer 3 forwarding tables are received from the RE.
Within Junos there are three types of administrator configurable routes.
A static route defines a destination prefix and the next-hop (IP or label) to reach the destination.
For a route to be present in the routing table, the route must have a valid next-hop. For a next-hop to be valid the router must be able to forward traffic to the next-hop address.
There are a number of next-hop options which can be applied to protocol-independent routes outlined in the table below.
Next-Hop Option | Description | Application |
---|---|---|
Directly Connected IP Address | An adjacent IP address on a physically connected subnet. | Static |
Remote IP Address | A non-adjacent IP address. A recursive looking will be performed to determine the interface leading towards the IP address. | Static |
reject | Assigns the route as a Null route and lookup matching the route are dropped. If packets are dropped due to a rejected route the router will send an ICMP 'Destination Host Unreachable' back to the source. | Static Aggregate |
discard | Same as reject routes except no ICMP messages are sent and the routes are silently dropped. | Static Aggregate |
Qualified Next-Hop | Allows the assignment of multiple next-hop addresses for a prefix. Used with a preference value and equivalent to a floating static routes. | Static |
Label Switched Path (LSP) | Enables the assignment of and MPLS label as a next-hop. Matching route lookups are forwarded with a label value instead of an IP address. | Static |
As well as next-hop options, attributes can also be assigned to all locally configured routes. The various attributes are defined in the table below.
Attribute | Description |
---|---|
active | Default attribute. Removes a route from the routing table if the next-hop become unavailable. |
passive | Opposite of active, allows a route to stay in the routing table if the next-hop become unavailable. |
install | Default attribute. Installs a usable static route into the PFE. |
no-install | Opposite of the install attribute. A usable static route is not installed into the PFE. |
as-path | Manual assignment of BGP AS path attributes to the route. |
community | Manual assignment of BGP communities to the route. |
metric | Use the determine route preference when multiple next-hops to the same destination exist. |
readvertise | Default attribute. Allows a route to be exported from the routing table and redistributed into another routing protocol. |
no-readvertise | Opposite of advertise. Prevents the route from being exported from the routing table and redistributed into another routing protocol. |
preference | Alters the default preference value of a route. |
no-retain | Default attribute. Route is removed from the forwarding table if the routing process is shutdown. |
retain | Opposite of retain. Route will remain in the forwarding table if the routing process is shutdown. |
Aggregate routes are used to announce a collection of multiple smaller routes summarized into a single route announcement.
For an aggregate route to be present in the routing table at least one of its more specific routes must be present in the routing table. Thus the more specific routes are known as contributing routes.
The route with the numerically smallest prefix is selected as the primary contributing route. An administrator can influence the selection using routing policy.
Generated routes are identical to an aggregate route except that a generated route has an IP address defined for its next-hop and the ability to apply the discard option.
Contributing routes must have an IP address for a next-hop or come from a connected P2P interface. Additionally, routes with a next-hop options of either discard or reject cannot contribute.
Martian routes are prefixes that should never be publicly routed on the internet. Prefixes that fall into the category of a martian route will not be placed in the routing table. Additionally, martian routes received via routing protocols will be ignored.
Junos includes a number of different routing tables for various protocols as outlined in the table below.
Table | Description |
---|---|
inet.0 | IPv4 unicast routes. |
inet.1 | IPv4 multicast forwarding cache. |
inet.2 | IPv4 unicast routes for the purpose of Reverse Path Forwarding (RPF) check. |
inet.3 | MPLS LSP egress IP addresses |
inet.4 | Information learned using the multicast source discovery protocol (MSDP). |
inet6.0 | IPv6 unicast routes. |
inet6.1 | IPv6 multicast forwarding cache. |
mpls.0 | Actually a switching table storing MPLS label values. |
bgp.l3vpn.0 | Routing information for BGP L3VPNs. |
bgp.l2vpn.0 | Routing information for BGP L2VPNs. |
When a prefix is learned by more than one protocol Junos selects the most believable route based on the preference. The lower the preference the more believable the route. The default preferences are listed in the table below.
Source | Preference |
---|---|
Direct | 0 |
Local | 0 |
Static | 5 |
RSVP | 7 |
LDP | 9 |
OSPF Internal | 10 |
IS-IS Level 1 Internal | 15 |
IS-IS Level 2 Internal | 18 |
RIP / RIPNG | 100 |
PIM | 105 |
Aggregate / Generated | 130 |
OSPF External | 150 |
IS-IS Level 1 External | 160 |
IS-IS Level 2 External | 165 |
BGP | 170 |
MSDP | 175 |
https://www.juniper.net/documentation/en_US/junos/topics/concept/routing-tables-understanding.html