Read an Excerpt
Chapter 2: Layer-2 SwitchingWhen Cisco discusses switching, they're talking about layer-2 switching unless they say otherwise. Layer-2 switching is the process of using the hardware address of devices on a LAN to segment a network. Since you've got the basic ideas down, I'm now going to focus on the particulars of layer-2 switching and nail down how it works.
Okay, you know that switching breaks up large collision domains into smaller ones, and that a collision domain is a network segment with two or more devices sharing the same bandwidth. A hub network is a typical exam-ple of this type of technology. But since each port on a switch is actually its own collision domain, you can make a much better Ethernet LAN network just by replacing your hubs with switches!
Switches truly have changed the way networks are designed and implemented. If a pure switched design is properly implemented, it absolutely will result in a clean, cost-effective, and resilient internetwork. In this chapter, we'll survey and compare network design before and after switching technologies were introduced.
Routing protocols (such as RIP, which you'll learn about in Chapter 5) have processes for stopping network loops from occurring at the Network layer. However, if you have redundant physical links between your switches, routing protocols won't do a thing to stop loops from occurring at the Data Link layer. That's exactly the reason Spanning Tree Protocol was developed—to put a stop to loops in a layer-2 switched internetwork. The essentials of this vital protocol, as well as how it works within a switched network, are also important subjects this chapter will cover thoroughly.
When frames traverse a switched fabric (or, switched internetwork), the LAN switch type determines how a frame is forwarded to an exit port on a switch. There are three different types of LAN switch methods, and each one handles frames differently as they are forwarded through a switch.This chapter will close with a discussion on the three methods used by Cisco switches.
Before Layer-2 SwitchingLet's go back in time a bit and take a look at the condition of networks before switches and how switches have helped segment the corporate LAN. Before LAN switching, the typical network design looked like the network in Figure 2.1.
The design in Figure 2.1 was called a collapsed backbone because all hosts would need to go to the corporate backbone to reach any network services— both LAN and mainframe.
Going back even further, before networks like the one shown in Figure 2.1 had physical segmentation devices like routers and hubs, there was the mainframe network. This network included the mainframe (IBM, Honeywell, Sperry, Dec, etc.), controllers, and dumb terminals that connected into the controller. Any remote sites were connected to the mainframe with bridges.
And then the PC began its rise to stardom, and the mainframe was connected to the Ethernet or to a Token Ring LAN where the servers were installed. These servers were usually O/S 2 or LAN Manager because this was "pre-NT." Each floor of a building ran either coax or twisted-pair wiring to the corporate backbone, and was then connected to a router. PCs ran an emulating software program that allowed them to connect to the mainframe services, giving those PCs the ability to access services from the mainframe and LAN simultaneously. Eventually the PC became robust enough to allow application developers to port applications more effectively than they could ever before—an advance that markedly reduced networking prices and enabled businesses to grow at a much faster rate.
When Novell became more popular in the late 1980s and early 1990s, O/S 2 and LAN Manager servers were by and large replaced with NetWare services. This made the Ethernet network even more popular because that's what Novell 3.x servers used to communicate with client/server software. So that's the story about how the network in Figure 2.1 came into being. There was only one problem…the corporate backbone grew and grew, and as it grew, network services became slower. A big reason for this was that at the same time this huge burst in growth was taking place, LAN services needed even faster service, and the network was becoming totally saturated. Everyone was dumping the Macs and dumb terminals used for the mainframe service in favor of those slick new PCs so they could more easily connect to the corporate backbone and network services.
All this was taking place before the Internet's momentous popularity (Al Gore was still inventing it?), so everyone in the company needed to access the corporate network's services. Why? Because without the Internet, all network services were internal—exclusive to the company network. This created a screaming need to segment that one humongous and plodding corporate network, connected with sluggish old routers. At first, Cisco just created faster routers (no doubt about that), but more segmentation was needed, especially on the Ethernet LANs. The invention of FastEthernet was a very good and helpful thing too, but it didn't address that network seg-mentation need at all.
But devices called bridges did, and they were first used in the network to break up collision domains. Bridges were sorely limited by the amount of ports and other network services they could provide, and that's when layer-2 switches came to the rescue. These switches saved the day by breaking up collision domains on each and every port, and switches could provide hundreds of them! This early, switched LAN looked like the network pictured in Figure 2.2.
Each hub was placed into a switch port, an innovation that vastly improved the network. Now, instead of each building being crammed into the same collision domain, each hub became its own separate collision domain. But there was a catch—switch ports were still very new, and so, unbelievably expensive. Because of that, simply adding a switch into each floor of the building just wasn't going to happen—at least, not yet. Thanks to whomever you choose to thank for these things, the price has dropped dramatically, so now, having every one of your users plugged into a switch port is both good and feasible.
So there it is—if you're going to create a network design and implement it, including switching services are a must. A typical contemporary network design would look something like Figure 2.3, a complete switched network design and implementation.
"But I still see a router in there," you say! Yes…it's not a mirage—there is a router in there. But its job has changed. Instead of performing physical segmentation, it now creates and handles logical segmentation. Those logical segments are called VLANs, and I promise I'll explain them thoroughly— both in the duration of this chapter and in Chapter 6, where they'll be given a starring role.
Switching ServicesLayer-2 switching is hardware based, which means it uses the MAC address from the host's NIC cards to filter the network. Unlike bridges that use software to create and manage a filter table, switches use Application-Specific Integrated Circuits (ASICs) to build and maintain their filter tables. But it's still okay to think of a layer-2 switch as a multiport bridge because their basic reason for being is the same—to break up collision domains.
Layer-2 switches and bridges are faster than routers because they don't take up time looking at the Network layer header information. Instead, they look at the frame's hardware addresses before deciding to either forward the frame or drop it....