Cisco Support Community
Community Member

Switch communication confusion

Hello all, I've been studying ARP and how switches communicate traffic. Im just getting a little confused with how multiple switches connected in a network determine the destination of a message. I know switches learn mac address and add it to their CAM table, but what confuses me is how do switches know the path to take across multiple switches which is further then just the mac address neighboring devices. Do switches have their own form of routing table I am not aware of?

In this picture after the initial ARP broadcast PC1 learns of PC2's MAC address, how do the switches know which path to route back, and not just broadcast it?


If I could get a bit of information on this I'd appreciate it.


Thanks guys.




Super Bronze

DisclaimerThe Author of this


The Author of this posting offers the information contained within this posting without consideration and with the reader's understanding that there's no implied or expressed suitability or fitness for any purpose. Information provided is for informational purposes only and should not be construed as rendering professional advice of any kind. Usage of this posting's information is solely at reader's own risk.

Liability Disclaimer

In no event shall Author be liable for any damages whatsoever (including, without limitation, damages for loss of use, data or profit) arising out of the use or inability to use the posting's information even if Author has been advised of the possibility of such damage.


Your confusion might be because perhaps you don't realize MAC to port address learning doesn't require hosts to be directly connected the switch nor are you limited to only having one known MAC per port.

When a switch receives an ingress frame, on any port, it will note the frame's source MAC was seen on that port.

When a switch receives an ingress frame, if the destination (unicast) MAC is in the MAC table, it will transmit the frame out that port, otherwise it sends the frame to all ports, except the ingress port, within the same broadcast domain.

So, with multiple switches in a path, they work as they normally would.  In your example, when PC1 ARP's for PC2, every L2 switch, within the broadcast domain will see the broadcast and record the source MAC and ingress port.  I.e. all switch will know which port to use to send to PC1.

PC2's ARP reply, though, will be unicast, so it will flow back across the switch path using the learned PC1's MAC.  When PC1 now unicasts to PC2, the switches in the path will have also learned PC2's MAC, from the ARP reply, but unlike the case for PC1's ARP broadcast, all the other switches will not have learned what port to use to get to PC2, but then they don't need to know that either.

If PC1 and PC2 stay active, the switches in the path will keep refreshing their MAC table, but the PC1 MAC learned on the other switches will (usually) soon time out.  Like for PC2's MAC, they don't need to know PC1's MAC.

CreatePlease to create content