I know the CAM table in a switch holds MAC addresses and the ports that are associated with the respective MAC addresses. There are no such thing as CAM addresses from my knowledge, so why is it called CAM table and not MAC table?
-
If you look up "CAM Table" on Wikipedia this is explained in the first paragraph. – Stig Hemmer Aug 31 '17 at 10:21
-
2CAM tables are a kind of memory/table device used to store and lookup data efficiently. The name "CAM" is not related to name of the name of the data it is storing "MAC address" - its just coincidence that it's the same three letters but in reverse. – Baldrick Mar 24 '18 at 18:53
4 Answers
CAM (Content Addressable Memory) is memory that can be addressed by content, rather than a numeric memory address. You can look up the interface by presenting the memory with the MAC address. This is done in a single CPU cycle vs. the traditional programming of searching through a table, which will cost many CPU cycles.
There is also TCAM (Ternary Content Addressable Memory) that can use a mask. This is particularly useful for IP addressing, and it is used by ACLs or routing tables, among other things.
CAM and TCAM cost much more than standard DRAM, but the performance boost given by them for specific applications can be worth the cost, power, and size compromises you must make.
Since most standard PCs do not include anything like this, you can see how a purpose-built piece of hardware, e.g. router or switch, can have a performance advantage over a standard PC for the purpose of routing or switching.
- 99,565
- 26
- 120
- 195
-
-
3(Very) roughly speaking, CAM is the hardware equivalent of a C# Dictionary, a C++ map or a Java Map that all allow quick access by value rather than position/index. – TripeHound Aug 31 '17 at 08:29
-
CAM - Content Addressable Memory, referring to the memory used for the MAC address table.
It works kind of reverse from RAM, you address it by giving it content and it returns you the address where the content is stored - which is then used to find the egress port for this address.

- 1,614
- 9
- 15
-
-
2I'm not familiar with the internals , but here is some article : https://www.pagiamtzis.com/cam/camintro/ – manish ma Aug 30 '17 at 14:08
-
1
-
@yoyo_fun All (modern volatile) computer memory is some kind of electronic integrated circuit (or a component of such). – JAB Aug 31 '17 at 00:47
Actually, it is called the MAC table by most. The command to look it up in almost all switches/devices is show mac-address table (or some form of this). Very seldom is it specified as the CAM table unless the distinction between CAM and TCAM needs to be made, or someone is teaching the subject.
- 99,565
- 26
- 120
- 195
- 938
- 4
- 13
-
2
-
@psmears, correction... it's a Cisco switch. CatOS hasn't existed in over a decade – Mike Pennington May 03 '18 at 15:18
-
@Mike: If only a product being EOLed meant that it did no longer exist in the field sigh... – psmears May 03 '18 at 18:57
-
1Let me be clear: whether a switch runs CatOS or IOS is irrelevant. All cisco switches use CAM, regardless of what operating system they run. – Mike Pennington May 03 '18 at 19:17
A CAM table can also be use to store other forms of exact match entries in an L2/L3 switch that do not require masks, e.g. host routes, MPLS labels, or even maskless exact matches, for example partitioning a table with 24-bit entries, and filling it with /24 routes.
- 99,565
- 26
- 120
- 195
- 31
- 1