interface-routes
Syntax
interface-routes {
family (inet | inet6) {
export {
lan;
point-to-point;
}
import-primary policy-name;
}
rib-group group-name;
}
Hierarchy Level
[edit logical-systems logical-system-name routing-instances routing-instance-name routing-options], [edit logical-systems logical-system-name routing-options], [edit routing-instances routing-instance-name routing-options], [edit routing-options]
Description
Associate a routing table group with a device’s interfaces, specify routing table groups into which interface routes are imported or exported, or change the preference of primary direct routes.
By default, IPv4 interface routes (also called direct routes) are imported into
routing table inet.0, and IPv6 interface routes are imported into
routing table inet6.0. If you configure alternate routing tables
for use by some routing protocols, the device might need to import the interface
routes into the alternate routing tables. To define the routing tables into which
interface routes are imported, you create a routing table group and associate it
with the routing device’s interfaces.
To create the routing table groups, include the passive statement at
the [edit routing-options] hierarchy level.
If you configured a routing table, configure the OSPF primary instance at the
[edit protocols ospf] hierarchy level with the statements
needed for your network so that routes are installed in inet.0 and
in the forwarding table. Make sure to include the routing table group.
On EX Series switches, only dynamically learned routes can be imported from one routing table group to another.
Options
| export |
Export local routes. Specify the route types to export:
Only local routes on point-to-point interfaces configured with a destination address can be exported. |
| family (inet | inet6) |
Specify the IPv4 or IPv6 address family for the routes to export or import. |
| import-primary policy-name |
Apply a policy to change the route preference value for primary direct
routes that match the policy. The policy should include a term with the
By default, primary direct routes are otherwise always the preferred route for the route destination. See EVPN Host Route Management for Large-Scale Stretched Campus Networks for a use case that includes this option to prefer EVPN Type 5 subnet routes over direct routes as the primary routes for a prefix. That use case describes how to optimize remote host route management in large campus network stretched across multiple locations that use DCI stitching with EVPN Type 2 and EVPN Type 5 routes. |
The remaining statements are explained separately. See CLI Explorer.
Required Privilege Level
routing—To view this statement in the configuration.
routing-control—To add this statement to the configuration.
Release Information
Statement introduced before Junos OS Release 7.4.
Option import-primary added in Junos OS and Junos OS Evolved Release
25.4R1.