1

I have a very basic question. How does a switch port learn a MAC address? In this scenario say a host is not trying to communicate with any one. It is just plugged in the switch port. Does the host send its MAC address to the switch port, or does the switch pull the MAC address information to the switch port?

My case is, a client plugs into a switch port, but no MAC address is being learned in the switch port. What could be the possible reason?

2 Answers 2

6

A switch will learn a MAC address as soon as a frame enters the switch. It looks at the source address on the frame and adds to, or updates, its MAC address table with the interface where the frame entered the switch.

If you connect a host to a switch port, and the host sends no frames, the switch will not learn the host's MAC address.

2

The switch learns MAC entries when frames enter through the various interfaces. When making decisions on where the frame goes when the switch receives future frames it refers to the CAM table to do so, when it looks at the table and sees a mac entry matching a port, it then forwards the frames out of that port.If no entry is found a multicast packet or FF-FF-FF-FF is sent out basically saying, I do not know where this MAC address resides, this packet is forwarded out of all interfaces except the receiving port. When a response is received it records this data along with the data of which port it received it on. This data is then entered into the CAM table for future use.

Hope that helps!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.