Solved

Switch Port Priority

Posted on 2014-11-23
8
271 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
  • 4
  • 4
8 Comments
 
LVL 26

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 26

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
 

Author Comment

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

Link Cost
Port Number
Port Priority
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 26

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 26

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 your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Problem Description:   Couple of months ago we upgraded the ADSL line at our branch office from Home to Business line. The purpose of transforming the service to have static public IP’s. We were in need for public IP’s to publish our web resour…
Creating an OSPF network that automatically (dynamically) reroutes network traffic over other connections to prevent network downtime.
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…

759 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now