I thought that a switch learnt the mac addresses by the computers sending out packets. However when I configured 2 switches, and 2 pc's, 1 pc connected to 1 switch, the other pc connected to the other switch, and then both switches connected to each other, there were mac addresses in the mac address table without there being any packets being sent. Why/How does this happen?
When you connect a PC to a network switch ("link up"), the PC performs at least one of these procedures (assuming IPv4 use):
- (most commonly) request an IP address lease from a DHCP server
- (when DHCP fails or is deactivated) automatically configure a link-local IP address (aka zero-config or APIPA)
- (when a static IP address is configured) send an ARP probe to detect an address collision
All of these methods send out broadcast frames from the PC which populate the MAC table in all the switches in the network (broadcast domain / VLAN).
PCs have many background tasks that send data all the time, even when you’re “not doing anything.” These frames will populate the MAC table.
You might think no packets have been sent, but Computers do a lot of talking in the background, given all the services functioning in the background.
protected by Ron Maupin♦ Feb 13 at 21:16
Thank you for your interest in this question.
Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).
Would you like to answer one of these unanswered questions instead?