The import-route command configures IS-IS to import routes from other routing protocols.
The undo import-route command restores the default setting.
By default, IS-IS does not import routes from other routing protocols.
import-route { { rip | isis | ospf } [ process-id ] | static | direct | unr | 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 { { rip | isis | ospf } [ process-id ] | direct | unr | bgp [ permit-ibgp ] } inherit-cost [ tag tag | route-policy route-policy-name | [ level-1 | level-2 | level-1-2 ] ] *
import-route limit limit-number [ threshold-alarm upper-limit upper-limit-value lower-limit lower-limit-value ] { level-1 | level-2 | level-1-2 }
undo import-route { { rip | isis | ospf } [ process-id ] | static | direct | unr | 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 { { rip | isis | ospf } [ process-id ] | direct | unr | bgp [ permit-ibgp ] } inherit-cost [ tag tag | route-policy route-policy-name | [ level-1 | level-2 | level-1-2 ] ] *
undo import-route limit [ limit-number ] [ threshold-alarm upper-limit upper-limit-value lower-limit lower-limit-value ] { level-1 | level-2 | level-1-2 }
Parameter | Description | Value |
---|---|---|
rip | Indicates that the routing protocol from which routes are imported is RIP. | - |
isis | Indicates that the routing protocol from which routes are imported is IS-IS. | - |
ospf | Indicates that the routing protocol from which routes are imported is OSPF. | - |
process-id | Specifies a process ID. When protocol is rip, ospf, or isis, a process ID needs to be specified. The default process ID is 1. | The value is an integer that ranges from 1 to 65535. |
static | Indicates that the imported routes are active static routes. | - |
direct | Indicates that the imported routes are direct 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. |
- |
bgp | Indicates that the routing protocol from which routes are imported is 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 switch is wide, compatible, or wide-compatible, the cost types of imported routes are not differentiated between external and internal. |
- |
cost cost | Specifies the cost value of imported routes. | If the cost style of the switch is wide or wide-compatible, the cost value of imported routes ranges from 0 to 4261412864. Otherwise, the value ranges from 0 to 63. The default value is 0. |
tag tag | Specifies the administrative tag of imported routes. | The value is an integer that ranges from 1 to 4294967295. |
route-policy route-policy-name | Specifies the name of a route-policy. | 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. |
level-1 | Indicates that routes are imported into Level-1 routing tables. If no level is specified, routes are imported to Level-2 routing tables by default. | - |
level-2 | Indicates that routes are imported into Level-2 routing tables. If no level is specified, routes are imported to Level-2 routing tables by default. | - |
level-1-2 | Indicates that routes are imported into Level-1 and Level-2 routing tables. If no level is specified, routes are imported to Level-2 routing tables by default. | - |
inherit-cost | Indicates that the original cost value of imported external routes is retained. When IS-IS is configured to retain the original cost value of imported routes, the cost style and cost value cannot be set for the imported routes. | - |
limit limit-number | Specifies the maximum number of external routes allowed to be imported to the IS-IS area. | The value is an integer ranging from 1 to 10000000. |
threshold-alarm | Specifies the alarm threshold for imported routes. | - |
upper-limit upper-limit-value | Specifies the upper alarm threshold for imported routes. | The value is an integer ranging from 1 to 100. The default value is 80. |
lower-limit lower-limit-value | Specifies the lower alarm threshold for imported routes. | The value is an integer ranging from 1 to 100. The default value is 70. |
Usage Scenario
Configure boundary devices in the IS-IS routing domain to advertise default routes to the IS-IS routing domain.
Configure boundary devices in the IS-IS routing domain to import routes from other routing domains into the IS-IS routing domain.
If there are multiple boundary devices in the IS-IS routing domain, optimal routes destined for another routing domain need to be selected. This requires all devices in the IS-IS routing domain learn all or some external routes. Configure boundary devices in the IS-IS routing domain to import routes from other routing domains into the IS-IS routing domain. Alternatively, run the route-policy route-policy-name command to import some external routes from other routing domains.
Precautions
When the routes of the other protocols are imported, you can set the cost value and cost style 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 style and cost value of the imported routes cannot be set, and static routes cannot be imported.
After the import-route direct command is executed, routes to the network segment where the IP address of the management interface belongs are also imported in the ISIS routing table. Therefore, use this command with caution.
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 value of the routes to 15.
<HUAWEI> system-view [HUAWEI] isis [HUAWEI-isis-1] import-route static cost 15
# Configure IS-IS to import OSPF routes and retain the original cost value of the routes.
<HUAWEI> system-view [HUAWEI] isis [HUAWEI-isis-1] import-route ospf inherit-cost