< Home

import-route (OSPFv3)

Function

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

The undo import-route command stops importing external routes.

By default, no route of other protocols is imported.

Format

import-route { bgp [ permit-ibgp ] | unr | direct | ripng help-process-id | static | isis help-process-id | ospfv3 help-process-id } [ { cost cost | inherit-cost } | type type | tag tag | route-policy route-policy-name ]*

undo import-route { bgp | unr | direct | ripng help-process-id | static | isis help-process-id | ospfv3 help-process-id }

Parameters

Parameter Description Value

bgp

Specifies the protocol from which routes are imported, as bgp.

-

permit-ibgp

IBGP routes that are permitted to be imported. The import of IBGP routes may cause route loops. Therefore, this command must not be configured unless it is necessary.

-

unr

Specifies the imported source routing protocol as unr.

User Network Route (UNR) is allocated if dynamic routing protocols cannot be used when users are getting online.

-

direct

Specifies the imported source routing protocol as direct.

-

ripng

Specifies the protocol from which routes are imported, as ripng.

-

static

Specifies the imported source routing protocol as static.

-

isis

Specifies the protocol from which routes are imported, as isis.

-

ospfv3

Specifies the protocol from which routes are imported, as ospfv3.

-

help-process-id

Specifies the process ID of the imported source protocol.

The value is an integer ranging from 1 to 65535.

cost cost

Indicates the cost of the imported route.

The value is an integer ranging from 1 to 16777214. By default, it is 1.

inherit-cost

Indicates the original cost of the imported routes.

-

type type

Specifies the type of the external routes.

The value is an integer ranging from 1 to 2. By default, it is 2.
  • 1: Type 1 external route
  • 2: Type 2 external route

tag tag

Specifies the tag value of the imported routes.

The value is an integer that ranges from 0 to 4294967295. By default, the value is 1.

route-policy route-policy-name

Specifies the name of the routing policy. Only the routes that match the route-policy-name are imported.

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

Views

OSPFv3 view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

On a non-PE device, 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 preferences 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 preference of OSPFv3 ASE routes lower than that of IBGP routes (preference value of OSPFv3 ASE routes larger than that of IBGP routes).

On a PE, 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 or not. If the import-route bgp permit-ibgp command and the default-route-advertise (OSPFv3) command are both configured, the active IBGP default routes can be imported into OSPFv3.

After the import-route direct command is executed, routes to the network segment where the IPv6 address of the management interface belongs are also imported in the OSPFv3 routing table. Therefore, use this command with caution.

Precautions

Creating a route-policy before it is referenced is recommended. If a nonexistent route-policy is referenced using the command, all the routes learned by the specified protocol are imported to the OSPFv3 routing table.

Example

# Import the RIPng route of type 2. The cost of the route is 50.

<HUAWEI> system-view
[HUAWEI] ospfv3 1
[HUAWEI-ospfv3-1] import-route ripng 1 type 2 cost 50

# OSPFv3 process 100 imports the routes discovered by OSPFv3 process 160.

<HUAWEI> system-view
[HUAWEI] ospfv3 100
[HUAWEI-ospfv3-100] import-route ospfv3 160
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >