Cisco Express Forwarding

An topic that entertained my imagination is Cisco’s IP CEF. So I had to take a dive into whichever forwarding methods there are for Cisco routers.

Currently there are three methods of packet forwarding;

  • Processor based forwarding
  • Fast forwarding (reactive)
  • Cisco Express Forwarding (proactive)

Processor based forwarding is as the name describes processor intensive. When for each packet the CPU has to harvest information from various tables (sources)  this would delay packet forwarding significantly. Or you would need to upgrade a router chassis with a more powerful routing engine. Routers have various tasks at hand; forwarding packets, running routing protocols, maintaining an arp table and handling other processes e.g. ntp, snmp, syslog. Just to name a few.

At some point Cisco and other vendors decide to walk another path. Here is the Cisco solution.

Fast Forwarding uses a specially created table fastswitching-cache. When a packet arrives at a router for which the destination is not in the cache. The router invokes the IP Input process (cpu intentive). IP input gathers information about how to forward the packet to its destination. This information is stored in the fastswitching-cache. And the packet is forwarded accordingly. At this point there is no advantage for this single packet. But for the next packet going to the same destination there is a advantage.

The CPU is used only once in determining the destination information. However there is a downside; if the outgoing interface would change, for example by a network failure, then this information is NOT passed through to the fastswitching-cache. The entry in the fastswitching-cache is only cleared after a time-out is reached.

Cisco Express Forwarding is an entire different beast. The table used is called  forwarding information base or FIB for short. When a packet arrives it is handled bij the IP input process. Same process as processor switching and fast switching. But when all relevant information is gathered is it stored into the FIB. At this point no major difference to Fast Forwarding. CEF also , proactively, stores information from network protocols into the FIB as well. This enables shorter forwarding delay times. And while  CEF uses specific information (FIB) in a specific process (CEF) the processing can be done in specialized hardware; Application Specific Integrated Circuit or ASIC for short. For starters this relieves that main CPU from packet forwarding tasks. And secondly this also eliminates any forwarding delay.

In the next post I will dive into how to read the output of show ip cef.


This entry was posted in CCNP, Commands and tagged , . Bookmark the permalink.