The import-rib command imports public network BGP routes or BGP routes in a specified VPN instance into a BGP-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-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-VPN instance routing table, run the import-rib public command in the BGP-VPN instance IPv4 address family view.
To configure a device to import BGP routes from a specified VPN instance into a BGP-VPN instance routing table, run the import-rib vpn-instance command in the BGP-VPN instance IPv4 address family view. To configure a device to import public network labeled routes or labeled routes in a specified VPN instance into a BGP-VPN instance routing table, run the import-rib vpn-instance labeled-unicast command in the BGP-VPN instance IPv4 address family view.Precautions
If the route-policy-name parameter is specified in the import-rib command, the if-match interface command configuration will become ineffective.
BGP IPv4 route import between instances does not take effect for routes imported between local VPN instances or routes imported in Import or Network mode.<HUAWEI> system-view [~HUAWEI] ip vpn-instance vpn1 [*HUAWEI-vpn-instance-vpn1] ip vpn-instance vpn1 [*HUAWEI-vpn-instance-vpn1-af-ipv4] route-distinguisher 100:1 [*HUAWEI-vpn-instance-vpn1-af-ipv4] vpn-target 100:1 both [*HUAWEI-vpn-instance-vpn1-af-ipv4] quit [*HUAWEI] bgp 100 [*HUAWEI-bgp] ipv4-family vpn-instance vpn1 [*HUAWEI-bgp-vpn1] import-rib public valid-route