Jump to content

How does STP work if you have 2 connections to same switch?


Recommended Posts

Posted
Originally we had a 1Gb connection from our core to an edge switch. We then had a new 10Gb connection installed. Will STP take care of this? If I leave both the 1Gb and the 10Gb connections in place will the switches use the 10Gb by default? If the 10Gb goes down for any reason will it then switch to the 1Gb?
Posted
From my understanding, STP will disable 1 of the ports if both are plugged in (I think you should be able to set a priority on the 10Gb if it doesn't automatically prioritise that one), if one fails, STP should then rewrite it's tables and bring the other port up. The other option is if switches both ends are the same make, there may be something that will "team" (I think Cisco call it ethertrunk) the ports, so they'll both run as active and if one drops there would just be a reduction in bandwidth.
Posted

What switches are they?

 

STP was built with this in mind. If you was using 10 / 100 / 1000 it would select the fasted link. But then 10GB came and ruined it! STP may see 1GB and 10GB as the same priority. You may have to manually change some settings to reduce the priory (can't remember the technical word) of the 1GB port.

 

Another way around would be to make sure the port 10GB is plugged into a lower port number than the 1GB connection. It could use this to break the tie.

 

But I believe some switches have some built in stuff to do this. Cisco does not.

Posted
What switches are they?

 

STP was built with this in mind. If you was using 10 / 100 / 1000 it would select the fasted link. But then 10GB came and ruined it! STP may see 1GB and 10GB as the same priority. You may have to manually change some settings to reduce the priory (can't remember the technical word) of the 1GB port.

 

Another way around would be to make sure the port 10GB is plugged into a lower port number than the 1GB connection. It could use this to break the tie.

 

But I believe some switches have some built in stuff to do this. Cisco does not.

 

The core is an HP 5412zl and the other end is an HP A5120.

 

What would I need to check on the switches to ensure they use the 10Gb connection as a priority?

Posted
@Willott The ports are not the same speed so are not suitable for a Etherchannel.

 

Correct indeed - could have sworn I'd done something in the past with differing link speeds, but obviously not.

Posted (edited)

Use show span command on switches. You will find which switch is root bridge. It also shows the blocked ports. By default stp blocks the slowest links. Port status are as follows:

 

Forwarding

Disabled

Blocking

 

In one of the switches you will find that one of the port is in blocking state. On root bridge both ports are in forwarding state. On the other switch you will find that one port is in forwarding state and the other port is in blocking state.

 

Obviously you will have to connect to the console port and use a terminal software such as putty. You can also telnet to it if the switch has ip address and telent allowed on the vty lines. Layer 3 switches can be configured to have ip addresses.

Edited by sultan966
Posted
Use show span command on switches. You will find which switch is root bridge. It also shows the blocked ports. By default stp blocks the slowest links. Port status are as follows:

 

Forwarding

Disabled

Blocking

 

In one of the switches you will find that one of the port is in blocking state. On root bridge both ports are in forwarding state. On the other switch you will find that one port is in forwarding state and the other port is in blocking state.

 

Obviously you will have to connect to the console port and use a terminal software such as putty.

 

I can get a telnet connection to the console of each switch, will that work? What is the command to view the port state?

Posted

As soon as you land on the telnet page you have to go to the privilege mode by using the command

#enable.

 

It may ask for password if there is one.

 

In this mode use the command:

 

#show span

Posted
As soon as you land on the telnet page you have to go to the privilege mode by using the command

#enable.

 

It may ask for password if there is one.

 

In this mode use the command:

 

#show span

 

Ok

 

This is the output I get for Port F24 which is the 1Gb link and Port J1 which is the 10Gb link.

 

port f24-Telnet 10.131.39.231.jpg port j1 .jpg

Posted
some information is missing. Post the upper part of the screenshot.

 

Are these better? I noticed that on the results for Port J1 that CST Root Port is F24 ??? What does that mean?

 

port f24-.jpg port j1 .jpg

Posted
When I do port J1 doesn't even show up so I guess F24 is taking priority somehow even though its a lower speed.
Posted

Essentially (if you think about it), STP will stop/prevent loopbacks, because as far as the switch is concerned they're two separate links. Inadvertently you are creating a loopback.

 

To add redundancy, you simply need to trunk or team both ports. Both will then be used, but also if one goes down, the other will take over.

Posted (edited)

 

cheers - will try this after school today. STP is already configured on all switches but the Core is not set to priority 0.

 

- - - Updated - - -

 

Essentially (if you think about it), STP will stop/prevent loopbacks, because as far as the switch is concerned they're two separate links. Inadvertently you are creating a loopback.

 

To add redundancy, you simply need to trunk or team both ports. Both will then be used, but also if one goes down, the other will take over.

 

Does the team/trunk work if the ports are different speeds? Also I want it to use the 10Gb by default.

Edited by fiza
Posted
Essentially (if you think about it), STP will stop/prevent loopbacks, because as far as the switch is concerned they're two separate links. Inadvertently you are creating a loopback.

 

To add redundancy, you simply need to trunk or team both ports. Both will then be used, but also if one goes down, the other will take over.

 

STP is for redundancy. It enables you to have redundant links without creating a network loop. What it doesn't give you is link aggregation or proper load balancing.

 

In a bog standard STP configuration where link 1 is active and link 2 is held by Spanning Tree, if link 1 goes down then link 2 will be brought up by the STP running on the network subject to its timers (~1 minute for old school STP to <10 seconds for a rapid flavour spanning tree protocol).

Posted
STP is for redundancy. It enables you to have redundant links without creating a network loop. What it doesn't give you is link aggregation or proper load balancing.

 

In a bog standard STP configuration where link 1 is active and link 2 is held by Spanning Tree, if link 1 goes down then link 2 will be brought up by the STP running on the network subject to its timers (~1 minute for old school STP to <10 seconds for a rapid flavour spanning tree protocol).

 

But how do I prioritise the 10Gb link as the active one?

Posted (edited)
But how do I prioritise the 10Gb link as the active one?

 

The one with the lowest path cost to the root bridge will be the active one.

1) You'll need to know which switch is the root bridge. If it hasn't been manually configured don't assume this is the core as STP will just use the MAC address of the switches for root bridge elections if left at defaults!

2) As FN-GM said 10Gig links can play silly buggers with some flavours of STP as they're seen as the same cost as 1Gig links so then it's based on the port priority.

3) If they are seen as the same cost you can adjust the STP priority of switch ports.

 

HP Commands for STP Port Priority

HPE Support document - HPE Support Center

 

STP Priority vs Cost explained

https://supportforums.cisco.com/discussion/10709506/stp-port-priority-vs-cost2

 

Hope that helps.

 

I'd recommend doing it at a very quiet time. Some STP adjustments could see all your switch links go down as STP regenerates the tree!

 

Edit: Something else I noticed from your screenshots, J1 is showing as an Edge port. If that's a switch to switch link it shouldn't be an edge port. Otherwise it looks like the port costs are ok. Once you're happy the root bridge is correct, correcting the config on that J1 port to it not being an edge port should see STP automatically use it as the preferred link.

Edited by jtotheb
  • Thanks 1
Posted (edited)
Once you're happy the root bridge is correct, correcting the config on that J1 port to it not being an edge port should see STP automatically use it as the preferred link.

 

How would I change it from being an edge port? Where in the screenshot can you tell this from?

 

edit: I can see it says 'Auto Edge Port'

What should it be ? 'Admin Edge Port'?

Edited by fiza
Posted
Where in the screenshot can you tell this from?

 

edit: I can see it says 'Auto Edge Port'

What should it be ? 'Admin Edge Port'?

 

Post #14.edgeport.JPG

 

Is the SW_Server_Room meant to be the root bridge for the network? Root path cost on that screenshot means that the root bridge is 2x 1gig paths away (or the equivalent path cost) from that switch so SW_Server_Room isn't the root bridge (the other pointer is that root bridges don't have root ports as they are the root).

 

If that needs correcting it will most likely drop all of your links as the Spanning Tree recalculates and regenerates so I would advise not doing it in the middle of the day! Having a random switch being the root bridge in the network can cause some quirky issues, especially if that random switch isn't up to the job.

 

Once you're happy with that then look at the port. If it's set to Auto and it's becoming an edge port then it isn't receiving BPDUs to tell it that it's connected to another switch running spanning tree. When it doesn't receive BPDUs it assumes you've got an edge device connected and sets accordingly. You could force it to not be an edge port, but I'd check the other end of the link first. Is spanning tree disabled on the port at the other end of the link, a feature such as BPDUGuard (I think it's called something else on HP switches), or is that end manually configured as an edge port?

  • Thanks 1
Posted

@jtotheb - I set the root bridge to the core switch last night. Attached screenshots show the output on those 2 ports now. I tried setting J1 to an admin edge port but it wouldn't take.

 

port f24.jpg port j1.jpg

Posted (edited)
@jtotheb - I set the root bridge to the core switch last night. Attached screenshots show the output on those 2 ports now. I tried setting J1 to an admin edge port but it wouldn't take.

 

Cool, that looks good. Take a gander at the other end of that 10gig link then before trying to force a config change on J1 on that switch.

 

Now that switch (Server Room) is the root bridge they will always show as forwarding on that switch. You'll see the STP blocked state at the other end once it's functioning correctly.

Edited by jtotheb

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...