The import-route command imports routes from other protocols.
The undo import-route command removes the imported routes.
By default, BGP does not import any route from other protocols.
import-route { direct | isis process-id | ospf process-id | rip process-id | unr | static } [ med med | route-policy route-policy-name ] *
import-route { direct | isis process-id | ospfv3 process-id | ripng process-id | unr | static } [ med med | route-policy route-policy-name ] *
undo import-route { direct | isis process-id | ospf process-id | rip process-id | unr | static }
undo import-route { direct | isis process-id | ospfv3 process-id | ripng process-id | unr | static }
| Parameter | Description | Value |
|---|---|---|
| direct | Specifies that BGP can import direct route. | - |
| isis | Specifies that BGP can import isis route. | - |
| process-id | Specifies the ID of an eligible process. | - |
| ospf | Specifies that BGP can import ospf route. | - |
| rip | Specifies that BGP can import rip route. | - |
| unr | Specifies that BGP can import unr route. | - |
| static | Specifies that BGP can import static route. | - |
| ospfv3 | Specifies that BGP can import ospfv3 route. | - |
| ripng | Specifies that BGP can import ripng route. | - |
| med med | Specifies the MED metric of the imported route. | The value is an integer that ranges from 0 to 4294967295. |
| route-policy route-policy-name | Indicates that routes are filtered by using the Route-Policy specified by the parameter when these routes are imported from other protocols. | 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. |
BGP view, BGP-VPN instance IPv4 address family view, BGP-VPN instance IPv6 address family view, BGP-IPv4 unicast address family view, BGP-IPv6 unicast address family view
Usage Scenario
When the import-route static command is run, only active static routes are imported.
Configuration Impact
If the default-route imported (BGP) command has not been used, BGP cannot import default routes when you run the import-route command to import routes from other protocols.