10-STP Optional Characteristics Configuration
10-STP Optional Characteristics Configuration
Configuration
Content
Contents
Chapter 1 STP Optional Characteristics Configuration ........................................................................................................ 1
1.1 Introduction of STP Optional Characteristics......................................................................................................... 1
1.1.1 Port Fast.................................................................................................................................................... 1
1.1.2 BPDU Guard ............................................................................................................................................. 2
1.1.3 BPDU Filter ............................................................................................................................................... 2
1.1.4 Uplink Fast ................................................................................................................................................ 3
1.1.5 Backbone Fast .......................................................................................................................................... 4
1.1.6 Root Guard................................................................................................................................................ 6
1.1.7 Loop Guard ............................................................................................................................................... 6
1.2 Configuring STP Optional Characteristics ............................................................................................................. 7
1.2.1 STP Optional Characteristics Configuration Tasks.................................................................................... 7
1.2.2 Configuring Port Fast ................................................................................................................................ 7
1.2.3 Configuring BPDU Guard.......................................................................................................................... 7
1.2.4 Configuring BPDU Filter............................................................................................................................ 8
1.2.5 Configuring Uplink Fast............................................................................................................................. 9
1.2.6 Configuring Backbone Fast....................................................................................................................... 9
1.2.7 Configuring Root Guard ............................................................................................................................ 9
1.2.8 Configuring Loop Guard.......................................................................................................................... 10
- II -
STP Optional Characteristics Configuration
By Port Fast characteristic, a port can be transferred into Forwarding state directly
without transition waiting from Listening to Learning. In SSTP or PVST mode, Port
Fast can be enabled on the ports connected directly to hosts and severs which
connects hosts and severs fast to the network.
Port Fast is applicable to the ports connected directly to a host. These ports will
not receive BPDU, so that it would not influence network topology and can be
transferred into Forwarding States without waiting. If Port Fast is configured on a
port connected to the switch, it is possible to bring up loops.
-1-
STP Optional Characteristics Configuration
Comment:
STP with fast convergence, including RSTP and MSTP, can migrate ports into forwarding state by
default. So it is not necessary to use Port Fast.
The behavior of BPDU Guard is different in various STP modes. If a Port Fast port
configured BPDU Guard receives BPDU in SSTP/PVST mode, it will be forced to
be shutdown and users can only manually recover it afterwards. If a port
configured BPDU Guard receives BPDU in RSTP/MSTP mode, it will be set
Blocking after a while.
BPDU Guard can be configured independently from Port Fast. In all STP modes,
ports configured with BPDU Guard will not send BPDU while they can receive
BPDU and handle it. At RSTP/MSTP mode, you can configure BPDU Guards on
hosts connected ports to prevent devices connected to switch from receiving
BPDU.
BPDU Filter can make the port of switch disabled to send BPDU exteriorly in
SSTP/PVST mode, which is another protection of Ports with Port Fast configured.
If a Port Fast configured with BPDU Filter receives BPDU in SSTP/PVST mode,
its BPDU Filter and Port Fast will be closed automatically so as to restore it to a
common port which must pass the states transition from Listening to Learning to
enter Forwarding.
-2-
STP Optional Characteristics Configuration
Uplink Fast enables the new root port fast enter Forwarding when the switch is not
connected to network root bridge.
If the uplink of a switch is failed(called Direct Link Failure), STP will choose
Alternate port on the redundant link to be the new Root port which will enter
Forwarding state after transition from Listening to Learning.. If Uplink Fast is
configured by global command spanning-tree uplinkfast, new Root port will
directly enter Forwarding without states waiting so as to recover the uplink of the
switch.
Figure 1.3 indicates the work principle of Uplink Fast by a simple network
example. Initially the port connected from C to B is a backup port. After
disconnected from C to Root Bridge A, the previous Alternate port is chosen as
the new root port and start to forward packets immediately.
-3-
STP Optional Characteristics Configuration
Comments:
Uplink Fast feature is applicable for SSTP and PVST with slow convergence. In RSTP and MSTP
mode, the new root port can be fast migrated to Forwarding state without the help of Uplink Fast.
Backbone Fast feature is a supplement of Uplink Fast. Uplink Fast can urge the
redundant link to start work fast at the time when the direct connection to
designated switch fails, while Backbone Fast can detect the indirect connection
failure in the upper layer network and speed up state transition of ports.
Take the network of Figure 1.3 for example, the link L2 from switch C to A is called
Direct Link to root bridge, which can be disconnected by Uplink Fast. While the
link L1 from B to A is indirect connection for switch C. The Indirect Failure of L1
can be processed by Backbone Fast.
-4-
STP Optional Characteristics Configuration
After Backbone Fast enabled, BPDU with low priority is received on the ports with
different roles, which will result in various behaviors of a switch. If the BPDU
packet is received on Alternate port, as the example above, this port will be
transferred to designated port. When Root Port receives low priority packets and
there are no other backup ports, the switch will become the network root.
It is noted that Backbone Fast only skips the Aging time of a port and the new
designated port still needs to pass the states transition from Listening to Learning
to enter Forwarding.
Comment:
Same with Uplink Fast, Backbone Fast is only valid within SSTP or PVST.
-5-
STP Optional Characteristics Configuration
Root Guard can prevent a port from becoming a Root Port for receiving BPDU
with high priority
You can configure Root Guard on the Edge switch so as to prevent Root Bridge
robbed by switches outside administration area. If a Root Guard configured port is
chosen as Root Port for receiving BPDU with higher priority, Root Guord will
automatically set it blocked and restore it to a designated port.
Within port configuration mode, use spanning-tree guard root to enable Root
Guard on the port.
Note:
The behaviors of Root Guard are different in SSTP/PVST or RSTP/MSTP mode. Root port is always
blocked by Root Guard in SSTP/PVST mode, while in RSTP/MSTP mode; ports will be blocked by
Root Guard only when it receives higher priority BPDU. A port originally with Root role will not be
blocked.
Loop Guard can protect Root Port or Alternate Port after being changed into
Designated Port, which can prevents loops caused by not receiving BPDU
continually.
You can use spanning-tree loopguard default to enable Loop Guard on the
switch. After being enabled, the port will be blocked when it is changed from a
Root port or Alternate port to a Designated port. If the port receives BPDU with
high priority again after a while, it will recover from Loop Guard automatically.
Note:
-6-
STP Optional Characteristics Configuration
Port Fast can make a port transferred into Forwarding directly in SSTP/PVST
mode without states transition from Listening to Learning. Port Fast is not valid in
other STP modes.
Use the following commands to configure Port Fast under the global
configuration mode:
Command Purpose
no spanning-tree portfast default Disable Port Fast globally, which does not
influence port configuration
Note:
Port Fast is only available for hosts connected ports,if configured globally,configure BpduGuard or
BpduFilter for preventing at the same time.
Use the following commands to configure Port Fast under switched port
configuration mode:
Command Purpose
BPDU Guard can provide protection for a port when it receives BPDU. The port
configured BPDU Guard will not send BPDU any longer.
-7-
STP Optional Characteristics Configuration
The behaviors of BPDU Guard are different at various STP modes. If a port
configured Port Fast and BPDU Guard receives BPDU in SSTP/PVST mode, it
will be forced to be shutdown, and users can only manually recover it afterwards.
If a port configured BPDU Guard receives BPDU in RSTP/MSTP mode, It will be
set Blocking for some time.
Use the following commands to configure BPDU Guard under the global
configuration mode:
Command Purpose
Comment:
Configuring Port Fast globally may result in broadcast storm. To avoid it, configure BPDU Guard or
Filter simultaneously.
Use the following commands to configure BPDU Guard under switched port
configuration mode:
Command Purpose
With BPDU Filter, the ports of a switch can be disabled to send BPDU exteriorly,
which is another protection for ports with Port Fast configured.
Use the following commands to configure BPDU Filter under the global
configuration mode:
Command Purpose
Comment:
Configuring Port Fast globally may result in broadcast storm. To avoid it, configure BPDU Guard or
Filter simultaneously.
Use the following commands to configure BPDU Filter under switched port
configuration mode:
-8-
STP Optional Characteristics Configuration
Command Purpose
Uplink Fast enables the new root port fast enter Forwarding when the switch is
not connected to network Root Bridge.
Use the following commands to configure Uplink Fast in the global configuration
mode:
Command Purpose
Backbone Fast is a supplement of Uplink Fast. Uplink Fast can urge the
redundant link to start work fast at the time when the direct connection to
designated switch failed, while Backbone Fast can detect the indirect connection
failure in the upper layer network and speed up state transition of ports.
Use the following commands to configure Backbone Fast under the global
configuration mode:
Command Purpose
By Root Guard, a port is prevented from becoming a Root port for receiving the
BPDU with higher priority.
-9-
STP Optional Characteristics Configuration
Use the following commands to configure Root Guard under switched port
configuration mode:
Command Purpose
Loop Guard can protect Root Port or Alternate Port after being changed into
Designated Port, which can prevents loops caused by not receiving BPDU
continually.
Use the following commands to configure Loop Guard in the global configuration
mode:
Command Purpose
Use the following commands to configure Loop Guard under switched port
configuration mode:
Command Purpose
- 10 -