06-25-2010 04:03 AM - edited 03-04-2019 08:53 AM
Hi, I am having lot of confusion understanding STP Port roles.
I know, How STP determines the root bridge, but having understanding in Root port determination, and designated/Non-designated ports.
I have uploaded a topology, please see.
1. In topology, Sw1 is the root bridge.Sw1 sends root path cost 0 to Sw2, and Sw3. When Sw2, and Sw3 receives the BPDU, Do they add cost of 19 on incoming interfaces or outgoing interfaces? I am really confused in this.
2. The segment between Sw3, and Sw4, Sw3 fa0/2 is designated, and Sw4 fa0/3 is root port? why is this? Why Sw4 fa0/3 is root port? Is it because of lower root path cost to root bridge? If that's the case, Why it didn't select Sw4 fa0/4 as root port?
3. When STP considers lower BID, What exactly it compares inside that BID? As I know, When choosing Root bridge, It considers priority+ mac.
What about when choosing designated and non-designated port? Does it consider also priority+mac address too?
Could you please answer my questions in good explanation?
06-25-2010 05:08 AM
Hello Sandy,
1) cost of elected root port is added to the received cost in the received BPDU. BPDUs sent out a switch on non root ports in STP forwarding state all carry the same cost to the root that of the root port
cost to root bridge = received cost to root bridge + cost of elected root port
2)
>> The segment between Sw3, and Sw4, Sw3 fa0/2 is designated, and Sw4 fa0/3 is root port? why is this?
this may happen, different criteria are used to elect DP and RPs on switches once the root bridge is elected:
lowest cost to root bridge
Lowest BID of BPDU sender
lowest STP priority of received BPDU
lowest port index of received BPDU
for example if SW1 is the root bridge Sw4 has two paths of equal cost to root bridge one via SW3 and one via SW4, if SW3 has lowest BID in comparison to SW2 SW4's port to SW3 is elected root bridge and SW4's port to Sw2 will be placed in blocking state to break the loop.
3)
BID = STP priority + MAC address
each switch can use a single MAC address for all Vlans/ STP instances or a different MAC address for each Vlan/STP instance in PVST+
in first case STP priority = base value + vlan-id
and base_value has to be a multiple of 4096 (possible Vlan range in 802.1Q)
this is called MAC reduction or extended system-id
for vlan 10 is base+10 for vlan 22 is base+22
example:
sh spanning-tree vlan 500
VLAN0500
Spanning tree enabled protocol rstp
Root ID Priority 8192
Address 0005.741b.1f74
Cost 2
Port 129 (TenGigabitEthernet3/1)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
>>> Bridge ID Priority 33268 (priority 32768 sys-id-ext 500)
Address 0022.55be.4740
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 300
sh spanning-tree vlan 510
VLAN0510
Spanning tree enabled protocol rstp
Root ID Priority 8192
Address 0005.741b.1f7e
Cost 2
Port 129 (TenGigabitEthernet3/1)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
>>>> Bridge ID Priority 33278 (priority 32768 sys-id-ext 510)
Address 0022.55be.4740
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 300
as you see for two different vlans two values 33268 and 33278 are used with the difference equal to 510-500.
A single MAC is used
Hope to help
Giuseppe
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide