text
stringlengths
0
6.55k
|||||||||||||||||||| Technet24
||||||||||||||||||||
Chapter 5: Analyzing Ethernet LAN Switching 115
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.
The result of STP is good: frames do not loop infinitely, which makes the LAN usable. However, STP has negative features as well, including the fact that it takes some work to bal-ance traffic across the redundant alternate links.
A simple example makes the need for STP more obvious. Remember, switches flood unknown unicast frames and broadcast frames. Figure 5-8 shows an unknown unicast frame, sent by Larry to Bob, which loops forever because the network has redundancy but no STP. Note that the figure shows one direction of the looping frame on...
Archie
Bob 5
Larry
Powered Off!
Frame Starts Here
Figure 5-8 Network with Redundant Links but Without STP: The Frame Loops Forever
The flooding of this frame would result in the frame repeatedly rotating around the three switches, because none of the switches list Bob’s MAC address in their address tables—so each switch floods the frame. And while the flooding process is a good mechanism for for-warding unknown unicasts and broadcasts, the continu...
A topology like Figure 5-8, with redundant links, is good, but we need to prevent the bad effect of those looping frames. 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 for...
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.
Chapter 9 of this book, “Spanning Tree Protocol Concepts,” examines STP in depth, includ-ing how STP prevents loops.
LAN Switching Summary
Switches use Layer 2 logic, examining the Ethernet data-link header to choose how to pro-cess frames. In particular, switches make decisions to forward and filter frames, learn MAC addresses, and use STP to avoid loops, as follows:
||||||||||||||||||||
||||||||||||||||||||
116 CCNA 200-301 Official Cert Guide, Volume 1
Step 1. Switches forward frames based on the destination MAC address:
A. If the destination MAC address is a broadcast, multicast, or unknown desti-nation unicast (a unicast not listed in the MAC table), the switch floods the frame.
B. If the destination MAC 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 sim-ply 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 it is not already in the table, add the MAC address and interface it was learned on.
Step 3. Switches use STP to prevent loops by causing some interfaces to block, mean-ing that they do not send or receive frames.
Verifying and Analyzing Ethernet Switching
A Cisco Catalyst switch comes from the factory ready to switch frames. All you have to do is connect the power cable, plug in the Ethernet cables, and the switch starts switching
incoming frames. Connect multiple switches together, and they are ready to forward frames between the switches as well. And the big reason behind this default behavior has to do with the default settings on the switches.
Cisco Catalyst switches come ready to get busy switching frames because of settings like these:
■ The interfaces are enabled by default, ready to start working once a cable is connected. ■ All interfaces are assigned to VLAN 1.
■ 10/100 and 10/100/1000 interfaces use autonegotiation by default. ■ The MAC learning, forwarding, flooding logic all works by default. ■ STP is enabled by default.
This second section of the chapter examines how switches will work with these default set-tings, showing how to verify the Ethernet learning and forwarding process.
|||||||||||||||||||| Technet24
||||||||||||||||||||
Chapter 5: Analyzing Ethernet LAN Switching 117
Demonstrating MAC Learning
To see a switch’s MAC address table, use the show mac address-table command. With no additional parameters, this command lists all known MAC addresses in the MAC table, including some overhead static MAC addresses that you can ignore. To see all the
dynamically learned MAC addresses only, instead use the show mac address-table dynamic command.
The examples in this chapter use almost no configuration, as if you just unboxed the switch when you first purchased it. For the examples, the switches have no configuration other than the hostname command to set a meaningful hostname. Note that to do this in lab, all I did was
■ Use the erase startup-config EXEC command to erase the startup-config file
■ Use the delete vlan.dat EXEC command to delete the VLAN configuration details
■ Use the reload EXEC command to reload the switch (thereby using the empty startup-
config, with no VLAN information configured) 5
■ Configure the hostname SW1 command to set the switch hostname
Once done, the switch starts forwarding and learning MAC addresses, as demonstrated in Example 5-1.
Example 5-1 show mac address-table dynamic for Figure 5-7
SW1# show mac address-table dynamic
Mac Address Table
-------------------------------------------