I’ve learned quite a bit about TCAM over the years but there are number of areas I’ve never researched. This is another scratch notes where I’ve scratching the itch to know a little bit more about TCAM. The main questions I’m looking to solve is that TCAM memory is that it can be big killer for IPv6 migration. Why ?
TCAM = Ternary Content Addressable Memory.
- special type of computer memory used in certain very high speed searching applications.
- Where Content Addressable Memory describes a chip design that allows for a search of the entire memory in a single operation.
- there are Binary CAMs for binary searches where registers contain only 1 or 0 – two states memory.
- there are Ternary CAMS for binary searches where registers contain 1 or 0 or X (Don’t Care) – three state memory.
- Ternary is another way of saying ‘three’ similar to Binary meaning ‘two’ (in case you didn’t know)
- because the Memory lookup can be achieved very quickly, it is perfect for lookup where packets or frames need to make decisions on which interface to send the packet or frame.
- the search algorithm is deterministic – important because of the time sensitivity of a route or forwarding lookup.
- TCAM can perform a wide search in memory in a very short fixed period of time, typically less than 20ns. Reference: CEENET
- in 2001, 5-10 lookups per packets needed to deliver feature rich forwarding. CEENET
- “using simultaneous parallel operation to compare data strings input from an external device with data strings stored in the memory and outputting the matches.”
- TCAM memory is expensive to build therefore manufacturers use as little as possible.
- TCAM chips use a lot of power and have high heat dissipation
- In 2009 a single Renesys TCAM chip of the day cost about USD$350.
- CAM memory is implemented in Sun SPARC, MIPS CPUs and lately Intel Core CPUs as a ‘translation lookaside buffer’ to improve virtual memory translation. Source
- Cisco has used multiple smaller TCAM (to save money and power) by using Patricia Tree precomputation.
- The ternary content-addressable memory (TCAM) contains ACLs in a compiled form so that a decision can be made on whether to forward a frame in a single table lookup. Reference: CCNP SWITCH 642-813 Official Certification Guide.
- Cisco uses TCAM for L2 Forwarding, L3 Forwarding, QoS ACLs,
- IOS handles available TCAM resources in two key ways.
- Feature Manager (FM)— After an access list has been created or configured, the Feature Manager software compiles, or merges, the ACEs into entries in the TCAM table. The TCAM then can be consulted at full frame-forwarding speed.
- Switching Database Manager (SDM)— You can partition the TCAM on some Catalyst switches into areas for different functions. The SDM software configures or tunes the TCAM partitions, if needed. (The TCAM is fixed on Catalyst 4500 and 6500 platforms and cannot be repartitioned.)
- The TCAM architecture varies from platform to platform, and from model to model. For chassis based devices, TCAM are located on the Supervisor engine and each engine will be different from other engines. Therefore you will need research each platform and model on it’s own merits. Example on 4500 Supervisor Example on C6500 Sups
- Understanding and Configuring Switching Database Manager on Catalyst 3750 Series Switches
- Can’t find too many details on C3750-E or X.
The Nexus 7K has TCAM on every module (not just Supervisor). The TCAM can hold different amounts.
|Protocol||Protocol Entries||TCAM Entries|
|IPv4 Multicast & IPv6 Unicast||20K||40K|
The EtherealMind View
- worth noting that because IPv6 is four times bigger, it uses four times as much TCAM memory.
- This means that your router can only on 25% capacity for IPv6 compared to the IPv4 maximum size.
- And since you will probably have both IPv4 AND IPv6 addresses in your network, TCAM exhaustion could be a concern in larger networks since you may have a significant expansion in the gross size of the routing table.
- Therefore the networking vendors are going to be excited about the extra sales.
- Speak to your Cisco account manager about getting more information about your hardware. There is a lot of good documentation inside Cisco that they can give you under NDA that will give you more detail on the TCAM utilisation. Account Managers are a resource and you should use them.
- The documents referenced here have a lot of detail about HOW TCAM works but it not possible to cover the detail here – some of those documents are twenty / thirty pages on the topic.