cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
475
Views
14
Helpful
7
Replies

Are these two switches setup incorrectly? (STP)

martin_tsang
Level 1
Level 1

I'm having a disagreement with an collegue whoc is more senior than I am.

We are having problems between two switches in our network. I check the configuration and find it to be setup as shown in the diagram I have posted. I believe I have found the problem, but he disagrees without giving me much reason.

I'm not entirely sure, hence I'm posting on these forums to ask you guys, the experts.

Thanks in advance.

7 Replies 7

ankurbhasin
Level 9
Level 9

Hi Friend,

What exact problem are you facing.

Looking at the config the port cost on root switch is wrong as it should be 0 always and the downstream switch is fine because 10 MBPS port cost should be 100 and 100 MBPS port cost should be 19 which is fine.

And if the port cost on root switch you chnage it to 0 I hope your roblem should go off whatever is your problem because STP will block the 10 MBPS port on downstream switch.

HTH, if yes please rate the post.

Ankur

1. The two links are wireless links.

When there is link flapping, after a while, (randomly), the primary link will be in forwarding state yet not pass traffic.

Sorry, the diagram is wrong, the switch is not root, it is just closer to the root.

Thanks for help but your answer isnt the one I'm looking for as I didnt ask the question properly.

Here is the question again.

**** My Question ****: When configuring port costs, do you configure them on both ends of the link,just the end closer to the root bridge or the end further away from the root bridge?

i.e. In my diagram, do you configure port cost 19 on both switches for the 100Mbps link and port cost 100 on both switches for the 10Mbps link?

just set spanning tree for the vlan on your root switch where you want the root . STP will figure out which ports to block based on type and speed of the link . Obviously you want the higher speed link to be active and not blocked . Normally if you set the root on the switch you shouldn't have to mess with port cost. The problem you are seeing is probably not a spanning tree issue , any kind of interuption or degradation to the wireless signal can cause all kinds of problems . You may need to do a site survey to see your signal is low weak in areas . It can be as simple someone put up a new metal rack in the WAP area that can cause problems.

hi glen,

unfornately, things that negotiate at 100Mbps arent always at that speed. In our case, both devices sync up at Auto-Full-100, but one is a 10Mbps device while the other is 100Mbps.

Also, I forgot to say, when we lose connectivity, all we need to do is to shutdown the Primary link, and then turn it back on manually and it will work again.

Cheers

Martin

Hello,

in addition to the other posts, the port cost needs to be set on your Switch A only. Keep in mind that that the cost is cumulative, and is the sum of all port costs in the path to the root switch.

Regards,

Nethelper

Thanks Nethelper, that was part of the answer I was looking for. Now that we are this far, I wish to ask into more detail why this is the case and what happens in the following scenario.

-------------------------

Example Scenario

-------------------------

- Switch A is connected to the Root with a single link.

- Switch B is connected to switch A with two links, one that is 60Mbps and another which is 20Mbps.

- The goal is to use the 20Mbps link when the 60Mbps link fails.

- On Switch A and B, 60Mbps link is on port 6 and 20Mbps link is on port 2.

--------------------------

Configuration - Rapid PVST

--------------------------

SwitchA - Port 2 - Port Cost:1

SwitchA - Port 6 - Port Cost:999

SwitchB - Port 2 - Port Cost:99

SwitchB - Port 6 - Port Cost:11

--------------------------

Questions

--------------------------

1. SwitchA will send a BPDU to SwitchB

on both port 2 and 6. However, the BPDU

sent on port 2 is superior. Isnt there

conflicting information because from SwitchB,

port 6 will send the better BPDU?

2. According to Nethelper's response, this scenario

would give the desired effect of using the 60Mbps as the primary link instead of the 20Mbps link. Is this correct?

3. Addtionally, if Port Costs only need to be set on Switch B in this scenario, does that mean the port costs set on Switch A are only relevant, if for some reason the root switch became closer to Switch B?

4. In network with a complicated mesh of switches,

would you set the port cost to be the same on both

ends of the link in general? (Good practice?)

-------------------------

Thank you very much guys.

Hi Martin,

Probably because of some personal challenges I don't see the diagram not the configs you attached;-) I can give some answers based on your last post however:

-1- the cost you configure on the port 2 and 6 on A is irrelevant for your scenario. A bridge uses the cost only when electing its root port, the port "closest" to the root bridge. So suppose that the port on A connected to the root has a cost Arc. Bridge A receives a bpdu with a cost of 0 from the root and will forward it with a cost of Arc (the cost on its root port) to both its links to B. Bridge B adds its port costs in order to decide which of its uplinks is the root port. On link 2 it receives a cost of Arc+99, on link 6 a cost of Arc+11 => link 6 is elected because it has a lowest cost. Port 6 is now the root port, forwarding, on bridge B. Now what is happening to port 2 on B? Well, B can send a bpdu with a cost of Arc+11 on this link, but it receives a superior information with a cost of Arc: it means that this port is alternate, blocking.

-2- yes.

-3- that's correct

-4- no, I would just do the minimal changes in order to achieve the desired topology. In your case for example, as you are just doing a comparison between two ports on B, I would only tune the cost of a single port on B, not both (and this only if the default cost is not adequate: your scenario should work as you expect with not configuration if this was the case).

Regards,

Francois