import-route(OSPFv3 view)

Function

The import-route command imports external routes. Before the routes are imported, the OSPFv3 process of the route must be active.

The undo import-route command cancels the configuration.

By default, no route of other protocols is imported.

Format

import-route { ospfv3 | isis | ripng } { process-id } [ { cost cost | inherit-cost } | type type | tag tag | { route-policy route-policy-name | route-filter route-filter-name } ] *

undo import-route { ospfv3 | isis | ripng } { process-id }

Parameters

Parameter Description Value
ospfv3

Imports OSPFv3 routes.

-

isis

Imports IS-IS routes.

-

ripng

Imports RIPng routes.

-

process-id

Specifies the process ID of the protocol whose routes are imported.

The value is an integer ranging from 1 to 4294967295.

cost cost

Specifies the cost of the imported route.

The value is an integer ranging from 0 to 16777214.

inherit-cost

Indicates that the imported route inherits the original cost.

-

type type

Indicates the type of the imported route.

The value can be 1 or 2.

  • 1: Type 1 external route
  • 2: Type 2 external route

The default value is 2.

tag tag

Specifies the tag value of the imported VPN routes.

The value is an integer ranging from 0 to 4294967295. The default value is 1.

route-policy route-policy-name

Imports only the route that matches the specified route-policy.

The name is a string of 1 to 200 case-sensitive characters, with spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string.

route-filter route-filter-name

Specifies the name of a route-filter. Only the routes that match the route-filter can be imported.

The value is a string of 1 to 200 case-sensitive characters, spaces not supported. If parameters are included in the referenced route-filter, specify values for them in the format of (var1, var2, ...var8) behind the route-filter name. A maximum of eight parameters can be specified, and each value ranges from 1 to 200 characters.

Views

OSPFv3 view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
ospf write

Usage Guidelines

Usage Scenario

common

Prerequisites

A route-policy must have been created using the route-policy command when you run the import-route command to import external routes based on the route-policy.

After a route-policy is configured, the OSPFv3 process imports only the routes that match the policy. This prevents devices from receiving unneeded routes.

For an OSPF process that is not bound to a VPN instance or is bound to a VPN instance but the vpn-instance-capability simple command is run, only EBGP routes are imported after the import-route bgp command is configured. IBGP routes are also imported after the import-route bgp permit-ibgp command is configured. If IBGP routes are imported, routing loops may occur. In this case, run the preference (OSPFv3) and preference (BGP) commands to prevent loops by specifying priorities of OSPFv3 and BGP routes. If IBGP routes need to be imported, configure the import-route bgp permit-ibgp command, and run the preference (OSPFv3) and preference (BGP) commands to set the priority of OSPFv3 ASE routes lower than that of IBGP routes (priority value of OSPFv3 ASE routes larger than that of IBGP routes).

For an OSPF process that is bound to a VPN instance and the vpn-instance-capability simple command is not run, configuring the import-route bgp command imports both EBGP routes and IBGP routes, no matter whether the import-route bgp permit-ibgp command is configured. If the import-route bgp permit-ibgp and default-route-advertise (OSPFv3) commands are both configured, the active IBGP default routes can be imported into OSPFv3.

Follow-up Procedure

After the import-route command is used, you can run the display ospfv3 routing command to view the OSPFv3 routing table where external routes are imported.

Example

# Import the routes discovered by OSPFv3 process 160 to OSPFv3 process 100.
<HUAWEI> system-view
[~HUAWEI] ospfv3 100
[*HUAWEI-ospfv3-100] import-route ospfv3 160
# Import type 2 ISIS routes, with cost 50.
<HUAWEI> system-view
[~HUAWEI] ospfv3 1
[*HUAWEI-ospfv3-1] import-route isis 1 type 2 cost 50
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >