Problem solve Get help with specific problems with your technologies, process and projects.

Interconnecting hubs and switches

Connecting hubs and switches in your network would seem to be a fairly common and basic procedure, but there are a few things to look out for.

Whether your number of PCs is growing and you're running out of ports, or your PCs are spread around separate areas of a building, chances are, you're going to need more than 1 switch, and of course, you'll want to hook them together so that your users will be in the same subnet. In this tip, we'll look at things you should know about connecting switches together.

The first thing is the type of cable you're using. Assuming your switches use Fast Ethernet and UTP CAT5 with the RJ45 connectors, then you have to use what we often call a "cross-over cable". Most cables are "straight through" which means if you hold both ends of the cable together, all the colors of the 8 wires inside are in the same order. In the crossover version, you'll see a pair reversed. This is so that the Transmit on one switch goes into Receive wire on another. Obviously, connecting the Tx and Tx together and the Rx and Rx together won't do you any good. You need Tx and Rx, and Rx and Tx, respectively.

If you're using smaller hubs or switches, you may have a special port or button labeled either MDI-X or "uplink". This device gives you the ability to do the "cross-over" in the switch, and to use a straight-through cable. Some new enterprise switches have an Auto-MDI feature, which detects and configures itself appropriately.

(Note: don't confuse MDI/MDI-X with the "duplex mismatch" issue.)

The second thing to understand is when you should and shouldn't connect switches. For starters, understand that "Ethernet loops" are bad. These occur when hubs or switches are connected with more than one cable. A frame goes from switch A to switch B over 1 connection, then back to A over a different port. Switch A then sends it back to B over the first connection. This bandwidth reduction scheme will quickly render your network useless.

So, you can connect your hubs and switches via only a single cable each, and take care not to accidentally dual-connect any of them. But you may also want a bit of redundancy, which requires multiple connections. To solve this problem, IBM created the Spanning Tree Protocol, which allows bridges to detect and avoid loops. The problem is that this technology isn't available on hubs or unmanaged switches.

So, when you're buying switches, keep this and whether or not you want redundant connections in mind.

Tom Lancaster, CCIE# 8829 CNX# 1105, is a consultant with 15 years experience in the networking industry, and co-author of several books on networking, most recently, CCSPTM: Secure PIX and Secure VPN Study Guide published by Sybex.

This was last published in May 2005

Dig Deeper on Network Hardware