113
Usage guidelines
In STP or RSTP mode, the command output is sorted by port name.
• If you do not specify a port, this command applies to all ports.
• If you specify a port list, this command applies to the specified ports.
In PVST mode, the command output is sorted by VLAN ID and by port name in each VLAN.
• If you do not specify a VLAN or port, this command applies to all ports in all VLANs.
• If you only specify a VLAN list but not a port, this command applies to all ports in the specified
VLANs.
• If you only specify a port list but not a VLAN, this command applies to the specified ports in all
VLANs.
• If you specify both a VLAN list and a port list, this command applies to the ports in the specified
VLANs.
In MSTP mode, the command output is sorted by MSTI ID and by port name in each MSTI.
• If you do not specify an MSTI or port, this command applies to all MSTIs on all ports.
• If you specify an MSTI list but not a port, this command applies to all ports in the specified
MSTIs.
• If you specify a port list but not an MSTI, this command applies to all MSTIs on the specified
ports.
• If you specify both an MSTI list and a port list, this command applies to the specified ports in the
specified MSTIs.
During network convergence, the most recent spanning tree information is not displayed.
Examples
# In MSTP mode, display the brief spanning tree status and statistics for MSTI 0 on ports
GigabitEthernet 1/0/1 through GigabitEthernet 1/0/4.
<Sysname> display stp instance 0 interface gigabitethernet 1/0/1 to gigabitethernet 1/0/4
brief
MST ID Port Role STP State Protection
0 GigabitEthernet1/0/1 ALTE DISCARDING LOOP
0 GigabitEthernet1/0/2 DESI FORWARDING NONE
0 GigabitEthernet1/0/3 DESI FORWARDING NONE
0 GigabitEthernet1/0/4 DESI FORWARDING NONE
# In PVST mode, display the brief spanning tree status and statistics for VLAN 2 on ports
GigabitEthernet 1/0/1 through GigabitEthernet 1/0/4.
<Sysname> system-view
[Sysname] stp mode pvst
[Sysname] display stp vlan 2 interface gigabitethernet 1/0/1 to gigabitethernet 1/0/4 brief
VLAN ID Port Role STP State Protection
2 GigabitEthernet1/0/1 ALTE DISCARDING LOOP
2 GigabitEthernet1/0/2 DESI FORWARDING NONE
2 GigabitEthernet1/0/3 DESI FORWARDING NONE
2 GigabitEthernet1/0/4 DESI FORWARDING NONE
Table 25 Command output
Field Description
MST ID MSTI ID in the MST region.
Port Port name, corresponding to each MSTI or VLAN.