import-route

Use import-route to redistribute routes from another routing protocol or another IS-IS process.

Use undo import-route to remove the redistribution.

Syntax

import-route protocol [ as-number ] [ process-id | all-processes | allow-ibgp ] [ allow-direct | cost cost-value | cost-type { external | internal } | [ level-1 | level-1-2 | level-2 ] | route-policy route-policy-name | tag tag ] *

undo import-route protocol [ process-id | all-processes ]

Default

IS-IS does not redistribute routes from other routing protocols or processes.

Views

IS-IS IPv4 unicast address family view

Predefined user roles

network-admin

Parameters

protocol: Redistributes routes from a routing protocol.

as-number: Specifies an AS by its number in the range of 1 to 4294967295. This argument applies only to the BGP protocol. If you do not specify this argument, the command redistributes all IPv4 EBGP routes. As a best practice, specify an AS to prevent the system from redistributing excessive routes.

process-id: Specifies a process by its ID in the range of 1 to 65535. It is available only when the protocol is isis, ospf, or rip.

all-processes: Redistributes routes from all the processes of the specified routing protocol. This keyword takes effect only when the protocol is rip, ospf, or isis.

allow-ibgp: Allows redistribution of IBGP routes. It is available when the protocol is BGP.

allow-direct: Redistributes the networks of the local interfaces enabled with the specified routing protocol. By default, the networks of the local interfaces are not redistributed. If you specify both the allow-direct keyword and the route-policy route-policy-name option, make sure the if-match rule defined in the routing policy does not conflict with the allow-direct keyword. For example, if you specify the allow-direct keyword, do not configure the if-match route-type rule for the routing policy. Otherwise, the allow-direct keyword does not take effect.

cost cost-value: Specifies a cost for redistributed routes, which is in the range of 0 to 4261412864.

cost-type { external | internal }: Specifies the cost type. The internal type indicates internal routes, and the external type indicates external routes. If external is specified, the cost of a redistributed route is added by 64 to make internal routes take priority over external routes. The type is external by default. The keywords are available only when the cost type is narrow, narrow-compatible, or compatible.

level-1: Redistributes routes into the Level-1 routing table.

level-1-2: Redistributes routes into both Level-1 and Level-2 routing tables.

level-2: Redistributes routes into the Level-2 routing table. If no level is specified, the routes are redistributed into the Level-2 routing table by default.

route-policy route-policy-name: Redistributes only routes matching the specified routing policy. The route-policy-name argument is a case-sensitive string of 1 to 63 characters.

tag tag: Specifies a tag value for marking redistributed routes, in the range of 1 to 4294967295.

Usage guidelines

IS-IS takes all the redistributed routes as external routes to destinations outside the IS-IS routing domain.

The effective cost varies by cost style. For the styles of narrow, narrow-compatible, and compatible, the cost is in the range of 0 to 63. If the cost is more than 63, 63 is used. For the style of wide or wide-compatible, the configured value is the effective value.

This import-route command cannot redistribute default routes. The command redistributes only active routes. To display route state information, use the display ip routing-table protocol command.

The import-route bgp command redistributes only EBGP routes.

The import-route bgp allow-ibgp command redistributes both EBGP and IBGP routes. Because this command might cause routing loops, use it with caution.

The undo import-route protocol all-processes command removes only the configuration made by the import-route protocol all-processes command, instead of the configuration made by the import-route protocol process-id command.

Examples

# Redistribute static routes into IS-IS, and set the cost for redistributed routes to 15.

<Sysname> system-view
[Sysname] isis 1
[Sysname-isis-1] address-family ipv4
[Sysname-isis-1-ipv4] import-route static cost 15

Related commands

import-route limit