Solved

Switch Port Priority

Posted on 2014-11-23
8
301 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 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 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
The Ultimate Checklist to Optimize Your Website

Websites are getting bigger and complicated by the day. Video, images, custom fonts are all great for showcasing your product/service. But the price to pay in terms of reduced page load times and ultimately, decreased sales, can lead to some difficult decisions about what to cut.

 

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 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

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

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…
Tired of waiting for your show or movie to load?  Are buffering issues a constant problem with your internet connection?  Check this article out to see if these simple adjustments are the solution for you.
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

695 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