cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
13639
Views
48
Helpful
7
Replies

CAM Vs TCAM

bethamprashanth
Level 1
Level 1

hi all,

can someone tell difference between CAM & TCAM.

Thanking you,

prashanth

7 Replies 7

rsgamage1
Level 3
Level 3

CAM is useful whenever the switch needs to do a lookup and needs to be an "exact match".

TCAM table is useful when you are interested in a "certain portion" of the address as a match.

e.g. first 8 bits of a 32-bit address.

HTH

Hi,

CAM stands for Content Addressable Memory which is a special type of memory used by Cisco switches, in the case of ordinary RAM the IOS uses a memory address to get the data stored at this memory location, while with CAM the IOS does the inverse, it uses the data and the CAM returns the address where the data is stored, also the CAM is considered to be faster than the RAM since the CAM searches the entire memory in one operation.

The problem with CAM is that it can only do exact matches on ones and zeros (binary CAMs), and here TCAM (Ternary CAM) comes, since it can match a third state which is any, this makes TCAM a very important component of Cisco layer 3 switches and modern routers, since they can store their routing table in the TCAMs, allowing for very fast lookups, which is considerably better than routing tables stored in ordinary RAM.

CAM and TCAM are the most important parts of the so called ASICs that Cisco switches leverage for line-speed fast switching.

BR,

Mohammed Mahmoud.

hi mohammed,

I just know that cam contain mac address, port and vlan information.

and switch will be using this information to transfer information.

then what about TCAM,

1.what it contains,

2.how will it help in L3 switching,

3.does L2 switches dont have this table.

4.how will be the lookup process in L3 switches

thanking you,

prashanth.

Hi Prashanth,

Well to keep it simple, a multilayer switch uses sets of TCAMs, each set of TCAMs are used for a certain feature (Routing, QoS, ACLs ...), and it does parallel lookups to get all the required results using the VMR combination (Value, Mask and Result), these results can be permit and deny in the case of ACLs, values for QoS policies in case of QoS or pointers to a next-hop in the routing table in case of routing, most of the traditional layer 2 Cisco switches has only CAMs for only layer 2 switching, while some layer 2 Cisco switches has TCAMs for QoS and not for routing, while layer 3 switches has the routing TCAMs.

To get into depth please review the "CCNP BCMSN Exam Certification Guide" book, i believe that it covered this point perfectly.

BR,

Mohammed Mahmoud.

An excerpt from a self-study guide[ISBN: 1-58720-077-5] (of course if you don't have access to the same)

Haj Mohammed:

Great explanations. I'm giving you a 5 plus. :-)

Victor

Hi Victor,

Thank you very much :)

BR,

Mohammed Mahmoud.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Review Cisco Networking products for a $25 gift card