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?

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 believe I have accepted the answer by clicking on the tick. Can you confirm (sorry I am new to this). – microscope Jan 30 '17 at 20:33
  • Yes, there is a green check next to the answer. – Ron Maupin Jan 30 '17 at 20:33
  • 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 '17 at 10:56
  • 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 '17 at 14:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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