Network switch

From LQWiki
Jump to navigation Jump to search

A network switch is a hardware device used to connect multiple computers (and other network devices) together. It is similar to a hub, except it is a bit more intelligent. Unlike a hub, which simply broadcasts packets out all of its ports, a switch builds a table of MAC addresses, and sends a packet only through to port the destination is connected to. This decreases the amount of collisions that happen. (This is technically called reducing the collision domain.) Effectively, each computer has its own dedicated connection to every other computer directly connected to the switch. Collisions can only occur when two computers try to talk to the same computer at once.

In addition, most switches provide full duplex, which means that a network card that is connected directly to a switch (and supports full duplex) can transmit and receive at the same time, effectively doubling the bandwidth.

Like almost all network devices, switches are operating-system agnostic, so using a switch with a Linux machine is no different from using a switch with a Windows machine.

Choosing a switch

When choosing a switch, you might be baffled by the list of features. Here's a quick guide.

Auto-sensing

This means that it will automatically connect devices running at different speeds at their maximum speed, without slowing down the other devices.

Auto-uplink

This means that if you want to connect more than one switch together, or you have a mix of regular and crossover ethernet cables, you can just plug things in and they will work.

Bonding

Bonding allows you to use several cables for transmitting network load.

Jumbo Frames

Jumbo Frames reduce the network load because less "ack" (acknowledgement) packages will be sent.

Internal Bandwidth

This is the crucial factor at how well the switch switches. Every port on a switch can use a maximum of 20/200/2000mbps for a 10/100/1000 switch (this is because it can receive and send at the same time, in full-duplex mode). The internal bandwidth should therefore be:

2 * (maximum speed rating) * (number of ports).

For example a 8-port 10/100 switch should have an internal bandwidth of 2*8*100 = 1600mbps or 1.6gbps. If it can't handle this much, then you should be expecting to pay significantly less. If you only want to use your switch for light network tasks, such as sharing an internet connection, then you don't need a very high internal bandwidth.

VLAN Support

VLANS are Virtual LANS, which essentially means splitting your LAN into separate logical LANS. Each VLAN is unable to communicate with the other VLANS unless a router with VLAN support or a Layer3 Switch is installed and configured on the network. The aim is to control which users see what network resources like printers and servers.

Redundant Power Supply

It is common for a departemental switch to have at least two power supplies so one failing does not harm the switch.

See also