TechKnowSurge
Cisco CCNA 3.2 Cisco CCNA 3.1
VideoNetworkFree

Router Processing

Router packet processing covers three core switching methods—process switching, fast switching, and Cisco Express Forwarding (CEF)—that determine how efficiently a router forwards traffic through its data plane and CPU.

Complete this video to capture a CTF flag worth 1 point.

About this video

Routers forward traffic by examining each incoming packet's destination IP address and using the routing table to select the correct next hop and egress interface. As part of this process, the router discards the incoming data-link layer encapsulation—whether Ethernet MAC addressing, PPP, or HDLC—and rebuilds it to match the technology of the outgoing interface before sending the packet on. This distinction between the data plane, which handles physical packet movement, and the CPU, which performs higher-level processing, is central to understanding how different switching methods affect router performance. Process switching is the baseline method, in which the CPU individually handles every packet, referencing the routing table each time. Fast switching improves on this by having the CPU process only the first packet to a given destination and storing the result in a fast-forward cache on the data plane; all subsequent packets to that destination are forwarded directly by the data plane without CPU involvement. Cisco Express Forwarding takes this further by pre-populating the data plane with a Forwarding Information Base (FIB) derived from the routing table and a corresponding adjacency table containing next-hop Layer 2 information, so no packet ever needs to be sent to the CPU for a forwarding decision. CEF is the most efficient of the three methods and is the default on modern Cisco platforms because it eliminates the latency and processing overhead introduced by CPU-based forwarding. Understanding the trade-offs between these three approaches is foundational knowledge for network engineers working with routing infrastructure, particularly in environments where throughput and forwarding speed are critical performance factors.

What you'll learn

What's covered

Router Packet Processing

Aligned to

Cisco CCNA
3.2 Determine how a router makes a forwarding decision by default
3.1 Interpret the components of routing table

Key terms

Router
A network device that forwards data packets between networks based on IP addresses.
Packet
A unit of data formatted for transmission over a network, containing a header, payload, and sometimes a trailer.
Encapsulation
The process of wrapping data with protocol headers as it passes down the layers of the OSI model.
Data Link Layer
Layer 2 of the OSI model responsible for node-to-node data transfer and error detection on a single network segment.
Media Access Control
MAC
A sublayer of the Data Link layer that controls how devices on a network gain access to a medium and transmit data.
IP Address
A numerical label assigned to each device connected to a network that uses the Internet Protocol.
Process Switching
A packet-forwarding method in which every packet is sent to the router's CPU for a routing table lookup before being forwarded.
Fast Switching
A packet-forwarding method that caches the first CPU-resolved routing decision in a fast-forward cache so subsequent packets to the same destination bypass the CPU.
Cisco Express Forwarding
CEF
A packet-forwarding method that pre-populates the data plane with a Forwarding Information Base and adjacency tables, allowing packets to be forwarded without CPU involvement.
Forwarding Information Base
FIB
A data structure used by CEF that contains pre-built Layer 3 forwarding entries, enabling the data plane to make forwarding decisions without consulting the CPU.

Topics

Networking Router Processing Packet Forwarding Cisco Express Forwarding Process Switching Data Plane Encapsulation

Transcript

How a Packet Gets Processed

We're going to take a technical look at how packets come into the router and how the router processes those packets. We're going to take a deep dive into three different ways that a router can process this information: how it uses process switching, how it uses fast switching, and how it uses Cisco Express Forwarding, or CEF, to be able to process these packets faster.

Right here we are going to be processing a packet. The packet is going to come in on an interface, the router is going to process it, and then it's going to go out, and it's going to look a little differently.

As this packet comes in, it has certain information in it. First of all it has the payload — that's the information that it's trying to get sent from one location to the next. Then it has directions on how it's going to get there — or not necessarily directions, actually more of an address, an address of where it's going. It comes in the form of an IP address. That's what a packet has that gives the router information on how it's going to be sent along the way. And then it has this data link layer. For instance, if this is coming up through an Ethernet, then it's going to have a destination MAC address and a source MAC address — although if it's Point-to-Point Protocol or HDLC, we know that that address looks quite a bit different.

So if this is a MAC address that's coming across — let's say this is coming in on the ethernet and there's a MAC address in this data link layer — the first thing that the router is going to do is see if that data link layer right there has the MAC address destined for the interface it's coming in on. Essentially it's going to say, does this belong to me, is this being sent to me? Once it determines that yes, this is being sent to me, it no longer needs this information. It does use the trailer to do a check to make sure that the data is correct, but then it gets rid of that trailer as well.

Now it knows that it's been destined for this router, so then it takes a look at the IP address information. It takes a look at that IP information and looks it up on the router table, and then from the router table it will determine what the next hop is and what exit interface it needs to go out. When it does that, then it will reassemble that data link layer information with a new trailer. Depending on what the new technology is, that could look quite a bit different — so if this is a Point-to-Point Protocol, we know that that data link layer looks a lot different than what it does in an Ethernet.

Inside the Router

So that is the data processing that happens on these routers, but what equipment on the router, where does this all take place? This is inside the router. First of all, the router has a backplane to it. The backplane, or the data plane, is kind of like the motherboard, really. Information comes in on this through some sort of interface, and then the data plane will figure out what it needs to do with it. A lot of times what that means is it needs to go up through the CPU and get processed by the CPU to figure out where it's going, and then gets put back on the data plane to be sent out some sort of egress interface. So it comes in on an ingress interface, gets processed by the data plane and sent to the CPU, and then gets sent out.

However, the data plane is capable of doing some processing. It is capable of doing some switching; it is capable of taking this packet and doing some processing with the packet. It's not as in-depth as the CPU can do — it's not a full processor — but it can do some jobs that the processor can do. The advantage to the data plane is that the data plane can speed up the process, whereas if it has to go to the CPU, that's going to slow down the process. So there are a couple of ways that this interplay can happen between what gets processed on the data plane and what gets processed on the CPU.

Process Switching

With process switching, pretty much it all happens on the CPU. The packet comes in, the data plane sends it to the CPU, the CPU references the routing table to see where it's supposed to go, tells the data plane where it's supposed to go, and that packet gets sent along its way.

Fast Switching

There's a way to speed this up, and that is with fast switching. Fast switching is the method where it comes in on this data plane and it gets sent to the CPU, the CPU does look at the routing table and then tells the data plane where it's supposed to go, and it's sent along the way — but as it does this, it will actually cache that information. It's called the fast forward cache.

So now the data plane has the information it needs. As a second packet comes into the data plane, it does not need to send it to the CPU. It will first of all look at the fast forward cache; if it's not in the fast forward cache, then it'll have to send it to the CPU, but if the information is in the fast forward cache, then it can send it directly out, bypassing the CPU and speeding up this whole process. So that's fast switching: it uses a fast forward cache to be able to accelerate the speed of forwarding these packets.

Cisco Express Forwarding

A step faster is Cisco Express Forwarding. We still have a routing table, we still have a CPU for certain processes, but the data plane gets loaded with some information on it. It gets loaded with this FIB and adjacency plane — FIB is a forward information base — and with adjacency tables. So then, when the packet comes in, it actually never has to go through the CPU. This FIB and adjacency table is pre-populated, so that way it can bypass the CPU altogether and send the data along its way. This is the fastest method out of all of them.

We talked about how routers will process these packets, and we talked about three different methods that it can use to speed up the processing. The standard actually is just the process switching, but you can use fast switching or Cisco Express Forwarding to be able to accelerate how fast it processes these packets.

About TechKnowSurge

TechKnowSurge builds IT and cybersecurity professionals through hands-on, concept-first training built around real understanding — not memorization. Free interactive tools, structured programs, and 25+ years of real-world experience, all in one place.

Explore free tools and programs →