import-route (IS-IS view)

Function

The import-route command enables IS-IS to import routes from other protocols.

The undo import-route command disables IS-IS from importing routes from other protocols.

By default, IS-IS does not import routes from any other protocol.

Format

import-route { direct | static | unr | rip [ process-id ] | bgp [ permit-ibgp ] } [ cost-type { external | internal } | cost cost | tag tag | { route-policy route-policy-name | route-filter route-filter-name } | [ level-1 | level-2 | level-1-2 ] ] *

import-route { ospf | isis } [ process-id ] [ cost-type { external | internal } | cost cost | tag tag | { route-policy route-policy-name | route-filter route-filter-name } | [ level-1 | level-2 | level-1-2 ] | no-sid ] *

import-route { rip [ process-id ] | bgp [ permit-ibgp ] | direct | unr } inherit-cost [ { level-1 | level-2 | level-1-2 } | tag tag | { route-policy route-policy-name | route-filter route-filter-name } ] *

import-route { ospf | isis } [ process-id ] inherit-cost [ { level-1 | level-2 | level-1-2 } | tag tag | { route-policy route-policy-name | route-filter route-filter-name } | no-sid ] *

undo import-route { direct | static | unr | { ospf | rip | isis } [ process-id ] | bgp }

Parameters

Parameter Description Value
direct

Imports direct routes.

-

static

Imports active static routes.

-

unr

Imports UNR routes.

-

rip

Imports RIP routes.

-

process-id

Specifies the process ID of the imported protocol. By default, the process ID is 1.

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

bgp

Imports BGP routes.

-

permit-ibgp

Imports IBGP routes in a public network instance.

If you do not specify permit-ibgp, the device imports EBGP routes only.

-

cost-type external

Sets the cost type to IS-IS external.

-

internal

Sets the cost type to IS-IS internal.

-

cost cost

Specifies a cost for the imported route.

The value is an integer. The value range varies with the cost type.

  • If the cost type of the device is wide or wide-compatible, the value ranges from 0 to 4261412864.
  • For other cost types, the value ranges from 0 to 63.

The default value is 0.

The cost type can be configured using the cost-style command.

tag tag

Specifies the administrative tag assigned to the imported routes.

The value is an integer ranging from 1 to 4294967295.

route-policy route-policy-name

Specifies the name of a route-policy. The routing policy is used to filter the imported routes so that only some of the routes of other routing domains can be imported.

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 policy. The policy is used to filter the imported routes so that only some of the routes of other routing domains 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.

level-1

Imports routes to the Level-1 routing table.

-

level-2

Imports routes to the Level-2 routing table.

If the level of the routing table to which routes are imported is not specified in the command, the routes are imported to the Level-2 routing table by default.

-

level-1-2

Imports routes to Level-1 and Level-2 routing tables.

-

ospf

Imports OSPF routes.

-

isis

Imports IS-IS routes.

Before you specify this parameter, enable an IS-IS process with a.

process-id different from the local one.

-

no-sid

Specifies that the SID is not imported during route import.

-

inherit-cost

Retains the original cost of the imported route.

If this parameter is specified, no other cost type or cost value can be configured for the imported route, and the imported route cannot be a static route.

-

undo

Imports direct routes.

-

Views

IS-IS view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
isis write

Usage Guidelines

Usage Scenario

When IS-IS and other routing protocols are deployed on a network, you can enable the traffic within an IS-IS domain to reach a destination outside the IS-IS domain using either of the following methods:

  • Run the default-route-advertise command to configure boundary devices in the IS-IS domain to advertise default routes to the IS-IS domain.
  • Run the import-route command to configure boundary devices in the IS-IS domain to import routes from other routing domains into the IS-IS domain.

    If there are multiple boundary devices in the IS-IS domain, optimal routes destined for another routing domain need to be selected. This requires all devices in the IS-IS domain learn all or some external routes.

    Configure boundary devices in the IS-IS domain to import routes from other routing domains into the IS-IS domain. Alternatively, run the route-policy route-policy-name command to import some external routes from other routing domains.

    After the import-route command is run on a device, the device will import external routes and advertise the imported routes in the IS-IS domain.

    The import-route command run in the IS-IS view is valid for a base topology. The import-route command run in the IS-IS topology view is valid for the IS-IS topology or the IS-IS IPv6 topology and can only import the direct, IS-IS, and static routes.

Prerequisites

An IS-IS process has been created using the isis command, and the protocol from which routes are imported has been configured.

Configuration Impact

IS-IS cannot prevent external routing loops. Therefore, avoid the loops caused by manual configurations when configuring IS-IS to import external routes.

After you configure the policy for importing routes using the route-policy parameters, the IS-IS process imports only the routes of the network segments that match the requirements to filter unwanted routes.

Precautions

The import-route (IS-IS) command cannot import the default route of an external protocol. To enable a router to advertise the default route of an external protocol it learns when updating the IS-IS routing table to other routers within the area, run the default-route-advertise (IS-IS) command.

A segment routing-capable device can import IS-IS routes. If labels have been assigned to these routes, the labels are imported to a local process by default and advertised using LSPs, regardless of whether the labels are active.

A segment routing-capable device can import labeled OSPF routes into the IS-IS routing table and use the routes to compute SR LSPs.

Example

# Configure IS-IS to import static routes and set the cost of the route to 15.
<HUAWEI> system-view
[~HUAWEI] isis
[*HUAWEI-isis-1] import-route static cost 15
# In the topology instance named red, configure IS-IS to import static routes, and set the cost of the static routes to 15.
<HUAWEI> system-view
[~HUAWEI] ip topology red
[*HUAWEI] isis 1
[*HUAWEI-isis-1] cost-style wide
[*HUAWEI-isis-1] topology red topology-id 10
[*HUAWEI-isis-1-topology-red] import-route static cost 15
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >