Enabling VLAN-based Layer 2 Protocol Tunneling on an Interface
Context
Perform the following operations on PEs according to the type of Layer 2 protocol packets to be transparently transmitted.
The l2protocol-tunnel vlan and l2protocol-tunnel commands cannot specify the same protocol type on the same interface. Otherwise, the configurations conflict.
Procedure
- Run system-view
The system view is displayed.
- Run interface interface-type interface-number
The user-side interface view is displayed.
- Configure the link type of the interface as trunk or hybrid.
Set the link type of the interface to trunk.
Run port link-type trunk
The link type of the interface is set to trunk.
Run port trunk allow-pass vlan { { vlan-id1 [ to vlan-id2 ] } &<1-40> | all }
The interface is added to a VLAN.
Set the link type of the interface to hybrid.
Run port link-type hybrid
The link type of the interface is set to hybrid.
Run port hybrid tagged vlan { { vlan-id1 [ to vlan-id2 ] } &<1-10> | all }
The interface is added to the specified VLANs in tagged mode.
The range of VLAN IDs specified in this step must include VLAN IDs of Layer 2 protocol packets from user networks.
- Run l2protocol-tunnel { all | protocol-type | user-defined-protocol protocol-name } vlan { low-id [ to high-id ] } &<1-10>
VLAN-based Layer 2 protocol tunneling is enabled on the interface.
- (Optional) Run l2protocol-tunnel drop-threshold
The drop threshold for Layer 2 protocol packets is configured.
By default, the drop threshold is 0, meaning that interfaces enabled with Layer 2 protocol tunneling do not limit the volume of received Layer 2 protocol packets.
Configuring a drop threshold for Layer 2 protocol packets protects interfaces enabled with Layer 2 protocol tunneling against protocol packet attacks. The interfaces drop excess Layer 2 protocol packets when the number of Layer 2 protocol packets received in 1s exceeds the configured drop threshold.
- Run commit
The configuration is committed.