The l2protocol-tunnel vlan command enables VLAN-based Layer 2 protocol tunneling on an interface.
The undo l2protocol-tunnel vlan command disables VLAN-based Layer 2 protocol tunneling on an interface.
By default, VLAN-based Layer 2 protocol tunneling is disabled on an interface.
l2protocol-tunnel { all | { protocol-type } &<1-15> | user-defined-protocol protocol-name } vlan { low-id [ to high-id ] } &<1-10>
undo l2protocol-tunnel { all | { protocol-type } &<1-15> | user-defined-protocol protocol-name } vlan { low-id [ to high-id ] } &<1-10>
Parameter |
Description |
Value |
---|---|---|
all |
Enables or disables transparent transmission of packets of all standard Layer 2 protocols and user-defined Layer 2 protocols. |
- |
protocol-type |
Enables or disables transparent transmission of packets of a specified Layer 2 protocol. |
The protocol type can be:
|
user-defined-protocol protocol-name |
Enables or disables transparent transmission of packets of a user-defined Layer 2 protocol. protocol-name specifies the name of a user-defined protocol. |
The value is a string of 1 to 31 characters without spaces. When double quotation marks are used around the string, spaces are allowed in the string. |
low-id |
Specifies the start VLAN ID. |
The value is an integer that ranges from 1 to 4094. The value must be smaller than the end VLAN ID. |
high-id |
Specifies the end VLAN ID. |
The value is an integer that ranges from 1 to 4094. The value must be greater than the start VLAN ID. |
Ethernet interface view, GE interface view, XGE interface view, 100GE interface view, 40GE interface view, MultiGE interface view, port group view, 25GE interface view, Eth-Trunk interface view
After a user-side interface of a PE on an ISP network is enabled to transparently transmit Layer 2 protocol packets, the interface directly forwards Layer 2 protocol packets sent from a user network instead of sending the packets to the CPU. In this way, Layer 2 protocol packets are transparently transmitted through the ISP network.
The l2protocol-tunnel vlan command is usually used on user-side interfaces of PEs.
The l2protocol-tunnel vlan command enables an interface to transparently transmit Layer 2 protocol packets from the specified VLANs. The l2protocol-tunnel command enables an interface to transparently transmit all Layer 2 protocol packets.
The l2protocol-tunnel vlan and l2protocol-tunnel commands cannot specify the same protocol type on the same interface. Otherwise, the configurations conflict.
Before specifying a user-defined protocol in the l2protocol-tunnel vlan command, run the l2protocol-tunnel user-defined-protocol command to define characteristic information about the Layer 2 protocol.
STP packets have a default MAC address for replacing the original destination MAC address. For packets of other Layer 2 protocols, you need to configure a global group MAC address to replace the destination MAC address. For details, see l2protocol-tunnel group-mac.
In addition, the VLAN specified in the command must be the static VLAN, but not the VLAN dynamically created by GVRP or VCMP.
If the l2protocol-tunnel vlan command is run more than once, all configurations take effect.
# Enable GE0/0/1 to transparently transmit LACP packets with VLAN tags ranging from 100 to 200.
<HUAWEI> system-view [HUAWEI] vlan batch 100 to 200 [HUAWEI] interface gigabitethernet 0/0/1 [HUAWEI-GigabitEthernet0/0/1] port link-type trunk [HUAWEI-GigabitEthernet0/0/1] port trunk allow-pass vlan 100 to 200 [HUAWEI-GigabitEthernet0/0/1] l2protocol-tunnel lacp vlan 100 to 200