< Home

mpls l2vc

Function

The mpls l2vc command creates a Martini VLL.

The undo mpls l2vc command deletes the Martini VLL from an interface.

By default, no Martini L2VPN connection is created.

Format

mpls l2vc { ip-address | pw-template pw-template-name } * vc-id [ group-id group-id | tunnel-policy policy-name | [ control-word | no-control-word ] | [ raw | tagged ] | mtu mtu-value | [ secondary | bypass ] | ignore-standby-state ] *

undo mpls l2vc { ip-address | pw-template pw-template-name } * vc-id [ group-id group-id | tunnel-policy policy-name | [ control-word | no-control-word ] | [ raw | tagged ] | mtu mtu-value | [ secondary | bypass ] | ignore-standby-state ] *

undo mpls l2vc [ secondary | bypass ]

Parameters

Parameter

Description

Value

ip-address

Specifies the LSR ID of a peer device on the PW.

The value is in dotted decimal notation.

pw-template pw-template-name

Specifies the name of a PW template.

The value is a string of 1 to 19 case-sensitive characters, spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string.

vc-id

Specifies a L2VC ID.

The value is an integer that ranges from 1 to 4294967295.

group-id group-id

Specifies a VC group ID. With the VC group ID specified, the system can execute the same operation on a group of VCs; therefore, fewer packets are exchanged between PEs. Only the VCs with the same attribute can be configured with the same VC group ID; otherwise, the PW may be torn down by mistake. This parameter is valid only on sub-interfaces.

The value is an integer that ranges from 1 to 4294967295.

tunnel-policy policy-name

Specifies the name of a tunnel policy.

The value is a string of 1 to 39 case-sensitive characters, spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string.

raw

Removes the provider-tag (P-Tag) from a packet.

NOTE:

This parameter can be used only for Ethernet links.

-

tagged

Retains the P-Tag in a packet

NOTE:

This parameter can be used only for Ethernet links.

-

control-word

Enables the control word function.

-

no-control-word

Disables the control word function.

-

mtu mtu-value

Specifies the MTU value.

NOTE:

This parameter can be configured only on VLANIF interfaces. The MTU of another type of interface or its sub-interface can be configured in the PW template.

The value is an integer that ranges from 46 to 9600. The default value is 1500.

secondary

Indicates a secondary VC. If this parameter is not specified, a primary VC is created. You can configure a secondary VC only when the primary VC exists on the local device.

-

bypass

Indicates that the VC is a bypass VC. The encapsulation type of the bypass VC must be the same as that of the primary VC.

-

ignore-standby-state

Indicates that the PW ignores standby state information sent by the remote device.

-

Views

Interface view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

In a Martini VLL networking, you can run this command to create a VC connection for a Martini VLL.

According to different encapsulation modes on the AC interfaces, the system processes user packets in different ways, as shown in the following tables.

  • Packet processing on the inbound interface in the VLL or PWE3 scenario.

AC Interface Type

Encapsulation Mode of raw

Encapsulation Mode of tagged

Dot1q termination sub-interface

Removes a tag.

No action is required.

Ethernet main interfaces

No action is required.

Adds a tag.

QinQ stacking sub-interface

No action is required.

Adds a tag.

QinQ termination sub-interface (in symmetrical mode)

Removes the outer tag.

No action is required.

QinQ termination sub-interface (in asymmetrical mode)

Removes two tags.

Removes the outer tag.

VLANIF interface (added to the VLAN in default mode)

No action is required.

Adds a tag (default VLAN ID of the interface).

VLANIF interface (added to the VLAN in non-default mode)

Removes the outer tag.

No action is required.

  • Packet processing on the outbound interface in the VLL or PWE3 scenario.

AC Interface Type

Encapsulation Mode of raw

Encapsulation Mode of tagged

Dot1q termination sub-interface

Adds a tag.

Replaces the tag with the tag that is encapsulated on the outbound interface.

Ethernet main interfaces

Adds a tag.

Replaces the tag with the tag that is encapsulated on the outbound interface.

QinQ stacking sub-interface

No action is required.

Removes a tag.

QinQ termination sub-interface (in symmetrical mode)

Adds the outer tag.

Replaces the outer tag with the tag that is encapsulated on the outbound interface.

QinQ termination sub-interface (in asymmetrical mode)

Adds two tags.

Removes the outer tag and then adds two tags that are encapsulated on the outbound interface.

VLANIF interface (added to the VLAN in default mode)

No action is required.

Removes a tag.

VLANIF interface (added to the VLAN in non-default mode)

Adds the outer tag.

Replaces the tag with the tag that is encapsulated on the outbound interface.

Precautions

  • An interface cannot function as an L2VPN AC interface and L3VPN AC interface at the same time. After an interface is bound to an L2VPN, Layer 3 features such as the IP address and routing protocol on this interface become invalid.

  • You must create dynamic VCs on PEs at both ends of a PW to connect the PEs. The destination address of a VC is the LSR ID of the peer PE.

  • You can set attributes for a PW template, including the remote peer, tunnel policy, control word, and VCCV. When configuring an LDP PW, you can directly apply the PW template without specifying attributes for the PW. After setting attributes for a PW template, you can update the PW template at any time. The modified PW template takes effect only after the reset pw command is run.

  • If a PW attribute is specified in the mpls l2vc command, the corresponding PW attribute in the same PW template is invalid.

  • If you do not specify a tunnel policy for a Martini connection, the default tunnel policy is used. By default, the LSP tunnel is preferentially selected and only one tunnel is used for load balancing. If a tunnel policy name is specified but the tunnel policy is not configured, the default tunnel policy is used.

  • The MTU value is specified when you create Martini or PWE3 VLLs and is used for interconnection between the switch and other devices.

  • You must configure the primary PW before configuring the secondary PW and delete the secondary PW before deleting the primary PW.

  • When creating VCs dynamically, the latest configurations of some parameters override the previous ones. The parameters include tunnel-policy tnl-policy-name, control-word, and no-control-word.

  • By default, link type negotiation is enabled globally on the device. If a VLANIF interface is used as an AC-side interface for L2VPN, the configuration conflicts with link type negotiation. In this case, run the lnp disable command in the system view to disable link type negotiation.

  • When configuring BFD for static PW, the VC ID must be specified.

  • If a sub-interface is bound to a VLL, the sub-interface can be deleted only after the sub-interface is unbound from the VLL.

  • If a sub-interface is bound to a VLL, you cannot change the encapsulation type of the main interface.

Example

# Create a Martini connection on the VLANIF interface.

<HUAWEI> system-view
[HUAWEI] vlan batch 10
[HUAWEI] interface vlanif 10
[HUAWEI-Vlanif10] mpls l2vc 10.2.2.9 100

# Create a Martini connection on the GE0/0/1.

<HUAWEI> system-view
[HUAWEI] interface gigabitethernet 0/0/1
[HUAWEI-GigabitEthernet0/0/1] undo portswitch
[HUAWEI-GigabitEthernet0/0/1] mpls l2vc 10.2.2.9 100
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >