Network Design and Operations
When an L2 switch receives a frame, which information does it record in its MAC address table?
- AThe frame's source MAC address and the port on which the frame arrived
- BThe frame's destination MAC address and the port out of which the frame was sent
- CA pair made of an IP address in the frame and the MAC address that corresponds to it
Show answer and explanation
Answer: A. The frame's source MAC address and the port on which the frame arrived
An L2 switch looks at the source MAC address of each frame it receives and records in its MAC address table that "this device is behind this port" (learning). To forward a frame, it looks up the destination MAC address in the table; if there is an entry it sends the frame only out of that port, and if not it sends it out of every port except the one it arrived on (flooding). The destination MAC address says nothing about where that device is, so it cannot be used for learning. An entry is removed if no frame arrives from that device for a set time (for example 300 seconds), so the table can follow devices that move.
- A. Correct. The source address tells the switch which port the device is behind.
- B. The destination MAC address does not tell the switch which port the destination is behind. Learning uses the source address.
- C. The mapping between IP and MAC addresses is what hosts and routers look up with ARP and keep (the ARP table).