Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Switch Port Priority

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

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 32

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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 

Author Comment

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

Link Cost
Port Number
Port Priority
0
 
LVL 32

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 32

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

Receive 1:1 tech help

Solve your biggest tech problems alongside global tech experts with 1:1 help.

Question has a verified solution.

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

We've been using the Cisco/Linksys RV042 for years as: - an internet Gateway - a site-to-site VPN device - a leased line site-to-site subnet-to-subnet interface (And, here I'm assuming that any RV0xx behaves the same way as an RV042.  So that's …
In the hope of saving someone else's sanity... About a year ago we bought a Cisco 1921 router with two ADSL/VDSL EHWIC cards to load balance local network traffic over the two broadband lines we have, but we couldn't get the routing to work consi…
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…

575 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