Enabling Layer 2 Protocol Tunneling on an Interface
Context
Perform the following operations on PEs based on the required Layer 2 protocol tunneling mode.
The l2protocol-tunnel and l2protocol-tunnel vlan 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.
- Run port link-type hybrid
The link type of the interface is set to hybrid.
- Run port hybrid pvid vlan vlan-id
The default VLAN of the interface is configured.
- Run port hybrid untagged vlan vlan-id
The interface is added to the default VLAN in untagged mode.
The VLAN tag specified in step 5 must be the same as that specified in step 4.
- Run l2protocol-tunnel { all | protocol-type | user-defined-protocol protocol-name } enable
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.