Wired Intelligent Edge

 View Only
  • 1.  Spanning tree

    Posted Dec 12, 2012 05:07 PM
    Hi

    If we have 4 switches (2510-48g) that we want to link together as follows:

    Sw1 ----------------- Sw3
    | |
    | |
    Sw2 ------------------Sw4

    What is the best way to configure spanning tree?

    The same 2 vlans will be used on all switches (untagged ports), with 2 ports on each switch tagged in both vlans which are directly connected to the other switches.

    We are running the default mstp setup, with no other config setup.

    What we have noticed is that if we disconnect the cable between sw1 and sw3, spanning tree recalculates causing some downtime on our network.

    I think we need to configure spanning tree with instances, regions etc but have no idea how to do this. Can anyone help?

    I don't want anything complicated, I just want the network to work
    Efficiently if one of the circuits between sw1 and sw3, or between sw2 and sw4 gets disconnected.

    Thanks for your assistance.
    John.



  • 2.  RE: Spanning tree

    Posted Dec 12, 2012 06:59 PM
    Hi John,

    A quick guess: SW3 is elected as the root bridge because you've left all the priorities at their defaults and it has the lowest MAC address. Use 'show spanning-tree' on each switch to check.

    If that's true, my suggestion is to set switch priorities explicitly to ensure SW1 is the root and SW2 is the next lowest priority.


  • 3.  RE: Spanning tree

    Posted Dec 13, 2012 01:58 AM

    Hi Paul

    Thanks for helping.

    I've noticed above that the diagram is wrong, it should look like this:

    Sw1 ----------------- Sw3
    |                                             |
    |                                             |
    Sw2 ------------------Sw4

    You are correct that we have everything set to defaults.

    Sw1 and sw2 are in one site, and sw3 and sw4 are in our second site.

    We have two circuits that connect the sites together (extended LAN).

    Basically I want the circuit which connects sw1 and sw3 as active, and then only use the second circuit between sw2 and sw4 if the primary circuit goes down.

    Can I ask you to explain a little about what a root bridge is please?

    Thanks



  • 4.  RE: Spanning tree

    Posted Dec 13, 2012 06:13 AM

    A root bridge is a fundamental part of STP that you need to understand.  Start with http://en.wikipedia.org/wiki/Spanning_Tree_Protocol and if that's not enough, check out the relevant HP or Cisco or Juniper certification materials that talk about it.

     

    But that wikipedia article should be enough.  Look at the diagrams on the right; in each case the root bridge is at the top.  In your network, you don't know which one is the root bridge, so it might be any of the switches in that diagram.  You need to do two things:

    1. Make sure the root bridge is sw1 or sw3 (sw1 makes the most sense, IMO)
    2. Make sure the path from sw4 to sw1 goes via sw3 if that path is working.  You do this by ensuring that the cost on the link between sw2 and sw4 is higher than the cost between sw3 and sw4.

    Hope that makes sense.  If not, it might be time to hit the books and really dig into spanning tree. :-)



  • 5.  RE: Spanning tree

    Posted Dec 13, 2012 06:32 PM
    Thanks for the help.

    Yeah making sw1 the root bridge seems like a good idea.

    As I want all vlans to work across all switches, I guess I can leave all switches configured in instance 0, but just lower the switch priority of sw1 and sw3 to make everything connected to sw2 and sw4 favour the link between sw1 and sw3?

    I also think I need to make the config-name and revision the same on all four switches to make them all part of the same region?

    Have I understood correctly?

    Thanks


  • 6.  RE: Spanning tree

    Posted Dec 13, 2012 07:44 PM

    Picking an explicit root is pretty much always a good idea (and probably a backup also). There's the possibility that some random other thing is root, and it might run old plain STP and wreck your convergence times.

     

    Talking of that, I'm surprised you notice a problem when the link goes down: your network is pretty simple and it should converge fairly quickly. If possible you should propogate the link state to the switches: if the link goes down hard it will bypass the timer and reconfigure immediately. Using external media converters can break this.

     

    Now as far as setting priorities on switches other than the root goes: that's only of significance in picking the root (and a backup if the root is unavailable). If the root is available, the links that are active are the ones that provide the cheapest route to the switch. All other things being equal, the two links into the root will be active, and one of the others. If you wanted to tweak this, bumping up the path cost on the standby link is easiest.

     

    Finally as regards MSTP, that's rather complicated and I would forget about it for now. The only advantage of putting things in a region is if you are planning on running multiple instances.