How Switches Work


When hubs were in widespread use your Ethernet LAN was limited to the number of workstations you could attach to any particular LAN segment or hub. The limitation was based on the total available bandwidth, which usually is 10Mbps or 100Mbps using older hub technology. Because the broadcast domain, which is to say the group of network devicesincluding workstations, servers, and hubsthat are capable of broadcasting a packet to any other device on the network, even if you follow the topological rules for creating a traditional Ethernet LAN, it won't matter how many computers you are able to connect to the LAN if network traffic becomes a problem. This happened frequently in networks with several high-end servers or workstations that made heavy demands on the network.

Hubs do not diminish the broadcast domain, because all devices connected to the hub must still use the Ethernet CSMA/CD method to gain access to the network media.

Note

Because early Ethernet networks used a shared network media, each node on the network had to contend for access to the network. The mechanism used to get access to the shared media is called Collision Sense Multiple Access/Collision Detect (CSMA/CD). A computer attempting to transmit data on the shared media first listens to ensure that no one else is already transmitting (collision sense). If the line is free, the computer can begin to transmit data. Yet, because the length of the cables and/or hubs that make up the shared media can be lengthy, it's possible that another node may sense the media to be available at the same time, and start transmitting (multiple access). When this happens, a collision occurs. The collision can be detected because it generates a higher voltage on the wire. The collision domain consists of all those computers (or other devices) that must compete in the same shared media, be it a single cable or many cables interconnected by hubs. Switches have solved this problem in modern Ethernet equipment.


On the other hand, a bridge is used to connect two network segments and reduce the broadcast domain by passing network traffic from one segment to another based on a table that the bridge uses to determine which computers are located on which physical segments. This all led to the development of switches. Consider a switch to be a device that uses circuitry to create multiple bridges between the ports it provides.

The solution to the problem outlined here is to limit the broadcast domain without the need for dedicated network bridges, which aren't sufficient for the needs of today's high-speed networks and applications, which must often support use of streaming audio and video alongside more traditional network traffic, such as file and print services.

A switch is a cross between a bridge and a hub. You can think of a switch as several bridges, centralized in a single device like a hub, with added monitoring and management capabilities. Switches centralize wiring and cut down on unnecessary broadcasts on the LAN by switching network packets from an incoming port to the outgoing port that will get the packet to its destination. A switch thus limits the broadcast domain to just two devices: the switch port and the network adapter card on a computer. This eliminates the need for other workstations attached to the switch to examine each packet broadcast on the network. The other workstations never see the packet to begin with. The outgoing port may be connected to the destination of the frame, or it may be connected to another switch, or perhaps a router, that will forward it until it reaches the destination computer.

Switches and bridges aren't that different. They perform just about the same function. However, early bridges usually had only two ports to connect two LAN segments and, thus, divide the broadcast domain in half. As technology developed rapidly in the 1990s, it became possible to create multiport bridges you could use to attach multiple LAN segments. Switches today can be used to connect multiple LAN segments or to connect individual workstations or servers to the network.

So although the term switch may sound new, it's just an evolutionary update of an older techniquebridging, combined with the central wiring concentrator function provided by a hub. You can use switches to perform the same functions that were performed earlier using bridges, but switches allow you to connect a lot more computers to your LAN. Switches have been around for many years in the high-end marketplace for large LANs and have more recently replaced smaller SOHO hubs at the low end. Today traditional hubs are not at all common since there is almost no cost benefit to purchasing one instead of a switch. For larger networks, larger rack-mounted switches have also come down in price. This is due to the fact that there are a lot of manufacturers (for both markets) and switches are now commonplace in high-end networks.

Note

One important distinction between earlier bridges and modern switches needs to be made. Bridges were initially designed to connect two or more LAN segments together. Each LAN segment could have a single computer or multiple computers connected to it. Bridges generally were used to segment the broadcast domain by connecting LAN segments that had multiple computers attached. Switches, however, are used to connect a single computer to a switch port, which can switch the data out another switch port to another target computer, or another switch that can deliver the packet to the target device.


Segmenting the Collision Domain

