130
[DeviceC] stp vlan 10 20 40 enable
5.
Configure Device D:
# Set the spanning tree mode to PVST.
<DeviceD> system-view
[DeviceD] stp mode pvst
# Enable the spanning tree feature globally and in VLAN 20, VLAN 30, and VLAN 40.
[DeviceD] stp global enable
[DeviceD] stp vlan 20 30 40 enable
Verifying the configuration
When the network is stable, you can use the
display stp brief
command to display brief spanning
tree information on each device.
# Display brief spanning tree information on Device A.
[DeviceA] display stp brief
VLAN ID Port Role STP State Protection
10 HundredGigE1/0/1 DESI FORWARDING NONE
10 HundredGigE1/0/3 DESI FORWARDING NONE
20 HundredGigE1/0/1 DESI FORWARDING NONE
20 HundredGigE1/0/2 DESI FORWARDING NONE
20 HundredGigE1/0/3 DESI FORWARDING NONE
30 HundredGigE1/0/2 DESI FORWARDING NONE
30 HundredGigE1/0/3 ROOT FORWARDING NONE
# Display brief spanning tree information on Device B.
[DeviceB] display stp brief
VLAN ID Port Role STP State Protection
10 HundredGigE1/0/2 DESI FORWARDING NONE
10 HundredGigE1/0/3 ROOT FORWARDING NONE
20 HundredGigE1/0/1 DESI FORWARDING NONE
20 HundredGigE1/0/2 DESI FORWARDING NONE
20 HundredGigE1/0/3 ROOT FORWARDING NONE
30 HundredGigE1/0/1 DESI FORWARDING NONE
30 HundredGigE1/0/3 DESI FORWARDING NONE
# Display brief spanning tree information on Device C.
[DeviceC] display stp brief
VLAN ID Port Role STP State Protection
10 HundredGigE1/0/1 ROOT FORWARDING NONE
10 HundredGigE1/0/2 ALTE DISCARDING NONE
20 HundredGigE1/0/1 ROOT FORWARDING NONE
20 HundredGigE1/0/2 ALTE DISCARDING NONE
20 HundredGigE1/0/3 DESI FORWARDING NONE
40 HundredGigE1/0/3 DESI FORWARDING NONE
# Display brief spanning tree information on Device D.
[DeviceD] display stp brief
VLAN ID Port Role STP State Protection
20 HundredGigE1/0/1 ALTE DISCARDING NONE
20 HundredGigE1/0/2 ROOT FORWARDING NONE
20 HundredGigE1/0/3 ALTE DISCARDING NONE
30 HundredGigE1/0/1 ROOT FORWARDING NONE