Importing and Exporting Routes
Two terms—import and export—explain how routes move between the routing protocols and the routing table (see Figure 1):
- When the Routing Engine places the routes of a routing protocol into the routing table, it is importing routes into the routing table.
- When the Routing Engine uses active routes from the routing
table to send a protocol advertisement, it is exporting routes from the routing table.

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 1: 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, 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. |
Protocols That Can Be Imported to and Exported from the Routing Table lists the routing protocols from which the routing table can import routes and to which the routing table can export routes. That topic 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
Default Import and Export Policies for Protocols. 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 Protocols That Can Be Imported to and Exported from the Routing Table.
