Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. If you'd prefer to explore, try our test area to get started. And see here for current known issues.

New Member

CAM Vs TCAM

hi all,

can someone tell difference between CAM & TCAM.

Thanking you,

prashanth

7 REPLIES
New Member

Re: CAM Vs TCAM

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

Re: CAM Vs TCAM

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.

New Member

Re: CAM Vs TCAM

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.

Re: CAM Vs TCAM

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.

New Member

Re: CAM Vs TCAM

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

Blue

Re: CAM Vs TCAM

Haj Mohammed:

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

Victor

Re: CAM Vs TCAM

Hi Victor,

Thank you very much :)

BR,

Mohammed Mahmoud.

3072
Views
18
Helpful
7
Replies