1-36 
Configuration Prerequisites 
MSTP runs normally on the switch. 
Configuring BPDU Guard 
Configuration procedure 
Follow these steps to configure BPDU guard: 
To do...  Use the command...  Remarks 
Enter system view 
system-view 
— 
Enable the BPDU guard 
function 
stp bpdu-protection 
Required 
The BPDU guard function is 
disabled by default. 
 
Configuration example 
# Enable the BPDU guard function. 
<Sysname> system-view 
[Sysname] stp bpdu-protection 
Configuring Root Guard 
Configuration procedure 
Follow these steps to configure the root guard function in system view: 
To do...  Use the command...  Remarks 
Enter system view 
system-view 
— 
Enable the root guard function 
on specified ports 
stp interface interface-list 
root-protection 
Required 
The root guard function is 
disabled by default. 
 
Follow these steps to enable the root guard function in Ethernet port view: 
To do...  Use the command...  Remarks 
Enter system view 
system-view 
— 
Enter Ethernet port view 
Interface interface-type 
interface-number 
— 
Enable the root guard function 
on the current port 
stp root-protection 
Required 
The root guard function is 
disabled by default. 
 
Configuration example 
# Enable the root guard function on GigabitEthernet 1/0/1. 
1)  Perform this configuration in system view 
<Sysname> system-view