Solved

Switch Port Priority

Posted on 2014-11-23
8
292 Views
Last Modified: 2014-11-24
in the topology below , SW3 is the Root Bridge.SW4 on the right has 2 interfaces connected to it.
based on what I have read Root Port and blocking port , will be determined based on:
Link Cost = Speed of the interfaces
Bridge ID = in our case SW3 is the Root Bridge
Ports Priority = ??
Port Number= in our case Fa0/21 and Fa0/23

So based on what is the Port Priority is determined ?

Thanks
Sw
0
Comment
Question by:jskfan
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 4
8 Comments
 
LVL 29

Assisted Solution

by:Predrag Jovic
Predrag Jovic earned 500 total points
ID: 40460731
Port priority is determined by its value. Default value is 128, the higher value is less preferred.
Yo can assign value under interface configuration menu with spanning-tree port-priority <x> command if interface is access port.
Yo can assign value under interface configuration menu with spanning-tree vlan <vlan-id> port-priority <x> command if interface is trunk port.
x can be assigned any value in range 0 - 255

If you want Fa0/23  to be preferred path - just assign lower priority than default (or lower than port  priority assigned to Fa0/21 interface.
(config)#interface fa0/23
(config-if)#spanning-tree port-priority 50

Or if port is trunk (and you want change port priority for VLAN 100)
(config)#interface fa0/23
(config-if)#spanning-tree vlan 100 port-priority 50

Otherwise, if both interfaces have the same priority, Fa0/21 will be preferred since lower port number is preferred in case that all other STP attributes are the same.
0
 

Author Comment

by:jskfan
ID: 40462676
I see...
By default port priority is 128 for all interfaces unless you manually change it. Correct ?
So in this case by default Root Port and blocking port  of the switch that is directly connected to the Root Bridge , is determined based on:

1-Link Cost ( Speed of the interfaces connecting the switch to the Root Bridge)
 2- interfaces Port Number of the Root Bridge Switch that is sending BPDU to the directly connected switch
3-Port Priority

I put Port Priority as the last in the list, because by default all interfaces have 128 as the Default

Correct?
0
 
LVL 29

Expert Comment

by:Predrag Jovic
ID: 40462706
Not correct. After root bridge is selected

1. Link cost to the root bridge (don't confuse with speed, you can set link cost manually, so 2 interfaces with the same speed can have 2 different costs - usually is the same value for interfaces with the same speed but not  necessary) command is
  spanning-tree [ vlan vlan-id ] cost { value | auto }
2. port priority (this is usually better way for path manipulation than manipulating link cost in case of interfaces with the same speed)
3. Interface port number - it is taken into account only when previous two are equal - as tie breaker
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:jskfan
ID: 40462756
I meant without manually changing anything, will that be:

Link Cost
Port Number
Port Priority
0
 
LVL 29

Expert Comment

by:Predrag Jovic
ID: 40462761
Again, it is always in this order:

Link Cost
Port Priority
Port ID (Number) <- this is always last option
0
 

Author Comment

by:jskfan
ID: 40462800
in your previous comment , you said :
2. port priority (this is usually better way for path manipulation than manipulating link cost in case of interfaces with the same speed)

but if everything left to default, the port priority is always 128.XX , where XX is the port number
The lower port number the better from The root Bridge interface connected to the other switch
0
 
LVL 29

Accepted Solution

by:
Predrag Jovic earned 500 total points
ID: 40462847
Yes, that's right, but that is last option.

But, put yourself in switch algorithm position, it is just simple programming. It is always the same order.

Is link cost to the root bridge the same?
 Yes. Try next step.
 No. Choose lower cost value.
Is port priority the same?
 Yes. Try next step.
 No. Choose lower port priority value.
Last option, all else failed.
 Choose lower port ID.

That's the order.
It is not important if usually port priority is the same. Algorithm is always checking  in that order.
0
 

Author Closing Comment

by:jskfan
ID: 40463584
Thank you !!
0

Featured Post

How our DevOps Teams Maximize Uptime

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us. Read the use case whitepaper.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I see many questions here on Experts Exchange regarding switch port configurations and trunks. This article is meant for beginners in the subject to help to get basic knowledge about Virtual Local Area Network (VLAN (http://en.wikipedia.org/wiki/Vir…
Getting hacked is no longer a matter or "if you get hacked" — the 2016 cyber threat landscape is now titled "when you get hacked." When it happens — will you be proactive, or reactive?
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question