Computer Network
Computer Tutorial

Network Switches



Network Switches

On the surface, a switch looks much like a hub. Despite their similar appearance, switches are far more efficient than hubs and are far more desirable for today’s network environments. As with a hub, computers connect to a switch via a length of twisted-pair cable. Multiple switches are often interconnected to create larger networks. Despite their similarity in appearance and their identical physical connections to computers, switches offer significant operational advantages over hubs.

Switch

Switch

Rather than forwarding data to all the connected ports, a switch forwards data only to the port on which the destination system is connected. It looks at the Media Access Control (MAC) addresses of the devices connected to it to determine the correct port. A MAC address is a unique number that is stamped into every NIC. By forwarding data only to the system to which the data is addressed, the switch decreases the amount of traffic on each network link dramatically. In effect, the switch literally channels (or switches, if you prefer) data between the ports.

Switch data flow

Switch data flow

Switches can also further improve performance over the performance of hubs by using a mechanism called full-duplex. On a standard network connection, the communication between the system and the switch or hub is said to be half-duplex. In a half-duplex connection, data can be either sent or received on the wire but not at the same time. Because switches manage the data flow on the connection, a switch can operate in full-duplex mode—it can send and receive data on the connection at the same time. In a full-duplex connection, the maximum data throughput is double that for a half-duplex connection—for example, 10Mbps becomes 20Mbps, and 100Mbps becomes 200Mbps. As you can imagine, the difference in performance between a 100Mbps network connection and a 200Mbps connection is considerable.

Switching Methods

Switches use three methods to deal with data as it arrives:
» Cut-through —In a cut-through switching environment, the packet begins to be forwarded as soon as it is received. This method is very fast, but creates the possibility of errors being propagated through the network, as there is no error checking.
»Store-and-forward — Unlike cut-through, in a store-and-forward switching environment, the entire packet is received and error checked before being forwarded. The upside of this method is that errors are not propagated through the network. The downside is that the error checking process takes a relatively long time, and store-and-forward switching is considerably slower as a result.
»Fragment Free — To take advantage of the error checking of store-and forward switching, but still offer performance levels nearing that of cut through switching, Fragment Free switching can be used. In a Fragment Free-switching environment, enough of the packet is read so that the switch can determine whether the packet has been involved in a collision. As soon as the collision status has been determined, the packet is forwarded.