CAM Vs TCAM

Unanswered Question
Jul 17th, 2008

hi all,

can someone tell difference between CAM & TCAM.

Thanking you,

prashanth

I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 4 (3 ratings)
rsgamage1 Thu, 07/17/2008 - 04:45

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

mohammedmahmoud Thu, 07/17/2008 - 05:06

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.

bethamprashanth Thu, 07/17/2008 - 05:18

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.

mohammedmahmoud Thu, 07/17/2008 - 05:51

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.

rsgamage1 Thu, 07/17/2008 - 06:15

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

Attachment: 
lamav Thu, 07/17/2008 - 06:16

Haj Mohammed:

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

Victor

mohammedmahmoud Fri, 07/18/2008 - 09:52

Hi Victor,

Thank you very much :)

BR,

Mohammed Mahmoud.

Actions

Login or Register to take actions

This Discussion

Posted July 17, 2008 at 4:20 AM
Stats:
Replies:7 Overall Rating:4
Views:1911 Votes:0
Shares:0
Tags: No tags.
 

Discussions Leaderboard

Rank Username Points
1
Jon Marshall
16,516
2
Reza Sharifi
9,299
3
Giuseppe Larosa
8,202
4
Peter Paluch
7,598
5
Leo Laohoo
7,591
Rank Username Points
Jon Marshall
511
Joseph W. Doherty
110
Reza Sharifi
108
Peter Paluch
75
Bilal Nawaz
54