1-35Configuration procedureFollow these steps to configure the root guard function in system view:To do... Use the command... RemarksEnter system view system-view —Enable the root guard function onspecified portsstp interface interface-listroot-protectionRequiredThe root guard function is disabledby default.Follow these steps to enable the root guard function in Ethernet port view:To do... Use the command... RemarksEnter system view system-view —Enter Ethernet port view Interface interface-typeinterface-number —Enable the root guard function onthe current port stp root-protectionRequiredThe root guard function is disabledby default.Configuration example# Enable the root guard function on GigabitEthernet 1/0/1.1) Perform this configuration in system view system-view[Sysname] stp interface GigabitEthernet 1/0/1 root-protection2) Perform this configuration in Ethernet port view system-view[Sysname] interface GigabitEthernet 1/0/1[Sysname-GigabitEthernet1/0/1] stp root-protectionConfiguring Loop GuardA switch maintains the states of the root port and other blocked ports by receiving and processingBPDUs from the upstream switch. These BPDUs may get lost because of network congestions orunidirectional link failures. If a switch does not receive BPDUs from the upstream switch for certainperiod, the switch selects a new root port; the original root port becomes a designated port; and theblocked ports turns to the forwarding state. This may cause loops in the network.The loop guard function suppresses loops. With this function enabled, if link congestions orunidirectional link failures occur, both the root port and the blocked ports become designated ports andturn to the discarding state. In this case, they stop forwarding packets, and thereby loops can beprevented.