Creating Routing Tables
The Junos OS can maintain one or more routing tables, thus allowing the software to store route information learned from different protocols separately. For example, it is common for the routing software to maintain unicast routes and multicast routes in different routing tables. You also might have policy considerations that would lead you to create separate routing tables to manage the propagation of routing information.
Creating routing tables is optional. If you do not create any, the Junos OS uses its default routing tables, which are inet.0 for IP version 4 (IPv4) unicast routes, inet6.0 for IP version 6 (IPv6) unicast routes, inet.1 for the IPv4 multicast forwarding cache, and inet.3 for IPv4 MPLS. If Multiprotocol BGP (MBGP) is enabled, inet.2 is used for Subsequent Address Family Indicator (SAFI) 2 routes. If you configure a routing instance, the Junos OS creates the default unicast routing table instance-name.inet.0. If you configure a flow route, the Junos OS creates the flow routing table instance-name.inetflow.0.
If you want to add static, aggregate, generated, or martian routes only to the default IPv4 unicast routing table (inet.0), you do not have to create any routing tables because, by default, these routes are added to inet.0. You can add these routes just by including the static, aggregate, generate, and martians statements. For a list of hierarchy levels at which you can include this statement, see the statement summary section for this statement.
To explicitly create a routing table, include the rib statement:
For a list of hierarchy levels at which you can include this statement, see the statement summary section for this statement.
The routing table name, routing-table-name, includes the protocol family, optionally followed by a period and a number. The protocol family can be inet for the IPv4 family, inet6 for the IPv6 family, or iso for the International Standards Organization (ISO) protocol family. The number represents the routing instance. The first instance is 0.
Example: Creating Routing Tables
Create the IPv4 routing table inet.0 and add a static route to it:
Configure the primary IPv6 routing table inet6.0 and add a static route to it:
