background image
82
Chapter 2
Layer-2 Switching
Three Switch Functions at Layer 2
There are three distinct functions of layer-2 switching (you need to remem-
ber these!):
address learning
, forward/filter decisions, and loop avoidance.
Address learning
Layer-2 switches and bridges remember the source
hardware address of each frame received on an interface, and they enter
this information into a MAC database called a forward/filter table.
Forward/filter decisions
When a frame is received on an interface, the
switch looks at the destination hardware address and finds the exit inter-
face in the MAC database. The frame is only forwarded out the specified
destination port.
Loop avoidance
If multiple connections between switches are created for
redundancy purposes, network loops can occur. Spanning Tree Protocol
(STP) is used to stop network loops while still permitting redundancy.
Address learning, forward/filtering decisions, and loop avoidance are
discussed in detail in the next sections.
Address Learning
When a switch is first powered on, the MAC forward/filter table is empty, as
shown in Figure 2.4.
F I G U R E 2 . 4
Empty forward/filter table on a switch
MAC Forward/Filter Table
E0/0:
E0/1:
E0/2:
E0/3:
E0/0
E0/3
E0/2
E0/1
Host A
Host B
Host C
Host D
Copyright ©2002 SYBEX, Inc., Alameda, CA
www.sybex.com