The import-route command configures IS-IS to import routes from other protocols.
The undo import-route command configures IS-IS not to import routes from other protocols.
By default, IS-IS does not import routes from any other protocol.
IS-IS view:
import-route { direct | static | unr | { ospf | rip | isis } [ process-id ] | bgp [ permit-ibgp ] } [ cost-type { external | internal } | cost cost | tag tag | route-policy route-policy-name | [ level-1 | level-2 | level-1-2 ] ] *
import-route { { ospf | rip | isis } [ process-id ] | bgp [ permit-ibgp ] | direct | unr } inherit-cost [ { level-1 | level-2 | level-1-2 } | tag tag | route-policy route-policy-name ] *
undo import-route { direct | static | unr | { ospf | rip | isis } [ process-id ] | bgp [ permit-ibgp ] } { cost-type { external | internal } | cost cost | tag tag | route-policy route-policy-name | [ level-1 | level-2 | level-1-2 ] } *
undo import-route { { ospf | rip | isis } [ process-id ] | bgp [ permit-ibgp ] | direct | unr } inherit-cost [ { level-1 | level-2 | level-1-2 } | tag tag | route-policy route-policy-name ] *
| Parameter | Description | Value |
|---|---|---|
| direct | Indicates that the imported routes are direct routes. | - |
| static | Indicates that the imported routes are active static routes. | - |
| 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. |
- |
| ospf | Specifies the protocol, from which routes are imported, as OSPF. | - |
| rip | Specifies the protocol, from which routes are imported, as RIP. | - |
| isis | Specifies the protocol, from which routes are imported, as IS-IS. | - |
| process-id | Specifies the process ID when the protocol is rip, isis, or ospf. By default, the process ID is 1. | The value is an integer ranging from 1 to 65535. |
| bgp | Specifies the protocol, from which routes are imported, as BGP. | - |
| permit-ibgp | Specifies the imported source route as an IBGP route. If you do not configure this parameter, only the EBGP routes are imported. | - |
| cost-type { external | internal } | Indicates the cost type of the imported routes. By
default, the cost type is external. The
configuration of this parameter will affect the costs of imported
routes.
NOTE:
If the cost-style of the router is wide, compatible, or wide-compatible, the imported routes are not differentiated in terms of external or internal. |
- |
| cost cost | Specifies the cost value of the imported route. | The value is an integer which varies with the cost
type.
The cost type can be configured using the cost-style command. |
| tag tag | Indicates the administrative tag assigned to the imported routes. | The value ranges from 1 to 4294967295. |
| route-policy route-policy-name | Specifies the name of the routing policy. | The parameter route-policy-name is a string ranges from 1 to 40. It is case-sensitive. |
| level-1 | Imports the route into Level-1 routing table. | - |
| level-2 | Imports the route into Level-2 routing table. | - |
| level-1-2 | Imports the route into Level-1 and Level-2 routing table. NOTE:
If the level of the routing table to which routes are imported is not specified in the command, the routes are imported to Level-2 routing table by default. |
- |
| inherit-cost | Retains the original cost of the imported external route. When configuring IS-IS to retain the original cost value of the imported route, you cannot set the cost type or cost value for the imported route. | - |
Usage Scenario
Configure boundary devices in the IS-IS domain to advertise default routes to the IS-IS domain.
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.
Prerequisites
You have run the isis command to create an IS-IS process and entered the IS-IS view.
Precautions
When the routes of the other protocols are imported, you can set the cost value and cost type for the imported route. You can also configure IS-IS to retain the original cost value of the imported external route. During route advertisement and route calculation, the original cost values of these routes are used. In this case, the cost type and cost value of the imported route cannot be set, and the static routes cannot be imported.
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.
Creating a route-policy before it is referenced is recommended. By default, nonexistent route-policies cannot be referenced using the command. If the route-policy nonexistent-config-check disable command is run in the system view and a nonexistent route-policy is referenced using the current command, all routes of the specified routing domain are imported to the IS-IS routing table.
# Configure IS-IS to import static routes and set the cost of the route to 15.
<sysname> system-view [sysname] isis [sysname-isis-1] import-route static cost 15
# Configure IS-IS to import an OSPF route and retain the original cost of the route.
<sysname> system-view [sysname] isis [sysname-isis-1] import-route ospf inherit-cost