Cisco Support Community
Showing results for 
Search instead for 
Did you mean: 

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

spanning tree help

Hi all

I was reading my cisco book this morning, there was some info on spanning tree, basically like a diamond shape connectivity between 4 switches, all of them have connection to each other, what I want to know is, how do I find out what the designated ports are if there are 2 of them on the same switch? OR can there only be one designated port and one root port when connecting directly to other switches, and in this how many blocked ports would there be ?

the book was the icnd2 book.

hope you can help



New Member

Re: spanning tree help

The way you can tell which is actually the designated port that traffic is being sent out on is by looking at your downstream switches and which port is the FWD root port. When you find which port that is do a show cdp neighbor and see which port is connected to it. Remember that all the ports from the root switch are going to be designated (downstream) and the downstream facing switches will have the root ports (Upstream towards the root). If there are multiple trunk ports connected to root bridge than it will put one of the ports in blocking state (depend on which spanning-tree your talking about). you can see this by doing a show spanning vlan #. So you will only see blocking going upstream toward the root. hope this answers you questions.

New Member

Re: spanning tree help

hi there

but in the book, we should be able to work it out by looking at port costs etc.

can a switch have more than one designated port forwarding to another switch ?

New Member

Re: spanning tree help

Yes you can do a show spanning-tree vlan # detail and see which port has the lowest port-priority which is going to effect downstream election for which port is the Root FWD. Unless you change the port-priority or cost spanning-tree will forward out the lowest numbered trunk port. If you look at the show spanning-tree detail you can see this. What you also can do is ping traffic across the switch and take a look at your arp entries. Look at the mac-address and this will tell you which port the traffic is actually going over. Yes a switch can have more than one designated port. Now this does not mean traffic is FWD down that port because it can be blocked by a downstream switch. I drew up some notes for you. Let me know if you need more clarification.

Some quick notes:

- To affect how to the local switch elects the root port change the spanning-tree port-cost on the links. Remember that cost is cumulative throughout the STP domain.

> spanning-tree port-cost # (Higher cost is less prefered)

- To effect how the downstream switch elects its root port change the spanning-tree port-priority. This is only local significant between the two directly connected switches.

> Spanning-tree port-priority # (Highest priority is less preferred)

- When going away from the root of the tree use priority. When going towards the root of the tree use cost.

- Root bridge - What more is there to say than he is the “Master switch” makes all the forwarding decisions to make sure that the environment i sloop free.

- BID (bridge-ID) - made up of a Bridge-ID+Mac address (you can only change the bridge-ID to make root bridge )

- PID (Port-ID) thought I would go through this in there since this is very inportant to know. basically when you do a show spanning tree you can see what priority your port is at. It will be a default 128.X number. What your looking for is the port priority +cost

New Member

Re: spanning tree help


so if if i say change the port priority on switch A, this will help switch B decide which is the best port for the route if tied ?

New Member

Re: spanning tree help

If you change the port-priority from Switch A (per-vlan) to a lower priority than the rest of the ports, than yes Switch B will change its root port to the port that is connected to Switch A that was changed.

Say we have the same priority and the selection is based off the lowest interface number (cost)

SWITCH A - gi0/0 -----------gi0/0 SWITCH B - ROOT

SWITCH A - gi0/1 -----------gi0/1 SWITCH B

If I go under the gi0/1 interface of SWITCH A and change the port-priority for vlan 1

interface gi0/1

spanning-tree vlan 1 port-priority 64

Now go to switch B and do "show spanning-tree vlan 1"

Switch B will now look at the lowest priority to get to the bridge and you ill see that the gi0/1 port on Switch B will move to the root port FWD state. Than (say we are running 802.1D) port gi0/0 on Switch B will transition to the BLK state.

CreatePlease to create content