Network Design and Operations
An L2 switch with an empty MAC address table has devices on ports 1 to 4, all in the same VLAN. PC-A on port 1 sends a frame to PC-B on port 2, and PC-B then sends a reply frame to PC-A. How are the two frames forwarded?
- AThe first frame is sent only to port 2, and the reply is sent to ports 1, 3 and 4
- BThe first frame is sent to ports 2, 3 and 4, and the reply is sent only to port 1
- CBoth frames are sent out of every port except the one they arrived on
Show answer and explanation
Answer: B. The first frame is sent to ports 2, 3 and 4, and the reply is sent only to port 1
When the first frame arrives, the switch does not yet know PC-B's MAC address, so it sends the frame out of ports 2, 3 and 4, every port except port 1 where it arrived (flooding). At the same time, it learns that the sender, PC-A, is behind port 1. The reply is addressed to PC-A, which is already in the table, so it is sent only to port 1. The switch also learns that PC-B is behind port 2, so later frames between the two PCs are not flooded. The devices on ports 3 and 4 receive the first frame but discard it because the destination MAC address is not theirs.
- A. PC-B has not been learned yet, so the first frame cannot be sent to port 2 alone. By the time of the reply, PC-A has been learned.
- B. Correct. Frames to unknown destinations are flooded, and frames to learned destinations go only to their port.
- C. The first frame taught the switch where PC-A is, so the reply is not flooded.