vpn-target (VSI-BGPAD view)

Function

The vpn-target command associates a VSI in a BGP AD VPLS domain with one or more VPN targets.

The undo vpn-target command deletes the association between a VSI and VPN targets.

By default, a VSI is not associated with any VPN target. The association must be configured when a VSI is created.

Format

vpn-target { vpnTargetValue } &<1-16> [ both | import-extcommunity | export-extcommunity ]

undo vpn-target { all | { vpnTargetValue } &<1-16> } [ both | import-extcommunity | export-extcommunity ]

Parameters

Parameter Description Value
vpnTargetValue

Associates a VPN target with a VSI.

The format of a VPN target can be one of the following:

  • 16-bit AS number:32-bit user-defined number. For example, 1:3. An AS number ranges from 0 to 65535, and a user-defined number ranges from 0 to 4294967295. The AS number and user-defined number cannot be both 0s. This means that the VPN target value cannot be 0:0.
  • 32-bit IP address:16-bit user-defined number. For example, 192.168.122.15:1. An IP address ranges from 0.0.0.0 to 255.255.255.255, and a user-defined number ranges from 0 to 65535.
  • Integral 4-byte AS number:2-byte user-defined number, for example, 65537:3. An AS number ranges from 65536 to 4294967295. A user-defined number ranges from 0 to 65535. The AS number and user-defined number cannot be both 0s. That is, a VPN target cannot be 0:0.
  • 4-byte AS number in dotted notation:2-byte user-defined number, for example, 0.0:3 or 0.1:0. A 4-byte AS number in dotted notation is in the format of x.y, where x and y are integers that range from 1 to 65535 and from 0 to 65535, respectively. A user-defined number ranges from 0 to 65535. The AS number and user-defined number cannot be both 0s. That is, a VPN target cannot be 0.0:0.
both

Specifies the extended community attributes of the received and sent routing information.

-

import-extcommunity

Receives routing information carrying specified extended community attributes.

-

export-extcommunity

Specifies the extended community attributes carried in routing information to be sent.

-

all

Deletes all VPN targets.

-

Views

VSI-BGPAD view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
l2vpn write

Usage Guidelines

Usage Scenario

VPN targets can be used in a BGP AD VPLS domain to control the route advertisement and communication between nodes. When a PE advertises routing information to other PEs of different VSIs, it adds export VPN targets to the routing information. When the PE receives routing information from other PEs, it uses import VPN targets to determine whether to import the routing information to the VSIs on it.

Prerequisites

A VPLS ID has been configured for the VSI.

Configuration Impact

After the vpn-target command is run, the PE only advertises the routing information that contains the export VPN targets and imports the routing information that contains the import VPN targets. Two PEs are allowed to communicate with each other only when the VPN targets carried in their exchanged routing information match.

Precautions

A PW can be set up between two VSIs in a BGP AD VPLS domain only when the import VPN target associated with a VSI is the same as the export VPN target associated with the other VSI.

Example

# Configure a VSI named company2, and associate the VSI with import VPN targets 4:4 and 5:5 and with export VPN targets 3:3 and 5:5.
<HUAWEI> system-view
[~HUAWEI] mpls
[*HUAWEI-mpls] quit
[*HUAWEI] mpls l2vpn
[*HUAWEI-l2vpn] quit
[*HUAWEI] vsi company2
[*HUAWEI-vsi-company2] bgp-ad
[*HUAWEI-vsi-company2-bgpad] vpls-id·100:1
[*HUAWEI-vsi-company2-bgpad] vpn-target 3:3 export-extcommunity
[*HUAWEI-vsi-company2-bgpad] vpn-target 4:4 import-extcommunity
[*HUAWEI-vsi-company2-bgpad] vpn-target 5:5 both
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >