Address Learning

When a switch is powered on, the MAC filtering table is empty. When a
device transmits and an interface receives a frame, the switch places the
source address in the MAC filtering table, remembering what interface the
device is located on. The switch has no choice but to flood the network with
this frame because it has no idea where the destination device is located.
If a device answers and sends a frame back, then the switch will take the
source address from that frame and place the MAC address in the database,
associating this address with the interface that received the frame.

switch now has two MAC addresses in the filtering table, the devices can
make a point-to-point connection, and the frames will only be forwarded
between the two devices. This is what makes layer-2 switches better than
hubs. In a hub network, all frames are forwarded out all ports every time.

No comments: