cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2729
Views
0
Helpful
7
Replies

Root Port Election – Method

sanjay.khurana
Level 1
Level 1

Hi,

I have confusion about STP Root port election on non root bridge switch . I have following topolgy where my switch 3 is act as ROOT bridge , now my problem is that Switch 1 is going to switch 3 thru switch 2 not from switch 4 where is link cost is same and bridge id is same can some one help to figure out how switch 1 choose switch 2 as best path to reach out root switch.

following is output of sh spanntree-details

LAN0110 is executing the ieee compatible Spanning Tree protocol
Bridge Identifier has priority 32768, sysid 110, address 0021.d80d.e900
Configured hello time 2, max age 20, forward delay 15
Current root has priority 32768, address 0006.d798.9701
Root port is 47 (GigabitEthernet1/0/47), cost of root path is 38
Topology change flag not set, detected flag not set
Number of topology changes 8 last change occurred 00:50:49 ago
         from GigabitEthernet1/0/1
Times:  hold 1, topology change 35, notification 2
         hello 2, max age 20, forward delay 15
Timers: hello 0, topology change 0, notification 0, aging 300

Port 1 (GigabitEthernet1/0/1) of VLAN0110 is alternate blocking
  Port path cost 19, Port priority 128, Port Identifier 128.1.
  Designated root has priority 32768, address 0006.d798.9701
  Designated bridge has priority 32878, address 001c.f97c.4200
  Designated port id is 128.48, designated path cost 19
  Timers: message age 2, forward delay 0, hold 0
  Number of transitions to forwarding state: 1
  Link type is point-to-point by default
  BPDU: sent 409, received 1700

Port 47 (GigabitEthernet1/0/47) of VLAN0110 is root forwarding
  Port path cost 19, Port priority 128, Port Identifier 128.47.
  Designated root has priority 32768, address 0006.d798.9701
  Designated bridge has priority 32878, address 0016.c742.5700
  Designated port id is 128.51, designated path cost 19
  Timers: message age 3, forward delay 0, hold 0
  Number of transitions to forwarding state: 1
  Link type is point-to-point by default
  BPDU: sent 188, received 2181

Port 48 (GigabitEthernet1/0/48) of VLAN0110 is alternate blocking
  Port path cost 19, Port priority 128, Port Identifier 128.48.
  Designated root has priority 32768, address 0006.d798.9701
  Designated bridge has priority 32878, address 0016.c742.5700
  Designated port id is 128.52, designated path cost 19
  Timers: message age 2, forward delay 0, hold 0
  Number of transitions to forwarding state: 1
  Link type is point-to-point by default

STP.jpg

STP Toplogy diagram is attached :

Thanks in advacne

7 Replies 7

Talha Ansari
Level 1
Level 1

STP looks for past cost which is calculated based on the link bandwidth and the port cost together. The lowest past cost becomes forwarding.

In my topology link cost and port cost is same for both path .. then why it's choose Switch 2 is best path to reach Root Bridge.. need more clarification.

As per my understanding the non-root bridge selects the path going to the lower bridge id in case of the path cost tie. If the bridge id also becomes a tie then lower port id breaks it.. and port id is never the same.

In your case the switch 4 has a higher bridge id.

brigde id consists of priority and the mac address... from the output you shared says :

switch 4 bridge id : priority 32878, address 001c.f97c.4200

switch 2 bridge id : priority 32878, address 0016.c742.5700

Off course the switch 2 has a lower mac address hence gig 1/0/47 is forwarding and gig 1/0/1 is blocking since it goes to a bridge which has higher bridge id and gig 1/0/48 is blocking because it has higher port id than gig 1/0/47

hope that helps..

Hi,

Thanks for your help , yaa i also got this point but one more little bit help require Is STP compare 1 Hex of mac-address of whole mac address compare for check for higher & lower ;

switch 4 bridge id : priority 32878, address 001c.f97c.4200

switch 2 bridge id : priority 32878, address 0016.c742.5700

Need way to check :

It must be comparing the entire mac-address..

I think we can test this.. usually the mac-address in the bridge id in the switches like 3750 or 3560 is the base mac-address we see in the show version. And th base mac-address is usually mac-address of the "interface vlan 1"...

If the setup regarding which you querried if for testing purpose then just try this command on switch 4 :

conf t

int vlan 1

mac-address 0016.c742.5699

Since the base mac-address of the switch 2 is 0016.c742.5700 we can just deduct 1 from the switch 2 mac-address and apply that on switch 4... After doing this gig 1/0/1 of switch 1 should turn to forwarding as switch 4 will now have a lower bridge id than switch 2 and gig 1/0/47 and 48 should be blocked on switch 1.

If you test this then let me know as I think this should work....

You can still hve the traffic routed it the desired path by manually setting the port cost value.

Thanks

Yes, You are right , my thought was just to know Port election method and i got my answer thanks for your help can i get ur email id for future .

R/

SanjayKhurana

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: