cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1245
Views
0
Helpful
6
Replies

stp calculation problem ...

JATINDER KUMAR
Level 1
Level 1

Dear Friends,

i was just looking at the following diagram (attached file).. according to my calculation the link which should be blocked is Fa0/2 on switch 1 becoz when finding DP for the switch it is coming via switch2--> switch 4--> switch3 which make a cost of 19+4+19 but the result which packet tracer is showing is link Gi1/2 of switch 2 should be blocked forn know how...

any mistake i am doing or any suggestion

please reply

Mercy

JAtin

6 Replies 6

JATINDER KUMAR
Level 1
Level 1

my question is that tough or is it not a valid question which i dont think so...

Hello Jatin, it is not possible for me to open your attachment.

However, STP costs are calculated inbound:

the path cost contained in the received STP BPDU is added to the STP cost of the port on which the STP BDPU has been received.

This is somewhat different from what happens in IP routing protocols.

If I understand your first post, you are using an emulation tool and you don't agree with the showed result.

You may be right.

Hope to help

Giuseppe

thanks Larosa...for the reply.. Thanks a LOt.. i am attaching a image (PNG) file for the same, please see it .. the MAC addresses, name, link info is there in the image.. please do the calculation if possible and let me know if i am not right...

happiness always

Jatin

Hello Jatin,

I can now see the network diagram.

Without any STP priority settings the lowest MAC address wins the STP root bridge election.

in this case SW3 will be the root bridge.

it has 4 0 in the most significant hex digits of its MAC and it is the only one with 4 zeroes in leading digits (leftmost).

So SW3 is the root bridge. => All SW3 ports are DP ports by definition.

Sw4:gi1/2 root port

Sw1:fas0/1 root port

this is clear.

the questions are the ports on SW2.

Sw2 root port should be gi1/1 because:

link SW4 - SW2 is the only one running at 1 Gbps so it has lower cost 4.

on the other path the link between SW3 and SW1 is FE-FE -> cost 19

the interesting part are the STP costs of the links where an FE port connects to a GE port.

The link will be at 100 Mbps and STP cost should reflect this also on the GE port.-> cost 19.

So on the link between SW1 and SW2 the lower and better BPDU is sent by SW1:

root path cost = 0 +19

0 cost on BPDU received on root port, 19 cost of the root port

Sw2 BPDU shows the cost:

19+4 = 23

19 cost on BPDU received on root port, 4 cost of the root port

as a result of this SW2:gi1/2 is in blocking state and SW1:fas0/2 is the designated port in the segment.

Hope to help

Giuseppe

So on the link between SW1 and SW2 the lower and better BPDU is sent by SW1:

root path cost = 0 +19

0 cost on BPDU received on root port, 19 cost of the root port

Sw2 BPDU shows the cost:

19+4 = 23

19 cost on BPDU received on root port, 4 cost of the root port

as a result of this SW2:gi1/2 is in blocking state and SW1:fas0/2 is the designated port in the segment.

can u please explain the uppar part... not able to understand .. plz dont mind ..

the way i calculate is on switch 2 ..... to calculate root port... its the lowest cost link to Root bridge .. link G 1/1 will have a sot of 4+19 = 23 and gi 1/2 will have a cost of 19+19 = 38 {Gi 1/2 ==> Fa 0/2 (sw1) + Fa0/1 (sw1) ==> fa0/1 (sw3) } .. correct me if i am wrong... now based on the lowest cost .. on link Gi 1/1 on switch 2 will be root port...

can you please tell me how you calculate the DP part on every switch .. becoz it looks there is some confusion...

please advise.. Thanks a LOt

happiness always

Hello Jatin,

I'm sorry if  I have done confusion.

the BPDU root path cost field contains the cost as seen on the switch..

if we take in consideration the cost of the port that receives the BPDU as you have done we get the same result.

as you noted it will be 19+19 compared to 19+4.

I agree that this is more correct as one way to influence the choice of the root port is to change the STP cost on one port.

on the SW1 -SW2 lan segment the comparison is between:

BPDU sent by SW1 with cost 19

BPDU sent by SW2 with cost 23 (it adds the cost on the root port this is the point)

Hope to help

Giuseppe

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:

Review Cisco Networking products for a $25 gift card