Showing results for 
Search instead for 
Did you mean: 

Switch does not learn mac of a host until we assign IP to the host

I have three queries:

- Why switch does not learn the MAC address of a host connected to it's port, until unless we assign an IP address to the host.

- What is the purpose of having a mac address of every switchport in layer2 switch ? Since communication is based on sender's and receiver's mac addresses.

- When switch start-up, does it send any broadcast to the hosts connected to it's switchports ? Let's say hosts are sitting idle, how will switch learn mac addresses of those hosts (IP is assigned to the hosts) ?

Everyone's tags (3)

Generally a switch will not

Generally a switch will not send a packet to a connected host when it starts (and there can be exceptions depending on what is configured on the switch).  It will only learn the MAC address(es) that are down an interface when the device(s) send a single packet into the switch.

Devices do normally send packets when they start or when the interface becomes active, but not always. 

If a remote device tries to send a packet to the local device by its IP address, the first packet issued should be an ARP request (which is flooded to all switch ports) and the local device should respond to this. When it does, the switch will learn the MAC address.

However, if a device has a configured static IP (or other type of) address and neither generates a packet nor responds to a packet sent to it, then the switch will never learn the MAC address.  This would be unusual but not impossible behaviour.  

CreatePlease to create content
Content for Community-Ad
July's Community Spotlight Awards