128# Configure the device as the root bridge of VLAN 40.[DeviceC] stp vlan 40 root primary# Enable the spanning tree feature globally and in VLAN 10, VLAN 20, and VLAN 40.[DeviceC] stp global enable[DeviceC] stp vlan 10 20 40 enable5. Configure Device D:# Set the spanning tree mode to PVST. 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 enableVerifying the configurationYou can use the display stp brief command to display brief spanning tree information on each deviceafter the network is stable.# Display brief spanning tree information on Device A.[DeviceA] display stp briefVLAN ID Port Role STP State Protection10 Ten-GigabitEthernet1/0/1 DESI FORWARDING NONE10 Ten-GigabitEthernet1/0/3 DESI FORWARDING NONE20 Ten-GigabitEthernet1/0/1 DESI FORWARDING NONE20 Ten-GigabitEthernet1/0/2 DESI FORWARDING NONE20 Ten-GigabitEthernet1/0/3 DESI FORWARDING NONE30 Ten-GigabitEthernet1/0/2 DESI FORWARDING NONE30 Ten-GigabitEthernet1/0/3 ROOT FORWARDING NONE# Display brief spanning tree information on Device B.[DeviceB] display stp briefVLAN ID Port Role STP State Protection10 Ten-GigabitEthernet1/0/2 DESI FORWARDING NONE10 Ten-GigabitEthernet1/0/3 ROOT FORWARDING NONE20 Ten-GigabitEthernet1/0/1 DESI FORWARDING NONE20 Ten-GigabitEthernet1/0/2 DESI FORWARDING NONE20 Ten-GigabitEthernet1/0/3 ROOT FORWARDING NONE30 Ten-GigabitEthernet1/0/1 DESI FORWARDING NONE30 Ten-GigabitEthernet1/0/3 DESI FORWARDING NONE# Display brief spanning tree information on Device C.[DeviceC] display stp briefVLAN ID Port Role STP State Protection10 Ten-GigabitEthernet1/0/1 ROOT FORWARDING NONE10 Ten-GigabitEthernet1/0/2 ALTE DISCARDING NONE20 Ten-GigabitEthernet1/0/1 ROOT FORWARDING NONE20 Ten-GigabitEthernet1/0/2 ALTE DISCARDING NONE20 Ten-GigabitEthernet1/0/3 DESI FORWARDING NONE40 Ten-GigabitEthernet1/0/3 DESI FORWARDING NONE