import-rib (BGP-IPv4 unicast address family view)

Function

The import-rib command imports public network BGP routes or BGP routes in a specified VPN instance into the public network BGP 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 the public network BGP routing table.

Format

import-rib vpn-instance vpn-instance-name [ 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 ]

import-rib vpn-instance vpn-instance-name include-label-route [ valid-route ] [ route-policy route-policy-name | route-filter route-filter-name ]

undo import-rib vpn-instance vpn-instance-name [ 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 ]

undo import-rib vpn-instance vpn-instance-name include-label-route [ valid-route ] [ route-policy route-policy-name | route-filter route-filter-name ]

Parameters

Parameter Description Value
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.

valid-route

Imports only valid routes of a specified route type.

-

route-policy route-policy-name

Specifies the name of a route-policy to filter routes.

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.

public

Indicates the public network instance.

-

labeled-unicast

Indicates the routing-table is in the BGP labeled address family.

-

include-label-route

Includes labeled routes received from BGP peers as well as locally and remotely leaked VPN routes.

-

Views

BGP-IPv4 unicast address family view, BGP view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
bgp write

Usage Guidelines

Usage Scenario

To configure a device to import public network BGP routes or BGP routes in a specified VPN instance into the public network BGP routing table, run the import-rib public command in the BGP view or BGP-IPv4 unicast address family view.

To configure a device to import BGP routes from a specified VPN instance into the public network BGP routing table, run the import-rib vpn-instance command in the BGP view or BGP-IPv4 unicast address family view.

To configure a device to import public network labeled routes into the public network BGP routing table, run the import-rib public labeled-unicast command in the BGP view or BGP-IPv4 unicast address family view. To configure the device to import labeled routes from a specified VPN instance into the public network BGP routing table, run the import-rib vpn-instance labeled-unicast command in the BGP view or BGP-IPv4 unicast 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.

Example

# Configure a device to import BGP routes from a VPN instance named vpna to the public network instance's BGP routing table.
<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] vpn-target 111:1 both
[*HUAWEI-vpn-instance-vpna-af-ipv4] quit
[*HUAWEI-instance-vpna] quit
[*HUAWEI] bgp 100
[*HUAWEI-bgp] import-rib vpn-instance vpna
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >