cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
377
Views
0
Helpful
1
Replies

TCAM searching longest match

froggerdata7
Level 1
Level 1

I'm reading up on switching in regards to the CAM and TCAM.  I came across a statement stating, "TCAM is most useful for building tables searching for searching on longest matches such as IP routing tables organized by IP prefixes." 

When they say 'searching on longest match' what exactly are they referring to?  Does this basically mean the most specific match?

1 Reply 1

Akash Agrawal
Cisco Employee
Cisco Employee

Hi,

 

Yes, longest match means most specific match. CAM looks for exact match, but when you do route lookup for a destination say 10.10.10.1, not necessary you would have route in routing table with exact match (/32 prefix 10.10.10.1/32) but instead of that you may have 10.10.0.0/16 or 10.10.10.0/24 or 10.10.10.0/30. And you search for longest match route. In this example 10.10.10.0/30 would be selected for the route lookup of destination 10.10.10.1. This can be done with TCAM but not CAM  

 

You can refer below link as well for more detail discussion.

https://supportforums.cisco.com/discussion/10414976/cam-vs-tcam 

 

--Pls dont forget to rate helpful posts--

 

Regards,

Akash

Review Cisco Networking for a $25 gift card