cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
3066
Views
10
Helpful
4
Replies

Spanning Tree Designated and Alternate Port Selection

donald.j.kunz
Level 1
Level 1

We're going over spanning-tree protocol now in our class, and we were trying to verify designated and alternate port selection. I set up a replica of a scenario we saw on our test in Packet Tracer, and it was not doing what was expected. Thinking it may be an error with Packet Tracer, today we set up an actual physical version using our 2960s, and it is doing the same thing.

If you see the attached diagram, S4 is elected as the root bridge. The trunk links all behave as expected, with Trunk2 going down. However, from our reading, both in our curriculum and other sources found online, it seems that Fa0/1 on S1 should be the designated port, and Fa0/1 on S3 should be the alternate port. This is because S1 has the lower MAC address, which is how this is supposed to be determined, as far as we could tell.

Now, the spanning-tree is still working correctly, it isn't messing anything up with communications, but we were hoping to be able to determine in advance, using the rules given to us, what the alternate port would be. We tried starting the switches, then cabling them, and disabling the switches, then powering them on while already cabled, and the behavior is identical. If we disconnect another switch to force the spanning-tree to update, then replace it, it goes back to disabling port F0/1 on S1.

Does anybody see something we're missing that would explain this behavior?

4 Replies 4

Jon Marshall
Hall of Fame
Hall of Fame

The designated port is based first on cost and only if there is a tie does the mac address come into it.

So S3 receives a hello from S4 with a value of 0 (because S4 is root), adds the cost of the fa0/2 interface and forwards this hello onto the segment connecting to S1.

The other way S2 receives a hello from S4 (again 0), adds the cost of fa0/1 and forwards this onto the segment connecting to S1.

At this stage the hellos have the same cost because the interfaces are the same speed.

Now S1 receives the hello, adds the cost of gi1/1 to it and forwards it onto the segment connecting to S3.

This hello obviously has a higher cost than the hello sent onto the segment by S3 and the lowest cost wins so I would expect fa0/1 on S1 to block and fa0/1 on S3 to be designated and forwarding.

Jon

We also flipped S3 and S1 at one point, so that S3, with the higher MAC, was in the spot S1 is in the diagram. The cables were the same, just each individual switch was swapped, and S1 (now in the spot S3 is in on the topography) still had port F0/1 in alternate.

What you said does make sense, but that behavior makes it more confusing to me.

Thanks for the reply though! We really appreciate it.

Not sure what was happening when you flipped the switches around.

Be aware that I simplified it somewhat in saying it is just cost because for the designated port it is actually more complicated than that ie. the BPDU contains an integer value that includes cost but also includes other values as well.

The lowest integer value wins.

To be honest I have never labbed this up to do a full set of tests but my understanding is cost is still deciding factor.

Jon

I'm still not sure what happened when we moved them, but your explanation clicked for me just as I was leaving class. Thank you very much for the explanation!

Review Cisco Networking for a $25 gift card