The Ternary Content Addressable Memory (TCAM) is used to forward lookups. TCAM is a specialized piece of memory designed for rapid table lookups by the Access Control List (ACL) engine on the switches. The ACL engine performs ACL lookups based on packets that pass through the switch.
The result of the ACL engine lookup into the TCAM determines how the switch handles a packet. The switch can either permit or deny a packet. The TCAM has a limited number of entries that are populated with mask values and pattern values. There is one mask for eight entries in the TCAM.
For a given VLAN in a given direction (input or output), a lookup in the TCAM produces one or more results based on the longest-match hit. Therefore, the entries in the TCAM must either be arranged in a specific order, or must be represented in an order-independent manner.