background image
Switching Services
83
When a device transmits and an interface receives a frame, the switch
places the frame's source address in the MAC forward/filter table, allowing
it to remember which interface the sending device is located on. The switch
then has no choice but to flood the network with this frame because it has no
idea where the destination device is actually located.
If a device answers this broadcast and sends a frame back, then the switch
will take the source address from that frame and place that MAC address in
its database as well, associating this address with the interface that received
the frame. Since the switch now has both of the relevant MAC addresses
in its filtering table, the two devices can now make a point-to-point connec-
tion. The switch doesn't need to broadcast as it did the first time, because
now the frames can and will be forwarded only between the two devices.
This is exactly the thing that makes layer-2 switches better than hubs. In a
hub network, all frames are forwarded out all ports every time--no matter
what! Figure 2.5 shows the processes involved in building a MAC database.
F I G U R E 2 . 5
How switches learn hosts' locations
In this figure, you can see four hosts attached to a switch. When the switch
is powered on, it has nothing in its MAC address forward/filter table, just
like in Figure 2.4. But when the hosts start communicating, the switch
places the source hardware address of each frame in the table along with
which port the frame's address corresponds.
MAC Forward/Filter Table
E0/0: 0000.8c01.000A step 2
E0/1: 0000.8c01.000B step 4
E0/2:
E0/3:
E0/0
E0/3
E0/2
E0/1
Step 1
3
3
3
4
Host A
Host B
Host C
Host D
Copyright ©2002 SYBEX, Inc., Alameda, CA
www.sybex.com