Procurve Best Practices: spanning-tree
Posted by koolbeans on August 21, 2007
Procurve switches ship with spanning-tree turned off, which is different than Cisco’s comparable switches. I have long used spanning-tree to combat network loops, which is where you have a cable connecting one port on a switch to another port on the same switch, there by causing a layer 2 packet storm.
However, this isn’t necessarily what spanning-tree is supposed to do; it is really there to provide backup links in a redundant network topology, such as a ring or a mesh. It’s ability to detect these redundant paths is what usually shuts down a network loop before it brings the whole network down.
Really though, the network loop problem is facilitated by Procurve’s ‘auto-mdix’ feature, which allows you to connect to any switchport using either a straight-through or crossover cable. Since 99.9% of networks only use straight-through cables in connecting devices to their switches, really the better solution to prevent loops is simply to disable auto-mdix on all ports (except maybe your uplinks) and leave spanning-tree off. To disable auto-mdix:
switch#(config): int a1-a24
switch#(a1-a24): mdix-mode mdix
Gotta give credit to sirmicha for the idea.
Jimmi Hendrix said
It does’nt make sense, if the Idea is to make the things workgin better and with les configuraion, plugging and playing, the best would be to leave enabled the auto-mdix and run spanning-tree.
Derek said
I disagree with Mr. Hendrix. Probably the best thing to do in a large network is disable auto-mdix for all ports except for uplinks (I usually leave the last two, unless I’m meshing or doing some other magic), and then enable spanning-tree to do the redundant links if you’re going to do it.
auto-mdix makes people lazy in my opinion. You’re usually more prone to error if you don’t have to remember what a crossover cable is for.
http://learn-networking.com/network-design/the-difference-between-straight-through-crossover-and-rollover-cables
Shadow said
mmmm, can you tell me please what does mdix have to do with redundant links??
I though it is used to detect the sending and receiving pins right ?
koolbeans said
Nothing really. My point was that in trying to prevent network loops, disabling auto-mdix is a better solution that enabling spanning-tree; spanning-tree will detect an inadvertant network loop and shut it off, but there is a lot more configuration involved with spanning-tree that just issue the command to disable auto-mdix on all ports.
Unless of course, someone walks in with a crossover cable, you’d be back to square one. HP has since implemented the loop-protect command, which is more appropriate.