5

I want to understand how Cisco's CEF and Fast Forward cache packet switching is better than process switching, and I think I might be having trouble understanding Cisco's language.

When they say that a FIB (Forwarding Information Base) or Fast Forward Cache stores the next-hop information and this helps in cutting down time in routing packets, I wonder how slow process switching is in comparison? Is looking up encapsulation method and the exit interface a real burden on the CPU?

All three packet forwarding mechanisms are using time (CPU cycles?) to de-encapsulate the packet and learn its destination address. Up to this point I think they are using the same time. Then a comparison is made to either the FF cache or the FIB or the routing table (process switching) for the exit interface and encapsulation method. The time difference must exist at this stage.

I don't get what the difference is whether you look up the next-hop info from either a cache or RAM? Matter of efficiency? Can someone help me understand?

3

There is an answer on Cisco Learning Network. I've copied the answer directly from the post. Credits go to Keith Barker - CCIE RS/Security, CISSP

It covers many of your questions.

Process switching requires the CPU to be personally involved with every forwarding decision.

Fast switching still uses the CPU, but after a packet has been forwarded, information about how to reach the destination is stored in a fast-switching cache. This way, when another packet going to the same destination is seen, the next hop information can be re-used from the cache, so the processor doesn’t have to look up and assemble all the information again. If the information is not cached, (for example a first packet for a given destination network) the CPU will have a similar workload, for that packet, as if fast switching was not in use.

Cisco Express Forwarding (CEF), is the evolution of optimizing the router to make it be able to forward more packets faster. CEF cheats a little, by building a Forwarding Information Base (FIB), and an adjacency table. The FIB is accessed very quickly based on how they built it (it is Cisco proprietary), and contains pre-computed reverse lookups, next hop information for routes including the interface and L2 information to use. (All the stuff a router would have to consider when forwarding a packet).

In short:
Process switching is like doing math, long hand.

Fast switching, using the cache, is like doing a problem once long hand, and subsequent problems you remember the answer for, (from memory, or the cache).

CEF is like having programmed an excel spreadsheet, and when the numbers hit the cells, the answer is already calculated.

Source: https://learningnetwork.cisco.com/thread/12668

2

It is more about "all the other things" that need to be looked up.

A Routing table will tell you the Next-Hop IP (and therefore, the exit interface).

But then the Router will have to look at the ARP table to see what the L2 encapsulation will have.

Then the Router will have to look at the Interface MTU, to ensure the packet doesn't need to be fragmented.

Then the Router will need to look at type of media to Encapsulate the packet properly (is it Ethernet2? Is it HDLC? Is it PPP?, etc).

There are a slew of others. (and I'm sure other posters to this SE will fill in the details).

But consider each "lookup" may take the same approximate time, and if so fewer lookups will always be faster than more lookups. CEF, and the like, are merely combining all the tables into one so that only one lookup is required.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.