Routing Databases Overview
The Junos OS maintains two databases for routing information:
- Routing table—Contains all the routing information learned by all routing protocols.
- Forwarding table—Contains the routes actually used to forward packets through the router.
In addition, the interior gateway protocols (IGPs), IS-IS, and OSPF maintain link-state databases.
This section includes the following topics:
- Routing Protocol Databases
- Junos Routing Tables
- Forwarding Tables
- How the Routing and Forwarding Tables Are Synchronized
Routing Protocol Databases
Each IGP routing protocol maintains a database of the routing information it has learned from other routers running the same protocol and uses this information as defined and required by the protocol. IS-IS and OSPF use the routing information they received to maintain link-state databases, which they use to determine which adjacent neighbors are operational and to construct network topology maps.
IS-IS and OSPF use the Dijkstra algorithm, and RIP and RIPng use the Bellman-Ford algorithm to determine the best route or routes (if there are multiple equal-cost routes) to reach each destination and install these routes into the Junos OS routing table.
When you configure a protocol on an interface, you must also configure a protocol family on that interface.
Junos Routing Tables
The Junos OS routing table is used by the routing protocol process to maintain its database of routing information. In this table, the routing protocol process stores statically configured routes, directly connected interfaces (also called direct routes or interface routes), and all routing information learned from all routing protocols. The routing protocol process uses this collected routing information to select the active route to each destination, which is the route that actually is used to forward packets to that destination.
By default, the Junos OS maintains three routing tables: one for unicast routes, another for multicast routes, and a third for MPLS. You can configure additional routing tables to support situations where you need to separate a particular group of routes or where you need greater flexibility in manipulating routing information. In general, most operations can be performed without resorting to the complexity of additional routing tables. However, creating additional routing tables has several specific uses, including importing interface routes into more than one routing table, applying different routing policies when exporting the same route to different peers, and providing greater flexibility with incongruent multicast topologies.
Each routing table is identified by a name, which consists of the protocol family followed by a period and a small, nonnegative integer. The protocol family can be inet (Internet), iso (ISO), or mpls (MPLS). The following names are reserved for the default routing tables maintained by the Junos OS:
- inet.0—Default IP version 4 (IPv4) unicast routing table
- inet6.0—Default IP version 6 (IPv6) unicast routing table
- instance-name.inet.0—Unicast routing table for a particular routing instance
- inet.1—Multicast forwarding cache
- inet.2—Unicast routes used for multicast reverse path forwarding (RPF) lookup
- inet.3—MPLS routing table for path information
- mpls.0—MPLS routing table for label-switched
path (LSP) next hops

Note: For clarity, this manual contains general discussions of routing tables as if there were only one table. However, when it is necessary to distinguish among the routing tables, their names are explicitly used.
Forwarding Tables
The Junos OS installs all active routes from the routing table into the forwarding table. The active routes are used to forward packets to their destinations.
The Junos kernel maintains a master copy of the forwarding table. It copies the forwarding table to the Packet Forwarding Engine, which is the part of the router responsible for forwarding packets.
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. Figure 1 illustrates how the routing tables are synchronized.
Figure 1: Synchronizing Routing Exchange Between the Routing and Forwarding Tables

Hide Navigation Pane
Show Navigation Pane
Download
SHA1