Author: Valter Popeskic

TCAM and CAM memory usage inside networking devices

As this is networking blog I will focus mostly on the usage of CAM and TCAM memory in routers and switches. I will explain TCAM role in router prefix lookup process and switch mac address table lookup.

However, when we talk about this specific topic, most of you will ask: how is this memory made from architectural aspect?

How is it made in order to have the capability of making lookups faster than any other hardware or software solution? That is the reason for the second part of the article where I will try to explain in short how are the most usual TCAM memory build to have the capabilities they have.

CAM and TCAM memory

When using TCAM – Ternary Content Addressable Memory inside routers it’s used for faster address lookup that enables fast routing.

In switches CAM – Content Addressable Memory is used for building and lookup of mac address table that enables L2 forwarding decisions. By implementing router prefix lookup in TCAM, we are moving process of Forwarding Information Base lookup from software to hardware.

When we implement TCAM we enable the address search process not to depend on the number of prefix entries because TCAM main characteristic is that it is able to search all its entries in parallel. It means that no matter how many address prefixes are stored in TCAM, router will find the longest prefix match in one iteration. It’s magic, right?

CEF Lookup

Image 1 shows how FIB lookup functions and points to an entry in the adjacency table. Search process goes through all entries in TCAM table in one iteration.


Router

In routers, like High-End Cisco ones, TCAM is used to enable CEF – Cisco Express Forwarding in hardware. CEF is building FIB table from RIB table (Routing table) and Adjacency table from ARP table for building pre-prepared L2 headers for every next-hop neighbour.

Solicited-node multicast address

Some time ago I was working on IPv6 implementation and in that period I wrote an article about NDP (you can read it here). After a while, I received some comments that it is not written very well so I reviewed a huge part of it. It looks my English was far worst two years ago that I was really aware of 🙂

In the reviewing process, I realised that NDP usage of Solicited-Node multicast addresses was not clearly explained. This is the follow-up article which should explain how and why Solicited-Node multicast address are used in NDP. After all, this kind of multicast addresses are there to enable IPv6 neighbour discovery function of NDP to work properly.

Let’s go!

Solicited-node multicast address is the IPv6 multicast address used on the local L2 subnet by NDP Network Discovery Protocol. NDP uses that multicast address to be able to find out L2 link-local addresses of other nodes present on that subnet.

NDP replaces ARP

As we know, NDP in IPv6 networks replaced the ARP function from IPv4 networks. In IPv4 world, ARP used broadcast to send this kind of discovery messages and find out about neighbours IPv4 addresses on the subnet. With IPv6 and NDP use of broadcast is not really a good solution so we use a special type of multicast group addresses to which all nodes join to enable NDP communication.

How can router decide so fast?

Cisco created all sorts of different magic inside their boxes that optimize forwarding processing of packets.

CEFMain router function is fairly self-explanatory. Router performs IP forwarding more often called IP routing. IP routing is process of deciding where to send the packet after it was received.

 

 

 

IP Routing explained in detail

Logic behind IP forwarding is listed in steps here with the assumption it will be an IPv4 packet that was received. This is process switching explained in 11 steps:

I became CCIE# 46173

This is the story on how I became CCIE# 46173

To be honest, when I look back, I do not really know the main reason behind going through all this trouble, but I can tell you the story about how I did it. It’s mostly a thriller, and some drama towards the end. I will give you an overview of the whole process including the materials used, videos watched, books read and struggles that I went through.

I think that is the right thing to do. This article is for all of you out there who are still trying to study for this exam and need some suggestions. One of the most important things for me was to gather others candidate experience and suggestions in making a good study plan and get the info about the books and stuff. This is also a perfect occasion to brag about passing the damn thing and write a bit about myself. On technology blog, this is a rare opportunity when is alright to write a self reflection.

Cisco VIRL is finally out

Cisco virl logoCisco finally released long-awaited personal network simulator VIRL. VIRL is a simulator like Cisco CML – Cisco Modelling Lab released few moths ago which is made available for business network simulations and testing in engineering normal day job. With VIRL we got a personal version of CML with drastically lower price tag aimed to help students preparing for Cisco CCNP and more than that for those preparing CCIE lab exam. VIRL will surely help the engineers managing small business network to proof their configuration change before applying it to real network.

cisco_virl

This solution give us a more stable and “official” GNS3 which will save all the time spent troubleshooting lab issues that were really GNS3 issues.