We dig in deeper into the operations of a switch in the CCNP SWITCH Official Certification Guide. The CAM table is one of the fundamental operations of a switch. It’s not only important for the 642-813 SWITCH exam but it’s important to know for working on the job.
The CAM table, or content addressable memory table, is present in all Cisco Catalysts for layer 2 switching. It is used to record a stations mac address and it’s corresponding switch port location. In addition, a timestamp for the entry is recorded and it’s VLAN assignment.
The CAM table is used in multilayer switching for the purpose of quickly switching frames to their destination. The switch looks at the incoming frame’s source MAC address and enters it into the CAM table and keeps it there for 300 seconds before aging out. This is the default value.
If the device connected to that switchport is moved to another port, the switch records the incoming source MAC address, updates the CAM table and removes it’s previous entry for the same MAC address.
Host A is connected to switch port 1 and Host B is connected to switch port 2.
- Host A sends traffic to the switch.
- The switch looks into the frame and records the source MAC address (of Host A) and places an entry into the CAM table. Host A is on switchport 1, has the MAC address of AAAA, VLAND ID of 1, and the timestamp.
- Host B has not communicated with the switch yet.
- Host A decides to communicate with Host B.
- When Host A sends a frame to the switch destined to Host B, the switch notices the destination MAC address (for Host B) in the frame, queries the CAM table for that MAC address but doesn’t find it.
- Because the destination MAC is unknown, the switch marks the frame for flooding and sends the unicast frame to all ports with the same VLAN association.
- Host B responds to the unicast frame.
- The switch records the incoming frame from Host B and records Host B’s MAC, switchport location, VLAN ID, and applies a timestamp.
- The next time Host A sends a frame destined for Host B, the switch queries it’s CAM table, finds Host B in the table and sends the frame directly to Host B.
CAM Table Before Host B Communicates on the Network
[table id=1 /]
CAM Table After Host B Communicates on the Network
[table id=2 /]