Chapter 7 – Analyzing Ethernet LAN Switching

LAN switches receive Ethernet frames and then make a switching decision: either forward 
the frame out some other ports or ignore the frame. To accomplish this primary mission, 
switches perform three actions: 
I. 
2. 
3. 
Deciding when to forward a frame or when to filter (not forward) a frame, based on 
the destination MAC address 
Preparing to forward frames by learning MAC addresses by examining the source 
MAC address of each frame received by the switch 
Preparing to forward only one copy of the frame to the destination by creating 
a (Layer 2) loop-free environment with other switches by using Spanning Tree 
Protocol (STP)

Forwarding Unicast Frames

i) Frame Came in FO/I, 
2) Destined for 0200.2222.2222 
3) Forward out F012 
4) Filter (DO Not send) on FOB, FO/4 
o 
Dest 0200.22222222 , 
Fred 
Barney 
0200222.2222 
Figure 7-3 
MAC Address Table 
MAC Address 
Wilma 
0200_3333.3333 
Betty 
0200.4444.4444 
Output 
0200.2222.2222@ FOÆ 
FOB 
0200.4444.4444 FO/4 
Sample Switch Forwarding and Filtering Decision

MAC address table:  

  • switching table 
  • bridging table 
  • content addressable memory CAM table 
1) Frame Entered FO/I_ 
2) Destined for 0200.3333.3333_ 
3) MAC table entry lists GO/I 
4) Forward out GO/I 
Fred 
Barney 
o 
Dest 020022222222 
FO/I 
SWI 
GO,'I GO/2 
SW2 
020022222222 
Figure 7-4 
SWI Address Table 
MAC Address 
0200.2222.2222 
0200 . 3333 .3333 
Output 
FO/I 
0200 
@ GO/I 
. 4444 . 444 4 GO/ I 
FO/4 
SW2 Address Table 
MAC Address 
0200.2222.2222 
0200. 3333.3333 
0200.4444. 4444 
Wilma 
0200.3333.3333 
Betty 
0200.4444_4444 
Output 
GO/2 
GOP 
FO/3 
FO/4 
Forwarding Decision with Two Switches: First Switch
Fred 
Dest 0200.3333.3333 
SWI 
Barney 
020022222222 
SWI Address Table 
MAC Address 
0200.2222.2222 
0200 . 3333 .3333 
0200 
. 4444.4444 
1) Frame Entered GO,'2 
2) Destined for 0200.3333.3333_ 
3) MAC table entry lists FO,'3_ 
4) Forward out FOB 
GO/I GO,'2 
SW2 
FO/4 
Wilma 
0200.3333.3333 
Betty 
Output 
FO/I 
GO/I 
GO/I 
SW2 Address Table 
MAC Address 
0200.2222.2222 
0200.4444_4444 
Output 
GO/2 
GO/2 
0200.3333.3333 FO/3 
0200. 4444.4444 
Figure 7-5 
Forwarding Decision with Two Switches: Second Switch

Learning MAC addresses

Fred 
FO/I 
FOÆ 
Barney 
0200.2222.2222 
Wilma 
0200 3333.3333 
FO/4 
Betty 
0200 4444.4444 
Address Table: 
Before Either Frame Is Sent 
Address: 
Output 
(Empty) 
(Empty ) 
Address Table: 
Atter Frame 1 (Fred to Barney) 
Address 
Output 
Address Table: 
After Frame 2 (Barney to Fred) 
Address: 
Output 
0200.2222 .2222 
Figure 7-6 Switch Learning: Empty Table and Adding Two Entries

Flooding unknown unicast and broadcast frames: 

Address Table: 
Address: 
(Empty) 
FO/I 
FOP 
Barney 
0200.2222.2222 
Wilma 
0200.3333.3333 
FO/4 
Betty 
0200.4444.4444 
Before Frame Is Sent 
Output 
(Empty) 
Figure 7-7 Switch Flooding: Unknown Unicast Arrives, Floods out Other Ports

Avoiding loops using Spanning Tree Protocol: 

Key 
Topic 
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: 
Step I . 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 
addrews 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 for- 
wards the frame out the outgoing interface. 
56 
CCENT/CCNA ICNDI 100-105 Official Cert Guide 
step 2. 
Step 3. 
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. 
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. 
Switches use STP to prevent loops by causing some interfaces to block, mean- 
ing that they do not send or receive frames.
Table 7-4 Chapter 7 EXEC Command Reference 
Command 
show mac address-table 
show mac address-table 
dynamic 
show mac address-table 
dynamic vlan vlan-id 
show mac address-table 
dynamic address MAC-address 
show mac address-table 
dynamic interface inter ace-id 
show mac address-table count 
show mac address-table 
aging-time 
clear mac address-table 
dynamic 
show interfaces status 
Mode/Purpose/Description 
Shows all MAC table entries of all types 
Shows all dynamically learned MAC table entries 
Shows all dynamically learned MAC table entries in that 
VLAN 
Shows the dynamically learned MAC table entries with that 
MAC address 
Shows all dynamically learned MAC table entries 
associated with that interface 
Shows the number of entries in the MAC table, and the 
total number of remaining empty slots in the MAC table 
Shows the global and per-VLAN aging timeout for inactive 
MAC table entries 
Empties the MAC table of all dynamic entries 
Lists one line per interface on the switch, with basic status 
and operating information for each

Leave a Reply