?
Solved

Switch Port Priority

Posted on 2014-11-23
8
Medium Priority
?
321 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 30

Assisted Solution

by:Predrag
Predrag earned 2000 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 30

Expert Comment

by:Predrag
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
Independent Software Vendors: 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 30

Expert Comment

by:Predrag
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 30

Accepted Solution

by:
Predrag earned 2000 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

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

Question has a verified solution.

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

There are two basic ways to configure a static route for Cisco IOS devices. I've written this article to highlight a case study comparing the configuration of a static route using the next-hop IP and the configuration of a static route using an outg…
Arrow Electronics was searching for a KVM  (Keyboard/Video/Mouse) switch that could display on one single monitor the current status of all units being tested on the rack.
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…
Suggested Courses

765 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