Bridging and Switching
Total Page:16
File Type:pdf, Size:1020Kb
Color profile: Generic CMYK printer profile Composite Default screen CertPrs8 / CCNA Cisco Certified Network Associate Study Guide / Deal / 222934-9 / Chapter 7 Blind Folio 7:1 7 Bridging and Switching CERTIFICATION OBJECTIVES 7.01 Bridges and Switches 7.04 1900 and 2950 Configuration 7.02 Functions of Bridging and Switching ✓ Two-Minute Drill 7.03 The Spanning Tree Protocol Q&A Self Test D:\omh\CertPrs8\934-9\ch07.vp Monday, August 04, 2003 11:53:05 AM Color profile: Generic CMYK printer profile Composite Default screen CertPrs8 / CCNA Cisco Certified Network Associate Study Guide / Deal / 222934-9 / Chapter 7 2 Chapter 7: Bridging and Switching ridges and switches are both layer-2 devices, functioning at the data link layer of the OSI Reference Model. Even though they are both layer-2 devices and have many similarities Bbetween them, they also have many differences. With advancements in hardware and technology, switches perform faster and have many more features. However, the basic functions of these two devices are the same. This chapter covers the functions of bridges and switches, the Spanning Tree Protocol (STP), and basic switch configuration tasks on Cisco’s Catalyst 1900 and 2950. CERTIFICATION OBJECTIVE 7.01 Bridges and Switches The main function of bridges and switches is to solve bandwidth, or collision, problems. Remember that in Ethernet, multiple devices can share the same segment, so there is a chance that more than one device might try to transmit at the same time, creating a collision and a retransmission. The more devices you have in a shared medium the more likely collisions will occur. This doesn’t mean that Ethernet is a bad data link layer topology; it’s just the way it functions. In the old days of networking you used hubs to connect devices together, or used 10Base5 or 10Base2 cabling (where you would have many devices on one wire). If you experienced constant or excessive amounts of collisions, you could use bridges (and later on, switches) to break up the user devices to multiple segments, where each segment would have fewer users, and thus fewer collisions. You could also use a router to perform this function; however, the disadvantage of a router is that it costs a lot more than a bridge or switch. This section provides a brief overview of bridges and switches. Bridging Versus Switching Even though bridges and switches both operate at layer 2, there are many differences between them, as Table 7-1 shows. Perhaps the biggest difference between the bridges and switches is performance. Bridges switch in software, providing a frame rate of about 50,000 frames per second (fps). Switches, on the other hand, perform their switching in hardware, using ASICs (application-specific integrated circuits). ASICs are specialized processors, and in the switching world, they are built to do one thing: switch frames very fast. As an example, D:\omh\CertPrs8\934-9\ch07.vp Monday, August 04, 2003 11:53:05 AM Color profile: Generic CMYK printer profile Composite Default screen CertPrs8 / CCNA Cisco Certified Network Associate Study Guide / Deal / 222934-9 / Chapter 7 Bridges and Switches 3 TABLE 7-1 Functions Bridges Switches Bridge and Switch Form of switching Software Hardware (in ASICs) Comparison Method of switching Store and forward Store and forward, cut-through, fragment-free Ports 2–16 Possibly hundreds Duplexing Half Half and full Collision/bandwidth domains 1 per port 1 per port Broadcast domains 1 1 per VLAN STP instances 1 1 per VLAN the 1900 switch has a frame rate of 500,000 fps and can handle all ports at their maximum speed. Please note that the 1900 is a low-end switch. On Cisco’s higher-end switches, the frame rate is in the millions of frames per second. Methods of Switching Another difference between bridges and switches is how they switch frames. The switching method affects how a layer-2 device receives, processes, and forwards a frame. Bridges support only one switching method, store-and-forward, while switches might support one, two, or three different switching methods. The three switching methods supported by layer-2 devices include the following: ■ Store-and-forward ■ Cut-through ■ Fragment-free The following sections cover these three switching methods. Store-and-Forward Store-and-forward switching is the most basic form of switching. With store-and-forward switching, the layer-2 device must pull in the entire frame into the buffer of the port and check the CRC (checksum) of the frame before the layer-2 device will perform any additional processing of the frame. When checking the CRC, the layer-2 device will calculate a CRC value just as the source device did, and compare this value to D:\omh\CertPrs8\934-9\ch07.vp Monday, August 04, 2003 11:53:05 AM Color profile: Generic CMYK printer profile Composite Default screen CertPrs8 / CCNA Cisco Certified Network Associate Study Guide / Deal / 222934-9 / Chapter 7 4 Chapter 7: Bridging and Switching what was included in the frame. If they are the same, then the frame is good and the layer-2 device can start processing the frame, including the forwarding the frame out the correct destination port. If they are different, the layer-2 device will drop the frame. Bridges support only a store-and-forward switching method. All switches support store-and-forward. However, some switches, like the 1900 series, may support an additional switching method(s); but this is dependent on the actual switch model. Cut-Through Some switches, like the 1900, support cut-through switching. With cut-through switching, the switch reads only the very first part of the frame before making a switching decision. Once the switch device reads the destination MAC address (eight-byte preamble and six-byte MAC address), it begins forwarding the frame (even though the frame may still be coming into the interface). One advantage of cut-through switching over store-and- forward is that it is much faster. Its biggest problem, though, is that the switch may be switching bad frames. Most vendors solve this problem by supporting a dynamic switching method. When performing cut-through switching, the switch will still examine the CRC of the frame as it is being switched, looking for bad frames. Even though the frame may be bad, it is still switched. However, the switch keeps a count of these bad frames. If over a certain period of time the switch reaches a certain threshold of switching bad frames, the switch will dynamically switch its method from cut-through to store-and- forward. This function, though, is entirely dependent on whether or not the vendor included this function in its switching model. The 1900 supports this function. Fragment-Free The default switching method of the 1900 is fragment-free switching. Fragment-free switching is a modified form of cut-through switching. Whereas cut-through switching reads up to the destination MAC address field in the frame before making a switching decision, fragment-free switching makes sure that the frame is at least 64 bytes before switching it (64 bytes is the minimum legal size of an Ethernet frame). The goal of fragment-free switching is to reduce the number of Ethernet runt frames (frames smaller than 64 bytes) that are being switched. Sometimes fragment-free switching is also called modified cut-through or runtless switching. Even with fragment-free switching, a switch could still be switching corrupt frames (frames with a bad CRC), since the switch is checking only the first 64 bytes, and the CRC is at the end of the frame. To overcome this problem, many vendors implement dynamic switching methods, as discussed in the last section. At least with fragment- free switching, most collisions typically create runts, and this switching method would prevent the forwarding of these frames, unlike cut-through switching. D:\omh\CertPrs8\934-9\ch07.vp Monday, August 04, 2003 11:53:05 AM Color profile: Generic CMYK printer profile Composite Default screen CertPrs8 / CCNA Cisco Certified Network Associate Study Guide / Deal / 222934-9 / Chapter 7 Bridges and Switches 5 Even though the 2950 doesn’t support cut-through and fragment-free switching, like the 1900, it still switches frames faster. This is because the 2950 has much faster ASICs than the 1900 switch. Therefore, you shouldn’t judge a switch by its switching method, but by a combination of factors, such as price, performance, and features. Store-and-forward destination MAC address in the frame switching pulls in the whole frame, checks (first 14 bytes). Fragment-free switching the CRC, and then switches the frame. will switch a frame after the switch sees at Bridges support only this mode, as does least 64 bytes, which prevents the switching the 2950 switch. Cut-through switching of runt frames. This is the default switching switches a frame as soon as it sees the method for the 1900 series. Switch Connections Duplexing affects how a device can send and receive frames. There are two modes to duplexing: half and full. With half-duplex, the device can either send or receive— it cannot do both simultaneously. Half-duplex connections are used in shared-medium, like 10Base2, 10Base5, and Ethernet hubs. In this environment, one device sends while all other devices in the collision domain listen for and receive the frame. In a shared environment like this, you can typically get 40–60 percent utilization out of your Ethernet segment. Please note, however, that every situation is different and these numbers are under normal, or average, conditions. If your utilization in a half-duplex environment starts eclipsing the 40–60 percent utilization range, or your collisions exceed 2 percent of total traffic, you should consider either using full-duplex, increasing the speed of the link (like using Fast or Gigabit Ethernet), or breaking up the collision domain with switches.