The mpls switch-l2vc command configures PW label switching on SPEs (Switching provider edge) to implement multi-segment PWs.
The undo mpls switch-l2vc command deletes the PW label switching configuration.
The mpls switch-l2vc command configures QoS parameters for MS-PWs.
The undo mpls switch-l2vc command deletes QoS parameter settings for MS-PWs.
By default, QoS parameters are not configured for MS-PWs.
By default, an SPE does not support PW label switching.
mpls switch-l2vc [ instance-name instance-name ] ip-address vc-id [ cir cir-value [ pir pir-value ] [ qos-profile qos-profile-name ] ] [ tunnel-policy policy-name [ endpoint endpoint-address color color-value ] ] [ oam-packet pop flow-label ] between ip-address vc-id [ cir cir-value [ pir pir-value ] [ qos-profile qos-profile-name ] ] [ tunnel-policy policy-name [ endpoint endpoint-address color color-value ] ] [ oam-packet pop flow-label ] encapsulation { atm-1to1-vcc | atm-1to1-vpc | atm-aal5-pdu | atm-aal5-sdu | atm-nto1-vcc | atm-nto1-vpc | atm-trans-cell | cesopsn-basic | ethernet | fr | hdlc | ip-interworking | ip-layer2 | ppp | satop-e1 | satop-e3 | satop-t1 | vlan | cep } [ control-word-transparent ]
mpls switch-l2vc [ instance-name instance-name ] ip-address vc-id trans trans-label recv received-label [ tunnel-policy policy-name [ endpoint endpoint-address color color-value ] ] between ip-address vc-id trans trans-label recv received-label [ tunnel-policy policy-name [ endpoint endpoint-address color color-value ] ] encapsulation { atm-1to1-vcc | atm-1to1-vpc | atm-aal5-pdu | atm-aal5-sdu | atm-nto1-vcc | atm-nto1-vpc | atm-trans-cell | cesopsn-basic | ethernet | fr | hdlc | ip-interworking | ip-layer2 | ppp | satop-e1 | satop-e3 | satop-t1 | vlan | cep } [ control-word | no-control-word ] { cc { cw | alert } * cv lsp-ping } [ control-word-transparent ]
mpls switch-l2vc [ instance-name instance-name ] ip-address vc-id trans trans-label recv received-label [ cir cir-value [ pir pir-value ] [ qos-profile qos-profile-name ] ] [ tunnel-policy policy-name [ endpoint endpoint-address color color-value ] ] [ oam-packet pop flow-label ] between ip-address vc-id trans trans-label recv received-label [ cir cir-value [ pir pir-value ] [ qos-profile qos-profile-name ] ] [ tunnel-policy policy-name [ endpoint endpoint-address color color-value ] ] [ oam-packet pop flow-label ] encapsulation { atm-1to1-vcc | atm-1to1-vpc | atm-aal5-pdu | atm-aal5-sdu | atm-nto1-vcc | atm-nto1-vpc | atm-trans-cell | cesopsn-basic | satop-e1 | ethernet | fr | hdlc | ip-interworking | ip-layer2 | ppp | satop-e3 | satop-t1 | vlan | cep } [ control-word | no-control-word ] [ control-word-transparent ]
mpls switch-l2vc [ instance-name instance-name ] ip-address vc-id [ cir cir-value [ pir pir-value ] [ qos-profile qos-profile-name ] ] [ tunnel-policy policy-name [ endpoint endpoint-address color color-value ] ] [ oam-packet pop flow-label ] between ip-address vc-id trans trans-label recv received-label [ cir cir-value [ pir pir-value ] [ qos-profile qos-profile-name ] ] [ tunnel-policy policy-name [ endpoint endpoint-address color color-value ] ] [ oam-packet pop flow-label ] encapsulation { atm-1to1-vcc | atm-1to1-vpc | atm-aal5-pdu | atm-aal5-sdu | atm-nto1-vcc | atm-nto1-vpc | atm-trans-cell | ethernet | fr | hdlc | ip-interworking | ip-layer2 | ppp | vlan } [ mtu mtu-value ] control-word cc { cw | alert } * cv lsp-ping [ flow-label { both | send | receive } ] [ control-word-transparent ]
mpls switch-l2vc [ instance-name instance-name ] ip-address vc-id [ cir cir-value [ pir pir-value ] [ qos-profile qos-profile-name ] ] [ tunnel-policy policy-name [ endpoint endpoint-address color color-value ] ] [ oam-packet pop flow-label ] between ip-address vc-id trans trans-label recv received-label [ cir cir-value [ pir pir-value ] [ qos-profile qos-profile-name ] ] [ tunnel-policy policy-name [ endpoint endpoint-address color color-value ] ] [ oam-packet pop flow-label ] encapsulation { atm-1to1-vcc | atm-1to1-vpc | atm-aal5-pdu | atm-aal5-sdu | atm-nto1-vcc | atm-nto1-vpc | atm-trans-cell | ethernet | fr | hdlc | ip-interworking | ip-layer2 | ppp | vlan } [ mtu mtu-value ] [ no-control-word ] cc alert cv lsp-ping [ flow-label { both | send | receive } ] [ control-word-transparent ]
mpls switch-l2vc [ instance-name instance-name ] ip-address vc-id [ cir cir-value [ pir pir-value ] [ qos-profile qos-profile-name ] ] [ tunnel-policy policy-name [ endpoint endpoint-address color color-value ] ] [ oam-packet pop flow-label ] between ip-address vc-id trans trans-label recv received-label [ cir cir-value [ pir pir-value ] [ qos-profile qos-profile-name ] ] [ tunnel-policy policy-name [ endpoint endpoint-address color color-value ] ] [ oam-packet pop flow-label ] encapsulation { atm-1to1-vcc | atm-1to1-vpc | atm-aal5-pdu | atm-aal5-sdu | atm-nto1-vcc | atm-nto1-vpc | atm-trans-cell | ethernet | fr | hdlc | ip-interworking | ip-layer2 | ppp | vlan } [ mtu mtu-value ] [ control-word | no-control-word ] [ flow-label { both | send | receive } ] [ control-word-transparent ]
mpls switch-l2vc [ instance-name instance-name ] ip-address vc-id [ cir cir-value [ pir pir-value ] [ qos-profile qos-profile-name ] ] [ tunnel-policy policy-name [ endpoint endpoint-address color color-value ] ] [ oam-packet pop flow-label ] between ip-address vc-id trans trans-label recv received-label [ cir cir-value [ pir pir-value ] [ qos-profile qos-profile-name ] ] [ tunnel-policy policy-name [ endpoint endpoint-address color color-value ] ] [ oam-packet pop flow-label ] encapsulation { satop-e1 | satop-e3 | satop-t1 } [ mtu mtu-value ] [ control-word | no-control-word ] [ rtp-header ] [ tdm-encapsulation number ] [ flow-label { both | send | receive } ] [ control-word-transparent ]
mpls switch-l2vc [ instance-name instance-name ] ip-address vc-id [ cir cir-value [ pir pir-value ] [ qos-profile qos-profile-name ] ] [ tunnel-policy policy-name [ endpoint endpoint-address color color-value ] ] [ oam-packet pop flow-label ] between ip-address vc-id trans trans-label recv received-label [ cir cir-value [ pir pir-value ] [ qos-profile qos-profile-name ] ] [ tunnel-policy policy-name [ endpoint endpoint-address color color-value ] ] [ oam-packet pop flow-label ] encapsulation cesopsn-basic [ mtu mtu-value ] [ control-word | no-control-word ] [ rtp-header ] [ timeslotnum timeslotnum-value ] [ tdm-encapsulation number ] [ flow-label { both | send | receive } ] [ control-word-transparent ]
mpls switch-l2vc [ instance-name instance-name ] ip-address vc-id [ tunnel-policy policy-name [ endpoint endpoint-address color color-value ] ] between ip-address vc-id [ tunnel-policy policy-name [ endpoint endpoint-address color color-value ] ] backup ip-address vc-id [ tunnel-policy policy-name [ endpoint endpoint-address color color-value ] ] encapsulation { ethernet | fr | hdlc | ip-interworking | ip-layer2 | ppp | vlan | cep } [ control-word-transparent ]
undo mpls switch-l2vc [ instance-name instance-name ] ip-address vc-id [ cir cir-value [ pir pir-value ] [ qos-profile qos-profile-name ] ] [ tunnel-policy policy-name [ endpoint endpoint-address color color-value ] ] [ oam-packet pop flow-label ] between ip-address vc-id [ cir cir-value [ pir pir-value ] [ qos-profile qos-profile-name ] ] [ tunnel-policy policy-name [ endpoint endpoint-address color color-value ] ] [ oam-packet pop flow-label ] encapsulation { atm-1to1-vcc | atm-1to1-vpc | atm-aal5-pdu | atm-aal5-sdu | atm-nto1-vcc | atm-nto1-vpc | atm-trans-cell | cesopsn-basic | ethernet | fr | hdlc | ip-interworking | ip-layer2 | ppp | satop-e1 | satop-e3 | satop-t1 | vlan | cep } [ control-word-transparent ]
undo mpls switch-l2vc all
undo mpls switch-l2vc [ instance-name instance-name ] ip-address vc-id encapsulation { atm-1to1-vcc | atm-1to1-vpc | atm-aal5-pdu | atm-aal5-sdu | atm-nto1-vcc | atm-nto1-vpc | atm-trans-cell | cesopsn-basic | ethernet | fr | hdlc | ip-interworking | ip-layer2 | ppp | satop-e1 | satop-e3 | satop-t1 | vlan | cep }
undo mpls switch-l2vc [ instance-name instance-name ] ip-address vc-id trans trans-label recv received-label [ cir cir-value [ pir pir-value ] [ qos-profile qos-profile-name ] ] [ tunnel-policy policy-name [ endpoint endpoint-address color color-value ] ] [ oam-packet pop flow-label ] between ip-address vc-id trans trans-label recv received-label [ cir cir-value [ pir pir-value ] [ qos-profile qos-profile-name ] ] [ tunnel-policy policy-name [ endpoint endpoint-address color color-value ] ] [ oam-packet pop flow-label ] encapsulation { atm-1to1-vcc | atm-1to1-vpc | atm-aal5-pdu | atm-aal5-sdu | atm-nto1-vcc | atm-nto1-vpc | atm-trans-cell | cesopsn-basic | satop-e1 | ethernet | fr | hdlc | ip-interworking | ip-layer2 | ppp | satop-e3 | satop-t1 | vlan | cep } [ control-word | no-control-word ] [ control-word-transparent ]
undo mpls switch-l2vc [ instance-name instance-name ] ip-address vc-id [ cir cir-value [ pir pir-value ] [ qos-profile qos-profile-name ] ] [ tunnel-policy policy-name [ endpoint endpoint-address color color-value ] ] [ oam-packet pop flow-label ] between ip-address vc-id trans trans-label recv received-label [ cir cir-value [ pir pir-value ] [ qos-profile qos-profile-name ] ] [ tunnel-policy policy-name [ endpoint endpoint-address color color-value ] ] [ oam-packet pop flow-label ] encapsulation { atm-1to1-vcc | atm-1to1-vpc | atm-aal5-pdu | atm-aal5-sdu | atm-nto1-vcc | atm-nto1-vpc | atm-trans-cell | fr | ethernet | hdlc | ip-interworking | ip-layer2 | ppp | vlan } [ mtu mtu-value ] [ control-word | no-control-word ] [ flow-label { both | send | receive } ] [ control-word-transparent ]
undo mpls switch-l2vc [ instance-name instance-name ] ip-address vc-id [ cir cir-value [ pir pir-value ] [ qos-profile qos-profile-name ] ] [ tunnel-policy policy-name [ endpoint endpoint-address color color-value ] ] [ oam-packet pop flow-label ] between ip-address vc-id trans trans-label recv received-label [ cir cir-value [ pir pir-value ] [ qos-profile qos-profile-name ] ] [ tunnel-policy policy-name [ endpoint endpoint-address color color-value ] ] [ oam-packet pop flow-label ] encapsulation { satop-e1 | satop-e3 | satop-t1 } [ mtu mtu-value ] [ control-word | no-control-word ] [ rtp-header ] [ tdm-encapsulation number ] [ flow-label { both | send | receive } ] [ control-word-transparent ]
undo mpls switch-l2vc [ instance-name instance-name ] ip-address vc-id [ cir cir-value [ pir pir-value ] [ qos-profile qos-profile-name ] ] [ tunnel-policy policy-name [ endpoint endpoint-address color color-value ] ] [ oam-packet pop flow-label ] between ip-address vc-id trans trans-label recv received-label [ cir cir-value [ pir pir-value ] [ qos-profile qos-profile-name ] ] [ tunnel-policy policy-name [ endpoint endpoint-address color color-value ] ] [ oam-packet pop flow-label ] encapsulation cesopsn-basic [ mtu mtu-value ] [ control-word | no-control-word ] [ rtp-header ] [ timeslotnum timeslotnum-value ] [ tdm-encapsulation number ] [ flow-label { both | send | receive } ] [ control-word-transparent ]
undo mpls switch-l2vc [ instance-name instance-name ] ip-address vc-id [ tunnel-policy policy-name [ endpoint endpoint-address color color-value ] ] between ip-address vc-id [ tunnel-policy policy-name [ endpoint endpoint-address color color-value ] ] backup ip-address vc-id [ tunnel-policy policy-name [ endpoint endpoint-address color color-value ] ] encapsulation { ethernet | fr | hdlc | ip-interworking | ip-layer2 | ppp | vlan | cep } [ control-word-transparent ]
Parameter | Description | Value |
---|---|---|
instance-name instance-name |
Specifies the name of an L2VPN service. This parameter uniquely identifies an L2VPN service on a PE. |
The value is a string of 1 to 31 case-sensitive characters, spaces not supported. The string can contain spaces if it is enclosed in double quotation marks ("). |
ip-address |
Specifies the destination IPv4 address. |
The value is in dotted decimal notation. |
vc-id |
Specifies the ID of a PW. |
The value is an integer that ranges from 1 to 4294967295. |
cir cir-value |
Specifies the CIR. |
The value is 0 or an integer ranging from 16 to 4294967294, in kbit/s. |
pir pir-value |
Specifies the PIR. |
The value is 0 or an integer ranging from 16 to 4294967294, in kbit/s. Note that:
pir-value and cir-value cannot be both 0s. If cir-value is 0, you must specify pir-value. |
qos-profile qos-profile-name |
Specifies the QoS profile name. |
The value is a string of 1 to 63 case-sensitive characters, spaces not supported. The string can contain spaces if it is enclosed in double quotation marks ("). |
tunnel-policy policy-name |
Specifies the name of a tunnel policy. If it is not specified, the default tunnel policy is used, which preferentially selects LSPs and load balancing is not performed. |
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. |
endpoint endpoint-address |
Specifies the endpoint of an SRv6 TE Policy. |
The value is a 32-digit hexadecimal number, in the format of X:X:X:X:X:X:X:X. |
color color-value |
Specifies the color value of an SRv6 TE Policy. |
The value is an integer that ranges from 0 to 4294967295. |
oam-packet |
Indicates that flow labels are removed from OAM detection packets. |
- |
flow-label |
Indicates the flow-label-based load balancing capability. |
- |
between |
Indicates the MS-PW that corresponds to the PW. |
- |
encapsulation |
Indicates the PW encapsulation type. |
- |
atm-1to1-vcc |
One PW carries the ATM cells of one PVC. |
- |
atm-1to1-vpc |
One PW carries the ATM cells of one PVP. |
- |
atm-aal5-pdu |
One PW carries the AAL5 PDUs of one PVC. |
- |
atm-aal5-sdu |
One PW carries the AAL5 SDUs of one PVC. |
- |
atm-nto1-vcc |
One PW carries the ATM cells of multiple PVCs. |
- |
atm-nto1-vpc |
ATM cells are transmitted over PWE3 VCs. |
- |
atm-trans-cell |
ATM cells are transmitted over PWE3 VCs. |
- |
cesopsn-basic |
Specifies the PW encapsulation type as cesopsn-basic. |
- |
ethernet |
This encapsulation type is used when Ethernet packets do not carry VLAN information. |
- |
fr |
FR provides protocol standards for the data link layer and physical layer. |
- |
ip-interworking |
Enables static PW interworking when devices in the interworking are all provided by Huawei. |
- |
ip-layer2 |
Enables IP interworking for an LDP PW between a Huawei device and a non-Huawei device. ip-layer2 is required for IP interworking between a Huawei device and a non-Huawei device. |
- |
satop-e1 |
SAToP is insensitive to the E1 frame structure and encapsulates a whole E1 frame into a PW packet. |
- |
satop-e3 |
SAToP is insensitive to the E3 frame structure and encapsulates a whole E3 frame into a PW packet. |
- |
satop-t1 |
SAToP is insensitive to the T1 frame structure and encapsulates a whole T1 frame into a PW packet. |
- |
vlan |
This encapsulation type is used when Ethernet packets carry VLAN information. |
- |
cep |
This encapsulation type is used for CEP services. |
- |
control-word-transparent |
Indicates transparent transmission of the control word. By default, transparent transmission of control word is disabled. |
- |
trans-label |
Specifies the outgoing label of the static VC. |
The value is an integer that ranges from 0 to 1048575. |
received-label |
Specifies the incoming label of the static VC. |
The value is an integer that ranges from 0 to 4294967295. |
mtu mtu-value |
Specifies the MTU value. |
- |
control-word |
Indicates the control word function. By default, VCCV in Label Alert mode is enabled. Whether VCCV in control word mode is enabled depends on whether the control word is enabled. |
- |
no-control-word |
Indicates that the control word is disabled. |
- |
tdm-encapsulation number |
Indicates the number of TDM frames encapsulated in a CESoPSN packet. This parameter can be set only if the AC is a TDM link. |
- |
rtp-header |
Indicates that the RTP header is carried in transparently transmitted TDM frames. By default, transparently transmitted TDM frames do not carry the RTP header. |
- |
both |
Indicates both the send and receive capabilities of flow-label-based load balancing for the local device. |
- |
send |
Indicates the send capability of flow-label-based load balancing for the local device. |
- |
receive |
Indicates the receive capability of flow-label-based load balancing for the local device. |
- |
backup |
Indicates the backup PW. |
- |
all |
Indicates that all MS-PWs are deleted. |
- |
Usage Scenario
If the PEs at both ends of a PW are not in the same autonomous system (AS), multi-segment PWs need to be used. In this case, you need to configure switching PWs on the SPEs.
In an L2VPN environment, multiple VPNs may share a tunnel. As a result, VPNs preempt bandwidth. VPN traffic cannot be forwarded or discarded based on service priorities, and non-VPN traffic also preempts VPN bandwidth. The VPN services carried over a tunnel have different resource requirements. The mpls switch-l2vc command sets QoS parameters for the switching PW to meet VPWS resource requirements without affecting the QoS of other VPNs.Prerequisites
MPLS and L2VPN have been enabled.
Configuration Impact
For a dynamic switching PW, the SPE does not negotiate the PW signaling but transparently transmits the PW information of the PEs at both ends.
Running the undo mpls switch-l2vc all command deletes all switching PWs on a device. Therefore, exercise caution when running this command. After the mpls switch-l2vc command is run, PWs carry service packets based on the configured bandwidth.Follow-up Procedure
Run the display mpls switch-l2vc command to check whether the VC status is up.
Precautions
The combination of the Peer IP, PW ID and PW type must be unique on a node. The PW IDs at the two ends of an MS-PW can be the same.
The VCCV feature is enabled by default and does not need to be configured. If the control word function is enabled, VCCV in control word mode is supported by default.<HUAWEI> system-view [~HUAWEI] mpls [*HUAWEI-mpls] quit [*HUAWEI] mpls l2vpn [*HUAWEI-l2vpn] quit [*HUAWEI] mpls switch-l2vc 1.1.1.9 100 between 3.3.3.9 100 encapsulation vlan
<HUAWEI> system-view [~HUAWEI] mpls [*HUAWEI-mpls] quit [*HUAWEI] mpls l2vpn [*HUAWEI-l2vpn] quit [*HUAWEI] tunnel-policy 123 [*HUAWEI-tunnel-policy-123] quit [*HUAWEI] tunnel-policy 456 [*HUAWEI-tunnel-policy-456] quit [*HUAWEI] mpls switch-l2vc 1.1.1.1 100 trans 16 recv 17 cir 100 tunnel-policy 123 between 2.2.2.2 200 trans 18 recv 19 cir 300 tunnel-policy 456 encapsulation vlan
<HUAWEI> system-view [~HUAWEI] mpls [*HUAWEI-mpls] quit [*HUAWEI] mpls l2vpn [*HUAWEI-l2vpn] quit [*HUAWEI] tunnel-policy 123 [*HUAWEI-tunnel-policy-123] quit [*HUAWEI] tunnel-policy 456 [*HUAWEI-tunnel-policy-456] quit [*HUAWEI] mpls switch-l2vc 1.1.1.1 100 cir 100 tunnel-policy 123 between 2.2.2.2 200 trans 17 recv 18 cir 300 tunnel-policy 456 encapsulation vlan
<HUAWEI> system-view [~HUAWEI] mpls [*HUAWEI-mpls] quit [*HUAWEI] mpls l2vpn [*HUAWEI-l2vpn] quit [*HUAWEI] tunnel-policy 123 [*HUAWEI-tunnel-policy-123] quit [*HUAWEI] tunnel-policy 456 [*HUAWEI-tunnel-policy-456] quit [*HUAWEI] mpls switch-l2vc 1.1.1.1 100 cir 100 tunnel-policy 123 between 2.2.2.2 200 cir 300 tunnel-policy 456 encapsulation vlan
<HUAWEI> system-view [~HUAWEI] mpls [*HUAWEI-mpls] quit [*HUAWEI] mpls l2vpn [*HUAWEI-l2vpn] quit [*HUAWEI] mpls switch-l2vc 1.1.1.9 100 between 3.3.3.9 100 trans 200 recv 200 encapsulation vlan mtu 1500