cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1585
Views
5
Helpful
3
Replies

ASIC using TCAMs for faster lookups

ccnaluna93
Level 1
Level 1

I've read from Cisco CCNA book that ASIC is slow when using CAM so they decided to use a specialized memory called TCAM to perform faster lookups...

but why?

 

how this TCAM can perform a faster lookup? is the TCAM a copy from MAC table?

1 Accepted Solution
3 Replies 3

Thank you, the concepts are clearer now but those websites said that TCAMs are better for ACLs, QoS and Routing table (either for routers or layer 3 switches) and when the switch looks for a MAC address, the CAM is good for that job, but the CCNA book says that MACs are looked up in TCAM when ASIC is making forwarding decisions:

 

Second, the ASIC needs to perform table lookup in the MAC address table, so for fast table lookup, the switch uses a specialized type of memory to store the equivalent of the MAC address table: ternary content-addressable memory (TCAM). TCAM memory does not require the ASIC to execute loops through an algorithm to search the table. Instead, the ASIC can feed the fields to be matched, like a MAC address value, into the TCAM, and the TCAM returns the matching table entry, without a need to run a search algorithm

 

then, is the CAM useless?

 

As I understand it, if the switch is just doing a pure L2 MAC match, CAM would work just as well as TCAM. However, if the switch has needs for other matches, that benefit from TCAM, like your mention of ACLs (which some "enhanced/smart" L2 switches do), you'll want TCAM and if you have that, no need for CAM too. A "dumb/unmanaged" L2 switch likely only has CAM. Of course, if the vendor finds TCAM less expensive, or provides an "upgrade" path option (e.g. a more advanced IOS or feature license), it could use TCAM instead for those reasons too.

What you've quoted from the book is correct, TCAM does not require any kind of loop search, but neither does CAM.
Review Cisco Networking for a $25 gift card