- Table of Contents
-
- 03-Layer 2—LAN Switching Command Reference
- 00-Preface
- 01-MAC address table commands
- 02-Bulk interface commands
- 03-Ethernet interface commands
- 04-Ethernet link aggregation commands
- 05-M-LAG commands
- 06-Port isolation commands
- 07-VLAN commands
- 08-MVRP commands
- 09-Loopback, null, and inloopback interface commands
- 10-QinQ commands
- 11-VLAN mapping commands
- 12-Loop detection commands
- 13-Spanning tree commands
- 14-LLDP commands
- 15-L2PT commands
- 16-Service loopback group commands
- 17-Layer 2 forwarding commands
- Related Documents
-
Title | Size | Download |
---|---|---|
15-L2PT commands | 88.93 KB |
Contents
L2PT commands
display l2protocol statistics
Use display l2protocol statistics to display Layer 2 Protocol Tunneling (L2PT) statistics.
Syntax
display l2protocol statistics [ interface interface-type interface-number ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
interface interface-type interface-number: Specifies a Layer 2 Ethernet or aggregate interface by its type and number. If you do not specify this option, the command displays L2PT statistics for all Layer 2 Ethernet and aggregate interfaces.
Examples
# Display L2PT statistics for all Layer 2 Ethernet and aggregate interfaces.
<Sysname> display l2protocol statistics
L2PT statistics information on interface Bridge-Aggregation1:
Protocol Encapsulated Decapsulated Forwarded Dropped
CDP 0 0 0 0
DLDP 0 3 0 0
EOAM 0 2 0 0
GVRP 8 4 9 2
LACP 0 0 0 0
LLDP 0 3 0 0
MVRP 0 0 0 0
PAGP 0 1 0 0
PVST 0 0 0 0
STP 5 5 5 0
Tunnel N/A N/A 100 10
VTP 0 6 0 0
UDLD 0 0 0 0
DTP 0 0 0 0
CFD 0 0 0 0
userpro 0 0 0 0
L2PT statistics information on interface HundredGigE1/0/1:
Protocol Encapsulated Decapsulated Forwarded Dropped
CDP 0 0 0 0
DLDP 2 3 3 0
EOAM 5 2 9 0
GVRP 8 4 9 2
LACP 0 0 0 0
LLDP 3 3 3 3
MVRP 0 0 0 0
PAGP 5 1 7 3
PVST 0 0 0 0
STP 5 5 5 0
Tunnel N/A N/A 100 10
VTP 0 6 0 0
UDLD 0 0 0 0
DTP 0 0 0 0
CFD 0 0 0 0
userpro 0 0 0 0
Table 1 Command output
Field |
Description |
Encapsulated |
Number of encapsulated packets. The number increases by 1 when the interface receives and encapsulates a protocol packet from a customer network. For protocol Tunnel, which represents tunneled packets, this field displays N/A. |
Decapsulated |
Number of decapsulated packets. The number increases by 1 when the interface receives and decapsulates a tunneled packet from the service provider network. For protocol Tunnel, which represents tunneled packets, this field displays N/A. |
Forwarded |
Number of forwarded packets. The number increases by 1 when the interface receives a protocol packet and forwards it. The number increases by 1 for protocol Tunnel when the interface receives a tunneled packet and forwards it. |
Dropped |
Number of dropped packets. The number increases by 1 when the interface receives a protocol packet and drops it. Protocol packets dropped by hardware are not counted. The number increases by 1 for protocol Tunnel when the interface receives a tunneled packet and drops it. |
l2protocol rate-limit
Use l2protocol rate-limit to configure the maximum rate of transparently transmitting packets of the specified protocol on an L2TP-enabled interface.
Use undo l2protocol rate-limit to cancel the maximum rate of transparently transmitting packets of the specified protocol on an L2TP-enabled interface.
Syntax
In Layer 2 Ethernet interface view:
l2protocol rate-limit rate [ cdp | dldp | eoam | gvrp | lacp | lldp | mvrp | pagp | pvst | stp | udld | user-defined protocol-name | vtp ]
undo l2protocol rate-limit [ cdp | dldp | eoam | gvrp | lacp | lldp | mvrp | pagp | pvst | stp | udld | user-defined protocol-name | vtp ]
In Layer 2 aggregate interface view:
l2protocol rate-limit rate [ cdp | gvrp | lacp | lldp | mvrp | pagp | pvst | stp | udld | user-defined protocol-name | vtp ]
undo l2protocol rate-limit [ cdp | gvrp | lacp | lldp | mvrp | pagp | pvst | stp | udld | user-defined protocol-name | vtp ]
Default
The device does not limit the rate of transparently transmitting packets of a protocol on an L2TP-enabled interface.
Views
Layer 2 Ethernet interface view
Layer 2 aggregate interface view
Predefined user roles
network-admin
Parameters
rate rate: Specifies the maximum number of packets of the specified protocol that can be transparently transmitted per second on an L2TP-enabled interface. The excessive packets will be dropped. The value range for this argument is 1 to 100.
cdp: Specifies CDP.
dldp: Specifies DLDP.
eoam: Specifies EOAM.
gvrp: Specifies GVRP.
mvrp: Specifies MVRP.
lacp: Specifies LACP.
lldp: Specifies LLDP.
pagp: Specifies PAGP.
pvst: Specifies PVST.
stp: Specifies STP.
udld: Specifies UDLD.
user-defined: Specifies a user-defined Layer 2 protocol.
vtp: Specifies VTP.
Usage guidelines
When there are a large number of protocol packets on the user side, the bandwidth resources of an L2TP-enabled interface might be all occupied by few protocols. As a result, packets of the other protocols will be congested and cannot be transparently transmitted. By executing this command to configure the maximum rate of transparently transmitting packets of each protocol on an interface, you can easily plan the bandwidth ratio for each protocol and fully utilize the interface bandwidth resources.
If you do not specify any protocol, this command configures the maximum rate of transparently transmitting packets of each protocol.
Examples
# Configure the maximum rate of transparently transmitting packets of the LACP protocol as 50 pps on HundredGigE 1/0/1.
<Sysname> system-view
[Sysname] interface hundredgige 1/0/1
[Sysname-HundredGigE1/0/1] l2protocol rate-limit 50 lacp
# Configure the maximum rate of transparently transmitting packets of the LACP protocol as 50 pps on Layer 2 aggregate interface Bridge-Aggregation 1.
<Sysname> system-view
[Sysname] interface bridge-aggregation 1
[Sysname-Bridge-Aggregation1] l2protocol rate-limit 50 lacp
Related commands
l2protocol tunnel dot1q
l2protocol tunnel dot1q
Use l2protocol tunnel dot1q to enable L2PT for a protocol.
Use undo l2protocol tunnel dot1q to disable L2PT for a protocol.
Syntax
In Layer 2 Ethernet interface view:
l2protocol { cdp | dldp | eoam | gvrp | lacp | lldp | mvrp | pagp | pvst | stp | udld | user-defined protocol-name | vtp } tunnel dot1q
undo l2protocol { cdp | dldp | eoam | gvrp | lacp | lldp | mvrp | pagp | pvst | stp | udld | user-defined protocol-name | vtp } tunnel dot1q
In Layer 2 aggregate interface view:
l2protocol { all | cdp | cfd | dldp | dtp | eoam | gvrp | lacp | lldp | mvrp | pagp | pvst | stp | udld | user-defined protocol-name | vtp } tunnel dot1q
undo l2protocol { cdp | gvrp | lacp | lldp | mvrp | pagp | pvst | stp | udld | user-defined protocol-name | vtp } tunnel dot1q
Default
L2PT is disabled for all protocols.
Views
Layer 2 Ethernet interface view
Layer 2 aggregate interface view
Predefined user roles
network-admin
Parameters
cdp: Specifies CDP.
dldp: Specifies DLDP.
eoam: Specifies EOAM.
gvrp: Specifies GVRP.
lacp: Specifies LACP.
lldp: Specifies LLDP. L2PT for LLDP supports LLDP packets from only nearest bridge agents.
mvrp: Specifies MVRP.
pagp: Specifies PAgP.
pvst: Specifies PVST.
stp: Specifies STP.
udld: Specifies UDLD.
user-defined: Specifies a user-defined Layer 2 protocol.
vtp: Specifies VTP.
Usage guidelines
Before you enable L2PT for a protocol on a port, perform the following tasks:
· Enable the protocol on the CE, and disable the protocol on the port.
· Enable L2PT only on customer-facing PE ports. If you enable L2PT on ports connected to the service provider network, L2PT determines that the ports are connected to a customer network.
· Disable the protocol (for example, STP) on the PE ports connecting to an aggregate interface on a CE when the following conditions exist:
¡ The protocol is running on the aggregate interface on the CE.
¡ The aggregate interface on the CE connects to an L2PT-enabled port on the PE.
Do not enable L2PT on a port that is going to join a service loopback group.
You can enable L2PT on member ports of a Layer 2 aggregation group, but the configuration does not take effect.
Examples
# Disable STP and enable L2PT for STP on HundredGigE 1/0/1.
<Sysname> system-view
[Sysname] interface hundredgige 1/0/1
[Sysname-HundredGigE1/0/1] undo stp enable
[Sysname-HundredGigE1/0/1] l2protocol stp tunnel dot1q
# Disable STP and enable L2PT for STP on Bridge-Aggregation 1.
<Sysname> system-view
[Sysname] interface bridge-aggregation 1
[Sysname-Bridge-Aggregation1] undo stp enable
[Sysname-Bridge-Aggregation1] l2protocol stp tunnel dot1q
l2protocol tunnel-dmac
Use l2protocol tunnel-dmac to set the destination multicast MAC address for tunneled packets of all protocols.
Use undo l2protocol tunnel-dmac to restore the default.
Syntax
l2protocol tunnel-dmac mac-address
undo l2protocol tunnel-dmac
Default
The tunneled packets of all protocols use 010f-e200-0003 as the destination multicast MAC address.
Views
System view
Predefined user roles
network-admin
Parameters
mac-address: Specifies a destination multicast MAC address. The available addresses are 0100-0ccd-cdd0, 0100-0ccd-cdd1, 0100-0ccd-cdd2, and 010f-e200-0003.
Examples
# Set the destination multicast MAC address to 0100-0ccd-cdd0 for tunneled packets.
<Sysname> system-view
[Sysname] l2protocol tunnel-dmac 0100-0ccd-cdd0
l2protocol user-defined
Use l2protocol user-defined to configure a user-defined Layer 2 protocol.
Use undo l2protocol user-defined to delete a user-defined Layer 2 protocol.
Syntax
l2protocol user-defined protocol-name protocol-mac protocol-mac [ encap-type { { ethernetii | snap } protocol-type protocol-type-value | llc dsap dsap-value ssap ssap-value } ]
undo l2protocol user-defined protocol-name
Default
No user-defined Layer 2 protocol exists.
Views
System view
Predefined user roles
network-admin
Parameters
user-defined protocol-name: Specifies a user-defined Layer 2 protocol name, a case-sensitive string of 1 to 31 characters. Valid characters are letters and underscores (_).
protocol-mac protocol-mac: Specifies a destination multicast MAC address for a user-defined Layer 2 protocol, in the format of H-H-H. The destination multicast MAC address must be in the following ranges: 0180-c200-0000 to 0180-c200-0013, 0180-c200-0016 to 0180-c200-002f, 010f-e200-0001, 0100-0ccc-cccc, and 0100-0ccc-cccd. When specifying a MAC address, you can omit the starting zeros in each H section. For example, if you enter 180-c200-1, it represents MAC address 0180-c200-0001.
encap-type: Specifies an encapsulation format of a user-defined Layer 2 protocol.
· ethernetii: Specifies the Ethernet II encapsulation format.
· snap: Specifies the SNAP encapsulation format.
· llc: Specifies the LLC encapsulation format.
protocol-type protocol-type-value: Specifies the EtherType value. For the Ethernet II encapsulation format, the value range is 600 to ffff in hexadecimal notation. For the SNAP encapsulation format, the value range is 0 to ffff in hexadecimal notation.
dsap dsap-value: Specifies a DSAP, a hexadecimal value in the range of 00 to ff.
ssap ssap-value: Specifies an SSAP, a hexadecimal value in the range of 00 to ff.
Usage guidelines
To transparently transmit the specific Layer 2 protocol packets on a service provider network, you can use this command to define a Layer 2 protocol by protocol name, packet encapsulation type, destination MAC address, and so on.
For a user-defined protocol, you can specify encapsulation type Ethernet II, SNAP, or LLC. Ethernet II encapsulation and SNAP encapsulation use the destination MAC address and EtherType value to match packets. LLC encapsulation uses the destination MAC address, DSAP, and SSAP to match packets.
When you use this command to define a Layer 2 protocol for transparent transmission, follow these restrictions and guidelines:
· The name of a user-defined Layer 2 protocol cannot be the same as that of a protocol supported by L2TP.
· The destination multicast MAC address of a user-defined Layer 2 protocol cannot be the same as that of a protocol supported by L2TP.
· You cannot define multiple user-defined Layer 2 protocols with different names but the same match criteria.
· You can define up to 20 user-defined Layer 2 protocols for transparent transmission.
· You cannot repeatedly execute this command with the same protocol-name argument but different match criteria to modify an existing user-defined Layer 2 protocol. To modify an existing user-defined Layer 2 protocol, first delete it and create it again.
· If a protocol packet matches both a user-defined Layer 2 protocol and a system protocol (for example, STP or LACP), because a user-defined protocol is of a lower priority, the destination network-side interface will restore the destination MAC address to the specified MAC address for the protocol packet.
Examples
# Configure a user-defined Layer 2 protocol named userprotocol. For the protocol, specify destination multicast MAC address 0180-c200-0001, encapsulation format Ethernet II, and EtherType value 0x600.
<Sysname> system-view
[Sysname] l2protocol user-defined userprotocol protocol-mac 0180-c200-0001 encap-type ethernetii protocol-type 600
Related commands
l2protocol tunnel dot1q
reset l2protocol statistics
Use reset l2protocol statistics to clear L2PT statistics.
Syntax
reset l2protocol statistics [ interface interface-type interface-number ]
Views
User view
Predefined user roles
network-admin
Parameters
interface interface-type interface-number: Specifies a Layer 2 Ethernet or aggregate interface by its type and number. If you do not specify this option, the command clears L2PT statistics on all Layer 2 Ethernet and aggregate interfaces.
Examples
# Clear L2PT statistics on all Layer 2 Ethernet and aggregate interfaces.
<Sysname> reset l2protocol statistics