In Cisco packet tracer, when I connect 2 switches together, the CAM table on each switch gives the MAC address of the switch port of the other switch.

This is surprising to me, and it really threw me off when I was playing with port-security (the maximum number of MAC addresses was reached, which triggered a violation, and I could not figure out why. It turns out I was not accounting for the MAC address of a directly connected switch port). I am relieved that I understand now, my questions are:

  • Why / How (what protocol) did they learn the mac address of the switch port on the other end? Perhaps something to do with auto-negotiation? Do they ping each other (I don’t suppose this can happen without IP’s assigned on VLAN interface?)
  • Is this perhaps an action by packet tracer and this would not be reflected with real switches?

1 Answer 1


Spanning tree sends BPDUs, and these will have the source MAC address of the sending switch. A switch will populate its MAC address table with the source MAC address on any frame entering the interface.

You really don't want to set up port security with a MAC address limitation on a link between two switches, and you certainly do not want to disable STP where you have two switches connected.

  • I have reopened this! In packet tracer I took 2 new switches, disabled STP on VLAN1 (the ports in question are in VLAN1) yet the mac addresses are still shared between the switches. I am just very curios, what else could this be?
    – microscope
    Jan 31, 2017 at 10:56
  • 1
    You are also going to need to disable other layer-2, link-local protocols on a Cisco switch. For instance, CDP, DTP, VTP, etc. They all send frames on a link. I originally gave you the generic answer for switches in general, but there is more to it for different switch vendors. For example, non-Cisco switches would need LLDP disabled, rather than CDP.
    – Ron Maupin
    Jan 31, 2017 at 14:28

Your Answer

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

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