Switch CAM, TCAM and SDM
Written by Arnaud no comments
Cisco Catalyst switches use CAM and TCAM to store MAC addresses, ACL, QoS tables in order to have wire-speed switching : they are ASICs and search the entire memory in one operation.
The CAM (Content Addressable Memory) stores MAC addresses, VLAN and ports assignments. During a lookup, the CAM returns the address where the data is stored (the inverse of regular RAM). It is used on L2 swich.
The TCAM (Ternary Content Addressable Memory) is used on L3 switch to store the routing table (it is also used to store ACL and QoS information). During the lookup, keys are network and mask and result can be next-hop or action (permit or deny) for ACL.
Very well explained and detailed post : https://supportforums.cisco.com/document/60831/cam-vs-tcam
To see CAM and CAM usage (Theses commands were used on a 3750):
show mac address-table dynamic show mac address-table count
To see TCAM usage :
show platform tcam utilization
To see routes that could'nt be inserted into TCAM :
show platform ip unicast counts
To view the number of route entries for each protocol :
show ip route summary
If you find a high number of prefixes not in TCAM, and a high TCAM usage, you should considering changing the SDM (switch database management) template.
To see the currently used SDM :
show sdm prefer
To see anoter SDM template :
show sdm prefer dual-ipv4-and-ipv6 routing
to see CPU usage :
show processes cpu history
CEF (Cisco Express Forwarding) is a forwarding model in which all routing information is put into the FIB (forwarding information base). The FIB is used to store IP routing information (prefixes and next-hop), in addition to the FIB, CEF uses adjacency tables to store Layer 2 addressing information.
Source : http://www.cisco.com/c/en/us/td/docs/switches/lan/catalyst3750/software/... and http://www.ciscopress.com/articles/article.asp?p=425816&seqNum=2