How switches forward frames
When a frame arrives at a switch interface, the switch looks for the destination hardware (MAC) address in its MAC table. If the destination MAC address is found in the table, the frame is only sent out of the appropriate interface. The frame won’t be transmitted out any interface.
However, if the destination MAC address isn’t listed in the MAC table, then the frame will be sent (flooded) out all active interfaces, except the interface it was received on. If a device answers the flooded frame, the MAC table is then updated with the corresponding interface.
We will explain the switch forwarding process using the following example network:
Host A is trying to communicate with Host B and sends a frame. The frame arrives at the switch, which looks for the destination MAC address in its MAC address table:
Since the MAC address is listed in the MAC address table, the switch forwards the frame only to the port that connected to the frame’s destination (Fa0/2 in our case).
Note that, however, if the MAC address was not found, the switch would flood the frame out all other ports (Fa0/2, Fa0/3, Fa0/4), except the port the frame was received on (Fa0/1). The Host B would receive the flooded frame and respond to Host A. The switch would then receive this frame on the port Fa0/2 and place the source hardware address in its MAC address table.