In Chapter 13, "Ethernet: The Universal Standard," you'll learn more about the limitations imposed for configuring a network based on the technology used. Each type of Ethernet, from 10BASE-2 to Gigabit and 10Gigabit Ethernet, has its own rules about the number of computers that can be connected, the length of cables, and so on. After you reach the maximum allowed length or number of computers imposed by the particular topological rules, you have to create a new LAN and, usually, connect them with a router. Gigabit and 10Gigabit Ethernet are currently used as part of a network backbone because of their large bandwidth. Yet, as desktop computers continue along their evolutionary line and get faster, and as the same thing happens with application software and data, Gigabit Ethernet is now migrating steadily to the desktop. Many recent computers now incorporate Gigabit Ethernet NICs, and all levels of network hardware vendors, including some in the SOHO space, manufacture Gigabit Ethernet NICs, and switches. Applications that use large amounts of data, such as video editing, can benefit from this large bandwidth to the desktop. A word processor, however, would use only a very small fraction of Gigabit Ethernet!

In Figure 8.1 you can see that a switch is used to connect individual workstations, servers, and other network devices.

Figure 8.1. You can connect individual computers to a switch port.


The benefits of using a switch should quickly become apparent. The broadcast domain, when using the standard half-duplex Ethernet CSMA/CD technology, is limited to just two devices: the switch port and the computer attached to it. In this standard half-duplex mode, however, collisions still can occur if the switch and the computer attached to it sense that the network media is silent and both attempt to transmit at the same time. This is exactly what happens in a traditional Ethernet LAN when the CSMA/CD mechanism described in Chapter 13 is used. However, with only two devices competing for network access, bandwidth is greatly improved.

If you were to substitute a hub for the switch in Figure 8.1, the network traffic from all the workstations attached to the hub would have to compete for access to the network media. This means that if you were to use a hub, the actual bandwidth available to each workstation would be less than when a switch is used. As more and more workstations on a hub begin to generate large amounts of network traffic, the effective use of the network media begins to lessen as more and more collisions occur. Using a switch solves this problem.

Full-Duplex Ethernet Switches

The switch also makes possible the concept of full-duplex communication over Ethernet. As discussed in the preceding section, in a standard Ethernet implementation, each device must contend with all others that want to use the transmission medium. The CSMA/CD mechanism is used so that only one device successfully ends up talking on the wire at any particular time. The more stations that are added to the collision domain, the lower the total throughput because collisions increase and retransmissions become more frequent.

When a single workstation is connected to a switch, you want to further increase bandwidth by eliminating the collision domain altogether. This is exactly what happens when you use a switch that supports full-duplex communication. In this type of switch, separate wires in the network cable are used for transmitting and receiving. Thus, the switch port can be transmitting frames to the workstation on one set of wires, while the workstation is transmitting frames to the switch port on another wire pair in the cable.

Because there are no competing devices, the switch and the workstation can send and receive from each other at the same time, the result of which is a full-duplex operation. No collisions occur because there is no contention for the wire. Not only can you achieve the actual 10Mbps or 100Mbps throughput capabilities of the wire for each port attached to a full-duplex switch, but you can double those speeds100Mbps in each direction because each side of the connection can use the full 100Mbps bandwidth. And as Gigabit Ethernet is deployed to the edge of the network, you can expect to see even greater throughput. This will become very important in the next year or two as higher-end PCs and workstations become widely used for large graphics and video applications.

Most network adapter cards, even the very inexpensive ones you can find at a local computer store, support both 10Mbps and 100Mbps full-duplex communications. You can find a generic store brand usually for under $15. If you still have older NICs used in your network, at this price, it only makes sense to throw out those older cards (which probably cost you a lot more!) and upgrade to a newer card.

That said, most switches, both inexpensive SOHO devices and those intended for use in an enterprise network, still support both 10 and 100Mbps. The main reason why you will see some network adapters priced at higher levels ($50$100) is that they offer advanced features, which may be useful to your environment. And, as you learned in Chapter 7, "Network Interface Cards," there are other features that become especially useful when used in enterprise networks, such as Wake on LAN and Preboot Execution Environment (PXE) Boot.

Note

Full-duplex communications are the key to faster Ethernet technologies. After you pass the 100BASE-T speed of 100Mbps, the packet size and round-trip timing required for Ethernet networks just doesn't scale very well. Newer technologies, such as Gigabit Ethernet and 10 Gigabit Ethernet, depend on this full-duplex capability and the removal of the CSMA/CD media access control mechanism to achieve their speeds.


You can increase the availability of the server to its clients, and incur only the expense of a new network card for the server, by replacing the network card on the server with a full-duplex card and plugging it into a port on the switch that supports full-duplex operations. You can increase the response time of the PC or workstation by doing the same.

To make upgrading to a 100Mbps switch easier, virtually all products provide the capability of dual-speed ports. This is similar to the dual-speed 10/100Mpbs network cards. Thus you can continue to use older network cards with a new switch until your budget allows for upgrading the cards installed in individual workstations. Just about every switch on the market today can autosense the network speed of the workstation attached to the port. However, some older models require that you manually set the speed, using management software. The best switches support both autosensing and a good management program that can be used to configure ports.

Note

The best laid plans...can often go awry. Even though there are standards organizations and trade associations that set standards for all sorts of network devices, such as network adapter cards, this doesn't mean that a card (or switch) will always work as expected. This author recently had a problem with several high-end servers (AlphaServers running OpenVMS) that were capable of handling several thousand user connections at any point in time. The servers used autosensing 10/100Mbps full-duplex cards, yet for some reason the throughput was operating in a 10Mbps half-duplex mode. After user complaints, the problem was resolved by manually configuring the switch port to use 100Mbps, full-duplex communications for the particular port. In other words, if you don't find your expectations met when you install new equipment, check the alternatives.


Using Switches to Create a Collapsed Backbone

Because switches can effectively eliminate the broadcast domain, you also can use them to eliminate the traditional backbone used to connect multiple hubs or other devices. For example, it's easy to set up a hub or switch in a wiring closet on each floor of a building, and then run a single cable through the floors to connect each hub (as shown in Figure 8.2). This cable is the backbone for the network. However, this does nothing to eliminate the collision domain for all the traffic it receives from the switches or hubs.

Figure 8.2. A single backbone becomes a bottleneck in a large network.


In Figure 8.2, each workstation that is attached to the switch on its floor easily can exchange data with other workstations that are attached to the same switch. However, if a workstation needs to communicate with a server or another resource that is not directly connected to that switch, the network traffic flows over the backbone that connects the other departmental switches. Again, this isn't a problem if you have a network in which you can locate important servers closer to the actual clients that use them and prevent traffic from entering the backbone at all.

In today's environment, however, it's common to find many business functions centralized in data centers, in large servers, or possibly in clustered servers that manage huge databases. In this type of scenario, it isn't always easy to move a server closer to the client. And, with the advent of email and other Web-based applications, it's more likely that the old 80/20 rule80% of network traffic stays within the local LAN, whereas only 20% is destined for other locationshas been turned around. Now most clients need to exchange only a small amount of data with local computers, sending the 80% figure to the larger network. As newer technologies, such as systems running Windows 2003 Server, begin to distribute components of applications among multiple computers, this problem becomes a more important consideration when planning a network. With the centralization of larger servers, most likely you'll see this paradigm in all but the smallest networks in the future.

In Figure 8.3, switches are cascaded so that the switch can become a network backbone-in-a-box. Each switch in the building is connected to a central switch that serves as the backbone, again limiting or eliminating the collision domain, depending on whether full- or half-duplex switch ports are used.

Figure 8.3. A central switch can serve as a collapsed backbone to concentrate departmental switches.


Of course, in this example, the switches appear on each floor, but you could just as easily attach switches at the department level. In Figure 8.3, it's important to note that, instead of sharing a single backbone network cable as in Figure 8.2, each departmental switch has its own cable to the switch, so the full bandwidth of the network media is available to each switch. The backbone no longer becomes a bottleneck. This does, however, mean that switched connections between devices on one switch with devices on another switch may suffer some minor degradation in bandwidth, but in most cases this problem can be resolved by isolating the computers or servers that need a high-speed link and simply relocating their network connections to different switches to ensure a larger data pipe. If you use Gigabit Ethernet adapters and switches, any loss of bandwidth will not be perceptible.




Upgrading and Repairing Networks
Upgrading and Repairing Networks (5th Edition)
ISBN: 078973530X
EAN: 2147483647
Year: 2006
Pages: 411

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net