cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
310
Views
10
Helpful
5
Replies

STP cost or priority

trane.m
Beginner
Beginner

Hi,

I'm quite aware of Spanning-tree, it's port states, port roles and so forth.

But i'm not sure about whether i should configure port cost or port priority if i wanted a different alternate or designated port than what the default settings would result in. I don't understand the difference between the two, if any.

Example: 4 switches connected in a circular manner, SW1 being root, SW2 and SW3 are connected to SW1 and SW4. SW4 then calculates the best path to take and finds it to be via SW3. Should i change the port cost or the port priority to make SW4 change the best path to be via SW2 instead?

1 Accepted Solution

Accepted Solutions

 

sure the port cost come first then priority finally the Nbr of port 
same lab before 
with out change the e0/0 and e2/2 port cost 
and since the priority is same then the tie break is Nbr and this make e0/0 win and be FWD and e2/2 BLK 
Screenshot (22).png
Now we change the port cost of e0/0 to be 10000 and e2/2 to be 1000 
since cost of e2/2 is lower than e0/0, the e2/2 win and it FWD and e0/0 in BLK status (SW not compare anymore port priority and Nbr)


Screenshot (24).png
this after I change the e0/0 priority to be 192 and still it BLK because it Cost is must higher than e2/2.
Screenshot (26).png

hope this clear idea of port Cost/priority/Nbr

View solution in original post

5 Replies 5

cost is effect whole STP domain, i.e. all SW will use cost  you enter to calculate the best path.


priority is local in SW and use only by SW, the SW will not send it to other SW and hence other SW (STP domain ) will not effect by it value.

Hi @MHM Cisco World thank you. I have another question:

In a Cisco PDF about configuring MSTP i see this about port priority: "If all interfaces have the same priority value, the MSTP puts the interface with the lowest interface number in the forwarding state and blocks the other interfaces."

And this about port/path cost: "If all interfaces have the same cost value, the MSTP puts the interface with the lowest interface number in the forwarding state and blocks the other interfaces."

But it doesnt say which of the two are considered first for when selecting an interface to put in the forwarding state. Can you tell me?

Screenshot (21).png
this lab show you how SW select port 
the lab is two SW connect to each other via two port e0/0 and e2/2

in show spanning tree 
there is column  prio.Nbr 
since the priority for both port is default 128, then we SW will select the Lower Nbr
you can see that e0/0 have Nbr = 1 and e2/2 = 11 
so the SW select the lowest which is e0/0.
hope this clear the idea of Nbr of Port as tie break in STP.

Hi again @MHM Cisco World

Unfortunately it does not clear the idea. Maybe you misunderstood me. Let me try to explain again:
STP selects which ports should be forwarding based on port priority. STP also selects which ports should be forwarding based on port cost. Which one does it investigate first? STP has to look at one of them first and then, if the interface at the other end has the same value, STP looks at the next parameter.

Hope you understand

 

sure the port cost come first then priority finally the Nbr of port 
same lab before 
with out change the e0/0 and e2/2 port cost 
and since the priority is same then the tie break is Nbr and this make e0/0 win and be FWD and e2/2 BLK 
Screenshot (22).png
Now we change the port cost of e0/0 to be 10000 and e2/2 to be 1000 
since cost of e2/2 is lower than e0/0, the e2/2 win and it FWD and e0/0 in BLK status (SW not compare anymore port priority and Nbr)


Screenshot (24).png
this after I change the e0/0 priority to be 192 and still it BLK because it Cost is must higher than e2/2.
Screenshot (26).png

hope this clear idea of port Cost/priority/Nbr

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Recognize Your Peers