Two terms—import and export—explain how routes move between the routing protocols and the routing table (see Figure 5):
![]() |
Note: The process of moving routes between a routing protocol and the routing table is described always from the point of view of the routing table. That is, routes are imported into a routing table from a routing protocol and they are exported from a routing table to a routing protocol. Remember this distinction when working with routing policies. |
Figure 5: Importing and Exporting Routes

When evaluating routes for export, the Routing Engine uses only active routes from the routing table. For example, if a routing table contains multiple routes to the same destination and one route has a preferable metric, only that route is evaluated. In other words, an export policy does not evaluate all routes; it evaluates only those routes that a routing protocol is allowed to advertise to a neighbor. For more information about the active path selection algorithm, see the JUNOS Routing Protocols Configuration Guide.
![]() |
Note: By default, the Border Gateway Protocol (BGP) advertises active routes. However, you can configure BGP to advertise inactive routes, which go to the same destination as other routes but have less preferable metrics. For more information about advertising inactive routes, see the JUNOS Routing Protocols Configuration Guide. |
Table 9 lists the routing protocols from which the routing table can import routes and to which the routing table can export routes. Table 9 also lists direct and explicitly configured routes, which for the purposes of this table are considered a pseudoprotocol. (An explicitly configured route is a route that you have configured. Direct routes are not explicitly configured; they are created as a result of IP addresses being configured on an interface.) Explicitly configured routes include aggregate, generated, local, and static routes. (An aggregate route is a route that distills groups of routes with common addresses into one route. A generated route is a route used when the routing table has no information about how to reach a particular destination. A local route is an IP address assigned to a router interface. A static route is an unchanging route to a destination.)
The policy framework software treats direct and explicitly configured routes as if they are learned through routing protocols; therefore, they can be imported into the routing table. Routes cannot be exported from the routing table to the pseudoprotocol, because this protocol is not a real routing protocol. However, aggregate, direct, generated, and static routes can be exported from the routing table to routing protocols, whereas local routes cannot.
For information about the default routing policies for each routing protocol, see Table 11. For information about the import and export routing policies supported for each routing protocol and the level at which you can apply these policies, see Table 9.
Table 9: Protocols That Can Be Imported to and Exported from the Routing Table
Table 10 lists the routing tables affected by default and user-defined routing policies and the types of routes that each routing table stores.
Table 10: Routing Tables Affected by Routing Policies
![]() |
Note: The discussion in the rest of this chapter assumes that the routing table is inet.0 unless explicitly stated otherwise. |
For more information about routing tables, see the JUNOS Routing Protocols Configuration Guide.