spanning-tree root-guard

Syntax

spanning-tree root-guard

no spanning-tree root-guard

Description

Enables the root guard on the interface.

When a port is enabled as root-guard, it cannot be selected as the root port even if it receives superior STP BPDUs. The port is assigned an "alternate" port role and enters a blocking state if it receives superior MSTP BPDUs.

A superior BPDU contains both "better" information on the root bridge and path cost to the root bridge, which would normally replace the current root bridge selection.

The no form of the command sets the root guard status to the default of disabled on the interface.

Command context

config-if

Authority

Administrators

Examples

Enabling the root guard on interface 1/1/1:

switch(config)# interface 1/1/1
switch(config-if)# spanning-tree root-guard

Disabling root guard on interface 1/1/1:

switch(config)# interface 1/1/1
switch(config-if)# no spanning-tree root-guard