You can verify which switch is the Root with the command:
# sh spanning=tree root
This will show the Per-VLAN STP instance. The Root priority,
the MAC ID of the root Switch for that instance . the end to end cost to get to
the root switch and the timers the particular root bridge is advertising.
NOTE: if you modify the root bridge timers – this will
affect the entire spanning-tree. Setting the timers locally will not affect
your network.
To modify STP you also change the Root port or designated
ports role to change the election process.
The root port is the interface that has the lowest total
cost value in order to reach the root bridge. The switch will look at all BPDU’s
coming in plus the local link cost.
Ex: If my link cost is 10 and the switch receives a BPDU with
a cost of 10, that means the total root path cost will be 20.
Basically adding the cost on a hop-by-hop basic. The one with
the lowest cost will be used as the root port.
If there’s multiple interfaces and there’s an equal cost
value. Then we need to look at the lowest upstream bridge ID, then the lowest upstream
port ID. PORT ID will only because if there’s two or more link’s to the upstream
switch.
This can be change by manually changing the port Cost or bandwidth.
You can also lower the bridge ID to change the priority.
# sh spanning-tree detail will show all local interfaces and
info received in from the upstream switches.
Output from above
command:
Interface
Role Sts Cost Prio.Nbr Type
------------------- ---- --- --------- --------
--------------------------------
Gi0/1
Altn BLK 4 128.49
P2p
Gi0/2
Root FWD 4 128.50 P2p
Note: This only shows the local interface cost not the total
root path cost. This also shows’ the port ID (128) Note: the Port ID doe not
correlate to the actual port #.
To show what’s actually going on you need to show the
detail. EX: sh spanning tree vlan 10 detail
VLAN0010 is executing the rstp compatible Spanning Tree
protocol
Bridge Identifier
has priority 32768, sysid 10, address 000b.5fcc.1a80
Configured hello
time 2, max age 20, forward delay 15, transmit hold-count 6
Current root has
priority 24586, address 001c.586c.5840
Root port is 49
(GigabitEthernet0/1), cost of root path is 4
Topology change flag
not set, detected flag not set
Number of topology
changes 6572 last change occurred 1d02h ago
from GigabitEthernet0/1
Times: hold 1, topology change 35, notification 2
hello 2, max
age 20, forward delay 15
Timers: hello 0,
topology change 0, notification 0, aging 300
Port 49
(GigabitEthernet0/1) of VLAN0010 is root forwarding
Port path cost 4,
Port priority 128, Port Identifier 128.49.
Designated root has
priority 24586, address 001c.586c.5840
Designated bridge
has priority 24586, address 001c.586c.5840
Designated port id
is 128.259, designated path cost 0
Timers: message age
15, forward delay 0, hold 0
Number of
transitions to forwarding state: 1
Link type is
point-to-point by default
BPDU: sent 28,
received 4390693
Port 50
(GigabitEthernet0/2) of VLAN0010 is alternate blocking
Port path cost 4, Port priority 128,
Port Identifier 128.50.
Designated root has
priority 24586, address 001c.586c.5840
Designated bridge
has priority 28682, address 001c.586c.57c0
Designated port id
is 128.202, designated path cost 3
Timers: message age
16, forward delay 0, hold 0
Number of
transitions to forwarding state: 2
Link type is
point-to-point by default
BPDU: sent 3309,
received 4387300
From this output you need to figure what is the total end-to
end cost. In this instance the total cost for GI0/1 is 4. The designated path
cost for GI1/2 is 7 - Port path cost 4,
plus designated path cost 3.
If the local switch port is Blocking, that means on the
other side of that link is the designated port. Likewise the other side of the
local Root port is other switches designated port because designated is always
facing downstream.
No comments:
Post a Comment