The l2protocol-tunnel enable command enables Layer 2 protocol tunneling on an interface.
The undo l2protocol-tunnel enable command disables Layer 2 protocol tunneling on an interface.
The l2protocol-tunnel disable command disables Layer 2 protocol tunneling on an interface.
By default, Layer 2 protocol tunneling is disabled on an interface.
l2protocol-tunnel { all | { protocol-type } &<1-16> | user-defined-protocol protocol-name } enable
l2protocol-tunnel { all | { protocol-type } &<1-16> | user-defined-protocol protocol-name } disable
undo l2protocol-tunnel { { protocol-type } &<1-16> | user-defined-protocol protocol-name } enable
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:
NOTE:
|
user-defined-protocol protocol-name |
Enables or disables transparent transmission of packets of a specified 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. |
Usage Scenario
Layer 2 protocol tunneling is often configured on an interface connecting the PE and CE. After Layer 2 protocol tunneling is enabled, Layer 2 protocol packets received from the user network need to be sent to the CPU and the destination MAC address in the packets needs to be replaced. On the ISP network, Layer 2 protocol packets are directly forwarded.
Generally, the l2protocol-tunnel command is run on user-side interfaces of PEs.
Prerequisites
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 enable command, run the l2protocol-tunnel user-defined-protocol command to define characteristic information about the Layer 2 protocol.
STP packets have a default group 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.
To improve system performance, do not add service-irrelevant interfaces to the VLAN on which Layer 2 protocol tunneling is enabled.
You can configure the l2protocol-tunnel enable command on Layer 3 main interfaces and sub-interfaces only when the interfaces are on the S5720-HI, S5730-HI, S5731-H, S5731-S, S5731S-H, S5731S-S, S5732-H, S6720-HI, S6730-H, S6730S-H, S6730-S, and S6730S-S and these interfaces are bound to VSIs.