The import-rib command imports public network BGP routes or BGP routes in a specified VPN instance into a BGP-labeled-VPN instance routing table.
The undo import-rib command cancels the configuration.
By default, a device does not import public network BGP routes or BGP routes in a VPN instance into a BGP-labeled-VPN instance routing table.
import-rib { public | vpn-instance vpn-instance-name } [ include-label-route ] [ valid-route ] [ route-policy route-policy-name | route-filter route-filter-name ]
import-rib { public | vpn-instance vpn-instance-name } labeled-unicast [ valid-route ] [ route-policy route-policy-name | route-filter route-filter-name ]
undo import-rib { public | vpn-instance vpn-instance-name } [ include-label-route ] [ valid-route ] [ route-policy route-policy-name | route-filter route-filter-name ]
undo import-rib { public | vpn-instance vpn-instance-name } labeled-unicast [ valid-route ] [ route-policy route-policy-name | route-filter route-filter-name ]
Parameter | Description | Value |
---|---|---|
public |
Indicates the public network instance. |
- |
vpn-instance vpn-instance-name |
Specifies the name of a VPN instance. |
The value is a string of 1 to 31 case-sensitive characters, spaces not supported. In addition, the VPN instance name must not be _public_. When double quotation marks are used around the string, spaces are allowed in the string. |
include-label-route |
Includes labeled routes received from BGP peers as well as locally and remotely leaked VPN routes. |
- |
valid-route |
Imports only valid routes of a specified route type. |
- |
route-policy route-policy-name |
Specifies the name of a route-policy. |
The name is a string of 1 to 200 case-sensitive characters, with spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string. |
route-filter route-filter-name |
Specifies the name of a route-filter. |
The value is a string of 1 to 200 case-sensitive characters, spaces not supported. If parameters are included in the referenced route-filter, specify values for them in the format of (var1, var2, ...var8) behind the route-filter name. A maximum of eight parameters can be specified, and each value ranges from 1 to 200 characters. |
labeled-unicast |
Indicates the routing-table is in the BGP labeled address family. |
- |
Usage Scenario
To configure a device to import public network BGP routes into a BGP-labeled-VPN instance routing table, run the import-rib public command in the BGP-labeled-VPN instance IPv4 address family view.
To configure a device to import BGP routes from a specified VPN instance into a BGP-labeled-VPN instance routing table, run the import-rib vpn-instance command in the BGP-labeled-VPN instance IPv4 address family view. To configure a device to import labeled routes from a specified VPN instance into a BGP-labeled-VPN instance routing table, run the import-rib vpn-instance labeled-unicast command in the BGP-labeled-VPN instance IPv4 address family view.Precautions
If the route-policy route-policy-name parameter is specified in the import-rib vpn-instance command, the if-match interface command configuration in the route-policy will not take effect.
The import-rib command configuration does not take effect for unlabeled routes that are leaked locally or remotely. Nor does this configuration take effect for the routes imported using the import-route command or network command.<HUAWEI> system-view [~HUAWEI] ip vpn-instance vpna [*HUAWEI-vpn-instance-vpna] ipv4-family [*HUAWEI-vpn-instance-vpna-af-ipv4] route-distinguisher 100:1 [*HUAWEI-vpn-instance-vpna-af-ipv4] quit [*HUAWEI-vpn-instance-vpna] quit [*HUAWEI] bgp 100 [*HUAWEI-bgp] vpn-instance vpna [*HUAWEI-bgp-instance-vpna] quit [*HUAWEI-bgp] ipv4-labeled-unicast vpn-instance vpna [*HUAWEI-bgp-labeled-vpna] import-rib public