Tag Archives: STP

SWITCH 300-115 1.6 Configure and verify spanning tree

1.6.a PVST+, RPVST+, MST

common spanning tree

the original iteration of  802.1q defined a single instance of spanning tree regardless of the amount of vlans; a common tree for the entire network.  when a path is blocked due to convergence, as it will be, there is but one path for the vlans to traverse toward their destination.

this is hardly fair for the multiple vlans that could potentially take more than one path if given the opportunity.

so the common tree does not allow for load balancing although this is ultimately less cpu intensive.

enter mst

by definition mst supports multiple trees similar to pvst, which supports an instance per vlan.  however, unlike pvst, a reduction in the total amount of instances can be achieved by balancing, grouping, vlans together and shipping them across different paths; many vlans;

1.6 Configure and verify spanning tree

1.6.a PVST+, RPVST+, MST

after initializing, a switchport always enters the blocking state

blocking:
the port dumps the frames received
dumps frames switched for forwarding from another switch
doesn’t learn shit
receives bpdu’s

listening:

the port dumps the frames received
dumps frames switched for forwarding from another switch
doesn’t learn shit
receives bpdu’s

learning:
the port dumps the frames received
dumps frames switched for forwarding from another switch
finally gets off its dead ass and learns addresses
receives bpdu’s

forwarding:
receives and forwards frames
forwards frames switched from another port
learns addresses
receives bpdu’s

disabled: guess

 

 

SWITCH 300-115 1.6 Configure and verify spanning tree

1.6.a PVST+, RPVST+, MST

STP elects a root bridge (switch) and puts all root bridge interfaces into forwarding state
Each non root bridge (switch) determines which of its ports has the least administrative cost (best) to the root bridge and STP makes that port that switch’s root port.
The switch with the lowest (best) cost  to the root is put in forwarding state.
The lowest cost switch on each segment is the designated bridge (switch) and the interface on that switch is called the designated port.
            The root bridge’s (switch) ports are always in forwarding state and the root switch (bridge) is always the designated bridge on all connected segments.
            The non root bridge root port is always forwarding. This port receives the lowest cost BPDU from the root.
            Each LAN’s designated port is always forwarding and the bridge forwarding the lowest cost BPDU is the segment’s designated bridge (switch)
             All other ports are blocking. No forwarding frames, no receiving frames.
         At first each switch claims to be root by sending BPDU’s that contain:
                 The root bridge ID- a combination switch priority and MAC address, lower number, higher priority
             The cost to reach the root- again the lower, the better

And it’s own bridge ID

SWITCH 300-115 1.6 Configure and verify spanning tree

1.6.b Switch priority, port priority, path cost, STP timers

STP summary
1.  all bridge (switch ports) stabilize at forwarding or blocking.  Forwarding ports are considered part of the spanning tree.
2.  one switch is elected root, and its ports will all move to forwarding state.
3.  each switch receives hellos from the root, directly or through another switch. The port that receives the least cost BPDU is placed in forwarding and becomes that switch’s root port
4.  for each segment one switch forwards the BPDU with the lowest cost.  That switch becomes that segment’s designated bridge.
5.  the other interfaces are placed in blocking
6.  the root sends BPDU’s every 2 seconds. This time interval can be modified and will be noted in the BPDU.
7.  if max-age elapses (20 seconds, default) and no BPDU, panic ensues and the spanning tree changes.
8.  forward delay (default 15 seconds) is the time it takes for a port to transition through the dumbass states to forwarding. (listening, 15 seconds, learning 15 seconds)
9.  when a switch goes into listening, it sends a TCN BPDU (topology change notification) through the new path to the root. Other switches will refresh their tables with the new entry.

10. spanning tree creates these delays to prevent transitional loops

2.1.f Implement and troubleshoot spanning-tree

2.1.f [ii] Switch priority, port priority, path cost, STP timers

there are four ways to identify the root switch:

dls1#sh spann

VLAN0001
Spanning tree enabled protocol ieee
Root ID    Priority    32769
Address     0016.479e.4500
This bridge is the root 
Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec

Bridge ID  Priority    32769  (priority 32768 sys-id-ext 1)
Address     0016.479e.4500
Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec
Aging Time  300 sec

Interface           Role Sts Cost      Prio.Nbr Type
——————- —- — ——— ——– ——————————–
Fa0/1               Desg FWD 19        128.3    P2p
Fa0/7               Desg FWD 19        128.9    P2p
Fa0/8               Desg FWD 19        128.10   P2p
Fa0/9               Desg FWD 19        128.11   P2p
Fa0/10              Desg FWD 19        128.12   P2p
Fa0/11              Desg FWD 19        128.13   P2p
Fa0/12              Desg FWD 19        128.14   P2p
1.  the first entry lists the mac of the root. the second entry lists the mac of the local switch. if they are the same… bingo

2. this bridge is the root (patently obvious)

3. there is no root port on a root switch; also no alt or blk, hence all roles are designated.

4. the status line reads all fwd

here is a command i should use more often; nice and simple:

dls1 sh span root

dls2 sh span root

note root cost on root port is 0. note root cost on dls2. note timers. no root port on dls1 (naturally) but root port on dls2 is identified.