cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2048
Views
0
Helpful
1
Replies

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

ummerishtiaq
Level 1
Level 1

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) ?

1 Reply 1

lpassmore
Level 1
Level 1

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.  

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Review Cisco Networking products for a $25 gift card