Xem mẫu

  1. 1828xbook.fm Page 165 Thursday, July 26, 2007 3:10 PM Part II: LAN Switching Chapter 7 Ethernet LAN Switching Concepts Chapter 8 Operating Cisco LAN Switches Chapter 9 Ethernet Switch Configuration Chapter 10 Ethernet Switch Troubleshooting Chapter 11 Wireless LANs
  2. 1828xbook.fm Page 166 Thursday, July 26, 2007 3:10 PM This chapter covers the following subjects: LAN Switching Concepts: Explains the basic processes used by LAN switches to forward frames. LAN Design Considerations: Describes the reasoning and terminology for how to design a switched LAN that operates well.
  3. 1828xbook.fm Page 167 Thursday, July 26, 2007 3:10 PM 7 CHAPTER Ethernet LAN Switching Concepts Chapter 3, “Fundamentals of LANs,” covered the conceptual and physical attributes of Ethernet LANs in a fair amount of detail. That chapter explains a wide variety of Ethernet concepts, including the basics of UTP cabling, the basic operation of and concepts behind hubs and switches, comparisons of different kinds of Ethernet standards, and Ethernet data link layer concepts such as addressing and framing. The chapters in Part II, “LAN Switching,” complete this book’s coverage of Ethernet LANs, with one additional chapter (Chapter 11) on wireless LANs. This chapter explains most of the remaining Ethernet concepts that were not covered in Chapter 3. In particular, it contains a more detailed examination of how switches work, as well as the LAN design implications of using hubs, bridges, switches, and routers. Chapters 8 through 10 focus on how to access and use Cisco switches. Chapter 8, “Operating Cisco LAN Switches,” focuses on the switch user interface. Chapter 9, “Ethernet Switch Configuration,” shows you how to configure a Cisco switch. Chapter 10, “Ethernet Switch Troubleshooting,” shows you how to troubleshoot problems with Cisco switches. Chapter 11, “Wireless LANs,” concludes Part II with a look at the concepts behind wireless LANs. “Do I Know This Already?” Quiz The “Do I Know This Already?” quiz allows you to assess whether you should read the entire chapter. If you miss no more than one of these eight self-assessment questions, you might want to move ahead to the “Exam Preparation Tasks” section. Table 7-1 lists the major headings in this chapter and the “Do I Know This Already?” quiz questions covering the material in those sections. This helps you assess your knowledge of these specific areas. The answers to the “Do I Know This Already?” quiz appear in Appendix A. “Do I Know This Already?” Foundation Topics Section-to-Question Mapping Table 7-1 Foundation Topics Section Questions LAN Switching Concepts 1–5 LAN Design Considerations 6–8
  4. 1828xbook.fm Page 168 Thursday, July 26, 2007 3:10 PM 168 Chapter 7: Ethernet LAN Switching Concepts Which of the following statements describes part of the process of how a switch 1. decides to forward a frame destined for a known unicast MAC address? It compares the unicast destination address to the bridging, or MAC address, a. table. It compares the unicast source address to the bridging, or MAC address, table. b. It forwards the frame out all interfaces in the same VLAN except for the incom- c. ing interface. It compares the destination IP address to the destination MAC address. d. It compares the frame’s incoming interface to the source MAC entry in the MAC e. address table. Which of the following statements describes part of the process of how a LAN switch 2. decides to forward a frame destined for a broadcast MAC address? It compares the unicast destination address to the bridging, or MAC address, a. table. It compares the unicast source address to the bridging, or MAC address, table. b. It forwards the frame out all interfaces in the same VLAN except for the incoming c. interface. It compares the destination IP address to the destination MAC address. d. It compares the frame’s incoming interface to the source MAC entry in the MAC e. address table. Which of the following statements best describes what a switch does with a frame 3. destined for an unknown unicast address? It forwards out all interfaces in the same VLAN except for the incoming inter- a. face. It forwards the frame out the one interface identified by the matching entry in the b. MAC address table. It compares the destination IP address to the destination MAC address. c. It compares the frame’s incoming interface to the source MAC entry in the MAC d. address table.
  5. 1828xbook.fm Page 169 Thursday, July 26, 2007 3:10 PM “Do I Know This Already?” Quiz 169 Which of the following comparisons does a switch make when deciding whether a new 4. MAC address should be added to its bridging table? It compares the unicast destination address to the bridging, or MAC address, a. table. It compares the unicast source address to the bridging, or MAC address, table. b. It compares the VLAN ID to the bridging, or MAC address, table. c. It compares the destination IP address’s ARP cache entry to the bridging, or d. MAC address, table. PC1, with MAC address 1111.1111.1111, is connected to Switch SW1’s Fa0/1 5. interface. PC2, with MAC address 2222.2222.2222, is connected to SW1’s Fa0/2 interface. PC3, with MAC address 3333.3333.3333, connects to SW1’s Fa0/3 interface. The switch begins with no dynamically learned MAC addresses, followed by PC1 sending a frame with a destination address of 2222.2222.2222. If the next frame to reach the switch is a frame sent by PC3, destined for PC2’s MAC address of 2222.2222.2222, which of the following are true? The switch forwards the frame out interface Fa0/1. a. The switch forwards the frame out interface Fa0/2. b. The switch forwards the frame out interface Fa0/3. c. The switch discards (filters) the frame. d. Which of the following devices would be in the same collision domain as PC1? 6. PC2, which is separated from PC1 by an Ethernet hub a. PC3, which is separated from PC1 by a transparent bridge b. PC4, which is separated from PC1 by an Ethernet switch c. PC5, which is separated from PC1 by a router d. Which of the following devices would be in the same broadcast domain as PC1? 7. PC2, which is separated from PC1 by an Ethernet hub a. PC3, which is separated from PC1 by a transparent bridge b. PC4, which is separated from PC1 by an Ethernet switch c. PC5, which is separated from PC1 by a router d.
  6. 1828xbook.fm Page 170 Thursday, July 26, 2007 3:10 PM 170 Chapter 7: Ethernet LAN Switching Concepts Which of the following Ethernet standards support a maximum cable length of longer 8. than 100 meters? 100BASE-TX a. 1000BASE-LX b. 1000BASE-T c. 100BASE-FX d.
  7. 1828xbook.fm Page 171 Thursday, July 26, 2007 3:10 PM LAN Switching Concepts 171 Foundation Topics This chapter begins by covering LAN concepts—in particular, the mechanics of how LAN switches forward Ethernet frames. Following that, the next major section focuses on campus LAN design concepts and terminology. It includes a review of some of the Ethernet types that use optical cabling and therefore support longer cabling distances than do the UTP-based Ethernet standards. LAN Switching Concepts Chapter 3 introduced Ethernet, including the concept of LAN hubs and switches. When thinking about how LAN switches work, it can be helpful to think about how earlier products (hubs and bridges) work. The first part of this section briefly looks at why switches were created. Following that, this section explains the three main functions of a switch, plus a few other details. Historical Progression: Hubs, Bridges, and Switches As mentioned in Chapter 3, Ethernet started out with standards that used a physical electrical bus created with coaxial cabling. 10BASE-T Ethernet came next. It offered improved LAN availability, because a problem on a single cable did not affect the rest of the LAN—a common problem with 10BASE2 and 10BASE5 networks. 10BASE-T allowed the use of unshielded twisted-pair (UTP) cabling, which is much cheaper than coaxial cable. Also, many buildings already had UTP cabling installed for phone service, so 10BASE-T quickly became a popular alternative to 10BASE2 and 10BASE5 Ethernet networks. For perspective and review, Figure 7-1 depicts the typical topology for 10BASE2 and for 10BASE-T with a hub. 10BASE2 and 10BASE-T (with a Hub) Physical Topologies Figure 7-1 10BASE2, Single Bus 10BASE-T, Using Shared Hub - Acts like Single Bus Archie Larry Archie Larry Hub 1 Bob Bob Solid Lines Represent Solid Lines Represent Twisted Pair Cabling Co-ax Cable
  8. 1828xbook.fm Page 172 Thursday, July 26, 2007 3:10 PM 172 Chapter 7: Ethernet LAN Switching Concepts Although using 10BASE-T with a hub improved Ethernet as compared to the older standards, several drawbacks continued to exist, even with 10BASE-T using hubs: Any device sending a frame could have the frame collide with a frame sent by any other ■ device attached to that LAN segment. Only one device could send a frame at a time, so the devices shared the (10-Mbps) ■ bandwidth. Broadcasts sent by one device were heard by, and processed by, all other devices on ■ the LAN. When these three types of Ethernet were introduced, a shared 10 Mbps of bandwidth was a huge amount! Before the introduction of LANs, people often used dumb terminals, with a 56-kbps WAN link being a really fast connection to the rest of the network—and that 56 kbps was shared among everyone in a remote building. So, in the days when 10BASE-T was first used, getting a connection to a 10BASE-T Ethernet LAN was like getting a Gigabit Ethernet connection for your work PC today. It was more bandwidth than you thought you would ever need. Over time, the performance of many Ethernet networks started to degrade. People developed applications to take advantage of the LAN bandwidth. More devices were added to each Ethernet. Eventually, an entire network became congested. The devices on the same Ethernet could not send (collectively) more than 10 Mbps of traffic because they all shared the 10 Mbps of bandwidth. In addition, the increase in traffic volumes increased the number of collisions. Long before the overall utilization of an Ethernet approached 10 Mbps, Ethernet began to suffer because of increasing collisions. Ethernet bridges were created to solve some of the performance issues. Bridges solved the growing Ethernet congestion problem in two ways: They reduced the number of collisions that occurred in the network. ■ They added bandwidth to the network. ■ Figure 7-2 shows the basic premise behind an Ethernet transparent bridge. The top part of the figure shows a 10BASE-T network before adding a bridge, and the lower part shows the network after it has been segmented using a bridge. The bridge creates two separate collision domains. Fred’s frames can collide with Barney’s, but they cannot collide with Wilma’s or Betty’s. If one LAN segment is busy, and the bridge needs to forward a frame onto the busy segment, the bridge simply buffers the frame (holds the frame in memory) until the segment is no longer busy. Reducing collisions, and assuming no significant change in the number of devices or the load on the network, greatly improves network performance.
  9. 1828xbook.fm Page 173 Thursday, July 26, 2007 3:10 PM LAN Switching Concepts 173 Bridge Creates Two Collision Domains and Two Shared Ethernets Figure 7-2 Fred Wilma 1 Collision Domain Sharing 10 Mbps Barney Betty Wilma Fred Bridge 1 Collision Domain 1 Collision Domain Barney Betty Sharing 10 Mbps Sharing 10 Mbps Adding a bridge between two hubs really creates two separate 10BASE-T networks—one on the left and one on the right. The 10BASE-T network on the left has its own 10 Mbps to share, as does the network on the right. So, in this example, the total network bandwidth is doubled to 20 Mbps, as compared with the 10BASE-T network at the top of the figure. LAN switches perform the same basic core functions as bridges, but with many enhanced features. Like bridges, switches segment a LAN into separate parts, each part being a separate collision domain. Switches have potentially large numbers of interfaces, with highly optimized hardware, allowing even small Enterprise switches to forward millions of Ethernet frames per second. By creating a separate collision domain for each interface, switches multiply the amount of available bandwidth in the network. And, as mentioned in Chapter 3, if a switch port connects to a single device, that Ethernet segment can use full- duplex logic, essentially doubling the speed on that segment. NOTE A switch’s effect of segmenting an Ethernet LAN into one collision domain per interface is sometimes called microsegmentation. Figure 7-3 summarizes some of these key concepts, showing the same hosts as in Figure 7-2, but now connected to a switch. In this case, all switch interfaces are running at 100 Mbps, with four collision domains. Note that each interface also uses full duplex. This is possible
  10. 1828xbook.fm Page 174 Thursday, July 26, 2007 3:10 PM 174 Chapter 7: Ethernet LAN Switching Concepts because only one device is connected to each port, essentially eliminating collisions for the network shown. Switch Creates Four Collision Domains and Four Ethernet Segments Figure 7-3 Each Circle Is 1 Collision Domain, 100 Mbps Each Fred Wilma 0200.1111.1111 0200.3333.3333 Fa0/1 Fa0/3 Fa0/2 Fa0/4 Barney Betty 0200.2222.2222 0200.4444.4444 The next section examines how switches forward Ethernet frames. Switching Logic Ultimately, the role of a LAN switch is to forward Ethernet frames. To achieve that goal, switches use logic—logic based on the source and destination MAC address in each frame’s Ethernet header. To help you appreciate how switches work, first a review of Ethernet addresses is in order. The IEEE defines three general categories of Ethernet MAC addresses: Unicast addresses: MAC addresses that identify a single LAN interface card. ■ Broadcast addresses: A frame sent with a destination address of the broadcast address ■ (FFFF.FFFF.FFFF) implies that all devices on the LAN should receive and process the frame. Multicast addresses: Multicast MAC addresses are used to allow a dynamic subset of ■ devices on a LAN to communicate. NOTE The IP protocol supports the multicasting of IP packets. When IP multicast packets are sent over an Ethernet, the multicast MAC addresses used in the Ethernet frame follow this format: 0100.5exx.xxxx, where a value between 00.0000 and 7f.ffff can be used in the last half of the address. Ethernet multicast MAC addresses are not covered in this book.
  11. 1828xbook.fm Page 175 Thursday, July 26, 2007 3:10 PM LAN Switching Concepts 175 The primary job of a LAN switch is to receive Ethernet frames and then make a decision: either forward the frame out some other port(s), or ignore the frame. To accomplish this primary mission, transparent bridges perform three actions: Deciding when to forward a frame or when to filter (not forward) a frame, based on the 1. destination MAC address Learning MAC addresses by examining the source MAC address of each frame 2. received by the bridge Creating a (Layer 2) loop-free environment with other bridges by using Spanning Tree 3. Protocol (STP) The first action is the switch’s primary job, whereas the other two items are overhead functions. The next sections examine each of these steps in order. The Forward Versus Filter Decision To decide whether to forward a frame, a switch uses a dynamically built table that lists MAC addresses and outgoing interfaces. Switches compare the frame’s destination MAC address to this table to decide whether the switch should forward a frame or simply ignore it. For example, consider the simple network shown in Figure 7-4, with Fred sending a frame to Barney. Figure 7-4 shows an example of both the forwarding decision and the filtering decision. Fred sends a frame with destination address 0200.2222.2222 (Barney’s MAC address). The switch compares the destination MAC address (0200.2222.2222) to the MAC address table, finding the matching entry. This is the interface out which a frame should be sent to deliver it to that listed MAC address (0200.2222.2222). Because the interface in which the frame arrived (Fa0/1) is different than the listed outgoing interface (Fa0/2), the switch decides to forward the frame out interface Fa0/2, as shown in the figure’s table. NOTE A switch’s MAC address table is also called the switching table, or bridging table, or even the Content Addressable Memory (CAM), in reference to the type of physical memory used to store the table. The key to anticipating where a switch should forward a frame is to examine and understand the address table. The table lists MAC addresses and the interface the switch should use when forwarding packets sent to that MAC address. For example, the table lists 0200.3333.3333 off Fa0/3, which is the interface out which the switch should forward frames sent to Wilma’s MAC address (0200.3333.3333).
  12. 1828xbook.fm Page 176 Thursday, July 26, 2007 3:10 PM 176 Chapter 7: Ethernet LAN Switching Concepts Sample Switch Forwarding and Filtering Decision Figure 7-4 Frame Sent to 0200.2222.2222… Came in Fa0/1 Forward Out Fa0/2 Filter (Do Not Send) on Fa0/3, Fa0/4 Wilma Fred 0200.3333.3333 Dest 0200.2222.2222 Fa0/1 Fa0/3 Fa0/2 Fa0/4 Barney Betty 0200.2222.2222 0200.4444.4444 Address Table Fa0/1 0200.1111.1111 Fa0/2 0200.2222.2222 Fa0/3 0200.3333.3333 Fa0/4 0200.4444.4444 Path of Frame Transmission Figure 7-5 shows a different perspective, with the switch making a filtering decision. In this case, Fred and Barney connect to a hub, which is then connected to the switch. The switch’s MAC address table lists both Fred’s and Barney’s MAC addresses off that single switch interface (Fa0/1), because the switch would forward frames to both Fred and Barney out its FA0/1 interface. So, when the switch receives a frame sent by Fred (source MAC address 0200.1111.1111) to Barney (destination MAC address 0200.2222.2222), the switch thinks like this: “Because the frame entered my Fa0/1 interface, and I would send it out that same Fa0/1 interface, do not send it (filter it), because sending it would be pointless.”
  13. 1828xbook.fm Page 177 Thursday, July 26, 2007 3:10 PM LAN Switching Concepts 177 Sample Switch Filtering Decision Figure 7-5 Frame Sent to 0200.2222.2222… MAC table entry lists Fa0/1… Frame came in Fa0/1, so: Filter (do not forward anywhere) Wilma 0200.3333.3333 Fred Dest 0200.2222.2222 Fa0/3 Fa0/1 Fa0/4 Betty Barney 0200.4444.4444 0200.2222.2222 Address Table Fa0/1 0200.1111.1111 Fa0/1 0200.2222.2222 Fa0/3 0200.3333.3333 Fa0/4 0200.4444.4444 Path of Frame Transmission Note that the hub simply regenerates the electrical signal out each interface, so the hub forwards the electrical signal sent by Fred to both Barney and the switch. The switch decides to filter (not forward) the frame, noting that the MAC address table’s interface for 0200.2222.2222 (Fa0/1) is the same as the incoming interface. How Switches Learn MAC Addresses The second main function of a switch is to learn the MAC addresses and interfaces to put into its address table. With a full and accurate MAC address table, the switch can make accurate forwarding and filtering decisions. Switches build the address table by listening to incoming frames and examining the source MAC address in the frame. If a frame enters the switch and the source MAC address is not in the MAC address table, the switch creates an entry in the table. The MAC address is placed in the table, along with the interface from which the frame arrived. Switch learning logic is that simple.
  14. 1828xbook.fm Page 178 Thursday, July 26, 2007 3:10 PM 178 Chapter 7: Ethernet LAN Switching Concepts Figure 7-6 depicts the same network as Figure 7-4, but before the switch has built any address table entries. The figure shows the first two frames sent in this network—first a frame from Fred, addressed to Barney, and then Barney’s response, addressed to Fred. Switch Learning: Empty Table and Adding Two Entries Figure 7-6 Web Web Browser Server 1000 Bytes of Data, Sequence = 1000 I Probably Lost One. He Lost the Segment 1000 Bytes of Data, Sequence = 2000 ACK What I Got in with Sequence = 1000 Bytes of Data, Sequence = 3000 Order! 2000. Resend It! No Data, Acknowledgment = 2000 1000 Bytes of Data, Sequence = 2000 No Data, Acknowledgment = 4000 I Just Got 2000-2999, and I Already Had 3000-3999. Ask for 4000 Next. As shown in the figure, after Fred sends his first frame (labeled “1”) to Barney, the switch adds an entry for 0200.1111.1111, Fred’s MAC address, associated with interface Fa0/1. When Barney replies in Step 2, the switch adds a second entry, this one for 0200.2222.2222, Barney’s MAC address, along with interface Fa0/2, which is the interface in which the switch received the frame. Learning always occurs by looking at the source MAC address in the frame. Flooding Frames Now again turn your attention to the forwarding process, using Figure 7-6. What do you suppose the switch does with Fred’s first frame in Figure 7-6, the one that occurred when there were no entries in the MAC address table? As it turns out, when there is no matching entry in the table, switches forward the frame out all interfaces (except the incoming interface). Switches forward these unknown unicast frames (frames whose destination MAC addresses are not yet in the bridging table) out all other interfaces, with the hope that the unknown device will be on some other Ethernet segment and will reply, allowing the switch to build a correct entry in the address table. For example, in Figure 7-6, the switch forwards the first frame out Fa0/2, Fa0/3, and Fa0/4, even though 0200.2222.2222 (Barney) is only off Fa0/2. The switch does not forward the frame back out Fa0/1, because a switch never forwards a frame out the same
  15. 1828xbook.fm Page 179 Thursday, July 26, 2007 3:10 PM LAN Switching Concepts 179 interface on which it arrived. (As a side note, Figure 7-6 does not show the frame being forwarded out interfaces Fa0/3 and Fa0/4, because this figure is focused on the learning process.) When Barney replies to Fred, the switch correctly adds an entry for 0200.2222.2222 (Fa0/2) to its address table. Any later frames sent to destination address 0200.2222.2222 will no longer need to be sent out Fa0/3 and Fa0/4, only being forwarded out Fa0/2. The process of sending frames out all other interfaces, except the interface on which the frame arrived, is called flooding. Switches flood unknown unicast frames as well as broadcast frames. Switches also flood LAN multicast frames out all ports, unless the switch has been configured to use some multicast optimization tools that are not covered in this book. Switches keep a timer for each entry in the MAC address table, called an inactivity timer. The switch sets the timer to 0 for new entries. Each time the switch receives another frame with that same source MAC address, the timer is reset to 0. The timer counts upward, so the switch can tell which entries have gone the longest time since receiving a frame from that device. If the switch ever runs out of space for entries in the MAC address table, the switch can then remove table entries with the oldest (largest) inactivity timers. Avoiding Loops Using Spanning Tree Protocol The third primary feature of LAN switches is loop prevention, as implemented by Spanning Tree Protocol (STP). Without STP, frames would loop for an indefinite period of time in Ethernet networks with physically redundant links. To prevent looping frames, STP blocks some ports from forwarding frames so that only one active path exists between any pair of LAN segments (collision domains). The result of STP is good: frames do not loop infinitely, which makes the LAN usable. However, although the network can use some redundant links in case of a failure, the LAN does not load-balance the traffic. To avoid Layer 2 loops, all switches need to use STP. STP causes each interface on a switch to settle into either a blocking state or a forwarding state. Blocking means that the interface cannot forward or receive data frames. Forwarding means that the interface can send and receive data frames. If a correct subset of the interfaces is blocked, a single currently active logical path exists between each pair of LANs. NOTE STP behaves identically for a transparent bridge and a switch. Therefore, the terms bridge, switch, and bridging device all are used interchangeably when discussing STP. A simple example makes the need for STP more obvious. Remember, switches flood frames sent to both unknown unicast MAC addresses and broadcast addresses.
  16. 1828xbook.fm Page 180 Thursday, July 26, 2007 3:10 PM 180 Chapter 7: Ethernet LAN Switching Concepts Figure 7-7 shows that a single frame, sent by Larry to Bob, loops forever because the network has redundancy but no STP. Network with Redundant Links But Without STP: The Frame Loops Forever Figure 7-7 Archie Bob Larry Powered Off! Larry sends a single unicast frame to Bob’s MAC address, but Bob is powered off, so none of the switches has learned Bob’s MAC address yet. Bob’s MAC address would be an unknown unicast address at this point in time. Therefore, frames destined for Bob’s MAC address are forwarded by each switch out every port. These frames loop indefinitely. Because the switches never learn Bob’s MAC address (remember, he’s powered off and can send no frames), they keep forwarding the frame out all ports, and copies of the frame go around and around. Similarly, switches flood broadcasts as well, so if any of the PCs sent a broadcast, the broadcast would also loop indefinitely. One way to solve this problem is to design the LAN with no redundant links. However, most network engineers purposefully design LANs to use physical redundancy between the switches. Eventually, a switch or a link will fail, and you want the network to still be available by having some redundancy in the LAN design. The right solution includes switched LANs with physical redundancy, while using STP to dynamically block some interface(s) so that only one active path exists between two endpoints at any instant in time. Chapter 2, “Spanning Tree Protocol,” in the CCNA ICND2 Official Exam Certification Guide covers the details of how STP prevents loops. Internal Processing on Cisco Switches This chapter has already explained how switches decide whether to forward or filter a frame. As soon as a Cisco switch decides to forward a frame, the switch can use a couple of different types of internal processing variations. Almost all of the more recently released switches use store-and-forward processing, but all three types of these internal processing methods are supported in at least one type of currently available Cisco switch.
  17. 1828xbook.fm Page 181 Thursday, July 26, 2007 3:10 PM LAN Switching Concepts 181 Some switches, and transparent bridges in general, use store-and-forward processing. With store-and-forward, the switch must receive the entire frame before forwarding the first bit of the frame. However, Cisco also offers two other internal processing methods for switches: cut-through and fragment-free. Because the destination MAC address occurs very early in the Ethernet header, a switch can make a forwarding decision long before the switch has received all the bits in the frame. The cut-through and fragment-free processing methods allow the switch to start forwarding the frame before the entire frame has been received, reducing time required to send the frame (the latency, or delay). With cut-through processing, the switch starts sending the frame out the output port as soon as possible. Although this might reduce latency, it also propagates errors. Because the frame check sequence (FCS) is in the Ethernet trailer, the switch cannot determine if the frame had any errors before starting to forward the frame. So, the switch reduces the frame’s latency, but with the price of having forwarded some frames that contain errors. Fragment-free processing works similarly to cut-through, but it tries to reduce the number of errored frames that it forwards. One interesting fact about Ethernet carrier sense multiple access with collision detection (CSMA/CD) logic is that collisions should be detected within the first 64 bytes of a frame. Fragment-free processing works like cut-through logic, but it waits to receive the first 64 bytes before forwarding a frame. The frames experience less latency than with store-and-forward logic and slightly more latency than with cut- through, but frames that have errors as a result of collisions are not forwarded. With many links to the desktop running at 100 Mbps, uplinks at 1 Gbps, and faster application-specific integrated circuits (ASIC), today’s switches typically use store-and- forward processing, because the improved latency of the other two switching methods is negligible at these speeds. The internal processing algorithms used by switches vary among models and vendors; regardless, the internal processing can be categorized as one of the methods listed in Table 7-2. Switch Internal Processing Table 7-2 Switching Method Description Store-and-forward The switch fully receives all bits in the frame (store) before forwarding the frame (forward). This allows the switch to check the FCS before forwarding the frame. Cut-through The switch forwards the frame as soon as it can. This reduces latency but does not allow the switch to discard frames that fail the FCS check. Fragment-free The switch forwards the frame after receiving the first 64 bytes of the frame, thereby avoiding forwarding frames that were errored due to a collision.
  18. 1828xbook.fm Page 182 Thursday, July 26, 2007 3:10 PM 182 Chapter 7: Ethernet LAN Switching Concepts LAN Switching Summary Switches provide many additional features not offered by older LAN devices such as hubs and bridges. In particular, LAN switches provide the following benefits: Switch ports connected to a single device microsegment the LAN, providing dedicated ■ bandwidth to that single device. Switches allow multiple simultaneous conversations between devices on different ■ ports. Switch ports connected to a single device support full duplex, in effect doubling the ■ amount of bandwidth available to the device. Switches support rate adaptation, which means that devices that use different Ethernet ■ speeds can communicate through the switch (hubs cannot). Switches use Layer 2 logic, examining the Ethernet data-link header to choose how to process frames. In particular, switches make decisions to forward and filter frames, learn MAC addresses, and use STP to avoid loops, as follows: Step 1 Switches forward frames based on the destination address: a. If the destination address is a broadcast, multicast, or unknown destination unicast (a unicast not listed in the MAC table), the switch floods the frame. b. If the destination address is a known unicast address (a unicast address found in the MAC table): i. If the outgoing interface listed in the MAC address table is different from the interface in which the frame was received, the switch forwards the frame out the outgoing interface. ii. If the outgoing interface is the same as the interface in which the frame was received, the switch filters the frame, meaning that the switch simply ignores the frame and does not forward it. Step 2 Switches use the following logic to learn MAC address table entries: a. For each received frame, examine the source MAC address and note the interface from which the frame was received. b. If they are not already in the table, add the address and interface, setting the inactivity timer to 0. c. If it is already in the table, reset the inactivity timer for the entry to 0. Step 3 Switches use STP to prevent loops by causing some interfaces to block, meaning that they do not send or receive frames.
  19. 1828xbook.fm Page 183 Thursday, July 26, 2007 3:10 PM LAN Design Considerations 183 LAN Design Considerations So far, the LAN coverage in this book has mostly focused on individual functions of LANs. For example, you have read about how switches forward frames, the details of UTP cables and cable pinouts, the CSMA/CD algorithm that deals with the issue of collisions, and some of the differences between how hubs and switches operate to create either a single collision domain (hubs) or many collision domains (switches). This section now takes a broader look at LANs—particularly, how to design medium to larger LANs. When building a small LAN, you might simply buy one switch, plug in cables to connect a few devices, and you’re finished. However, when building a medium to large LAN, you have more product choices to make, such as when to use hubs, switches, and routers. Additionally, you must weigh the choice of which LAN switch to choose (switches vary in size, number of ports, performance, features, and price). The types of LAN media differ as well. Engineers must weigh the benefits of UTP cabling, like lower cost and ease of installation, versus fiber optic cabling options, which support longer distances and better physical security. This section examines a variety of topics that all relate to LAN design in some way. In particular, this section begins by looking at the impact of the choice of using a hub, switch, or router to connect parts of LANs. Following that, some Cisco design terminology is covered. Finishing this section is a short summary of some of the more popular types of Ethernet and cabling types, and cable length guidelines for each. Collision Domains and Broadcast Domains When creating any Ethernet LAN, you use some form of networking devices—typically switches today—a few routers, and possibly a few hubs. The different parts of an Ethernet LAN may behave differently, in terms of function and performance, depending on which types of devices are used. These differences then affect a network engineer’s decision when choosing how to design a LAN. The terms collision domain and broadcast domain define two important effects of the process of segmenting LANs using various devices. This section examines the concepts behind Ethernet LAN design. The goal is to define these terms and to explain how hubs, switches, and routers impact collision domains and broadcast domains. Collision Domains As mentioned earlier, a collision domain is the set of LAN interfaces whose frames could collide with each other, but not with frames sent by any other devices in the network. To review the core concept, Figure 7-8 illustrates collision domains.
  20. 1828xbook.fm Page 184 Thursday, July 26, 2007 3:10 PM 184 Chapter 7: Ethernet LAN Switching Concepts Collision Domains Figure 7-8 NOTE The LAN design in Figure 7-8 is not a typical design today. Instead, it simply provides enough information to help you compare hubs, switches, and routers. Each separate segment, or collision domain, is shown with a dashed-line circle in the figure. The switch on the right separates the LAN into different collision domains for each port. Likewise, both bridges and routers also separate LANs into different collision domains (although this effect with routers was not covered earlier in this book). Of all the devices in the figure, only the hub near the center of the network does not create multiple collision domains for each interface. It repeats all frames out all ports without any regard for buffering and waiting to send a frame onto a busy segment. Broadcast Domains The term broadcast domain relates to where broadcasts can be forwarded. A broadcast domain encompasses a set of devices for which, when one of the devices sends a broadcast, all the other devices receive a copy of the broadcast. For example, switches flood broadcasts and multicasts on all ports. Because broadcast frames are sent out all ports, a switch creates a single broadcast domain. Conversely, only routers stop the flow of broadcasts. For perspective, Figure 7-9 provides the broadcast domains for the same network depicted in Figure 7-8. Broadcasts sent by a device in one broadcast domain are not forwarded to devices in another broadcast domain. In this example, there are two broadcast domains. For instance, the router does not forward a LAN broadcast sent by a PC on the left to the network segment on the right. In the old days, the term broadcast firewall described the fact that routers did not forward LAN broadcasts.
nguon tai.lieu . vn