The import-route command imports routes from other routing protocols.
The undo import-route command cancels importing routes from other routing protocols.
By default, import no routes from other routing protocols
import-route { { ripng | isis | ospfv3 } [ process-id ] | bgp [ permit-ibgp ] | unr | direct | static } [ [ cost cost | inherit-cost ] | route-policy route-policy-name ] *
undo import-route { { ripng | isis | ospfv3 } [ process-id ] | bgp | unr | direct | static }
| Parameter | Description | Value |
|---|---|---|
| ripng | Specifies the protocol from which routes are imported, as RIPng. | - |
| isis | Specifies the protocol from which routes are imported, as IS-IS. | - |
| ospfv3 | Specifies the protocol from which routes are imported, as OSPFv3. | - |
| process-id | Specifies the ID of a RIPng process. If protocol is ripng, ospfv3, or isis, the process ID needs to be specified. | The value is an integer ranging from 1 to 65535. |
| bgp | Specifies the protocol from which routes are imported, as BGP. | - |
| permit-ibgp | Specifies that IBGP routes are imported by RIPng process in public instance. | - |
| unr | Specifies that the imported routes are User Network Routes (UNRs). | - |
| direct | Specifies directly connected routes are imported. | - |
| static | Specifies static routes are imported. | - |
| cost cost | Specifies the cost of the imported route. If no cost is specified, use the default-cost(RIPng) command to set the default cost. | The value is an integer ranging from 0 to 15. |
| inherit-cost | Specifies to retain the original cost of the imported route. | - |
| route-policy route-policy-name | Specifies the name of the routing policy. | The value must be the name of an existing routing policy. |
Only the routes that match the filtering policy can be added to the RIPng routing table.
You can run one of the following commands to set the cost of the imported route. The following commands are listed in descending order of priorities.
Run the apply cost command to set the cost of a route.
Run the import-route (RIPng) command to set the cost of the imported route.
Run the default-cost(RIPng) command to set the cost of the default route.
# Import a route from IS-IS process 7 and set the cost of the route to 7.
<sysname> system-view [sysname] ripng 1
[sysname-ripng-1] import-route isis 7 cost 7
# Import IBGP routes in RIPng process 1 with cost 5 and route-policy abc.
<sysname> system-view [sysname] ripng 1
[sysname-ripng-1] import-route bgp permit-ibgp cost 5 route-policy abc
# Import UNR routes in RIPng process 1, and specify to retain the original cost of the imported route.
<sysname> system-view
[sysname] ripng 1
[sysname-ripng-1] import-route unr inherit-cost