< Home

vpn-target (MPLS-L2VPN instance view)

Function

The vpn-target command associates a particular VPN with one or more VPN targets (VTs).

The undo vpn-target command deletes the VTs associated with a particular VPN.

By default, no VPN target is specified for an L2VPN.

Format

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

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

Parameters

Parameter Description Value
vpn-target Adds a VPN target to the VPN. A VPN target can use any of the following formats:
  • 16-bit AS number:32-bit user-defined number

    For example, 1:3.

    An AS number ranges from 0 to 65535. A user-defined number ranges from 0 to 4294967295. The AS number and the user-defined number cannot be 0s at the same time. That is, a VPN target 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. 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.

-
import-extcommunity Receives routing information carrying specified extended community attributes. -
export-extcommunity Specifies the extended community attributes carried in routing information to be sent. -
both Specifies the extended community attributes of the received and the sent routing information. -
all Deletes all the VTs. -

Views

MPLS-L2VPN instance view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

In a Kompella VLL networking, you can use this command to set the VPN target attribute for an L2VPN instance. The VPN target is used to set up a remote PW.

Precautions

If you do not specify any keywords, both is used by default.

Before configuring a VPN target, configure the Route Distinguisher (RD) for the L2VPN instance.

Example

# Configure the VTs for an L2VPN named vpn1.

<HUAWEI> system-view
[HUAWEI] mpls l2vpn vpn1 encapsulation vlan
[HUAWEI-mpls-l2vpn-vpn1] vpn-target 100:1
[HUAWEI-mpls-l2vpn-vpn1] vpn-target 1:1 2:2 export-extcommunity
[HUAWEI-mpls-l2vpn-vpn1] vpn-target 1.2.3.4:11 12:12 import-extcommunity

# Delete the VT of vpn1.

<HUAWEI> system-view
[HUAWEI] mpls l2vpn vpn1 encapsulation vlan
[HUAWEI-mpls-l2vpn-vpn1] undo vpn-target 12:12 import-extcommunity

# Delete all the VTs of vpn1.

<HUAWEI> system-view
[HUAWEI] mpls l2vpn vpn1 encapsulation vlan
[HUAWEI-mpls-l2vpn-vpn1] undo vpn-target all
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic