Layer 3 Packet Forwarding - connorethanjay/CCNP-Enterprise-Preparation GitHub Wiki

Notes on L3 Packet Switching / Forwarding

Packet Switching can be either very efficient or very inefficient for the CPU depending on the method.

Process Switching (the oldest method for Packet Switching back in the 1980s - 1990s) would analyze every packet using the Router's CPU, compare each packet to the Routing table, and forward those packets out to the correct interface.

This is incredibly inefficient with much faster networking speeds (eg. Gigabit and 10 Gigabit Ethernet).

Common uses for Process Switching:

  • SSH-ing into a router
  • Debugging a packet

What is CEF (Cisco Express Forwarding)?

Cisco Express Forwarding is a Cisco-proprietary form of layer 3 forwarding (packet switching) intended for growing networks with varying / dynamic traffic patterns. It is much less CPU-intensive than older forwarding methods.

Cisco Express Forwarding maintains it's own tables / information bases.

  • CEF Forwarding Information Base (FIB):

  • The FIB is very similar to a routing table, maintaining next-hop address information based on information in the routing table. There is a one-to-one correlation between routing table entries and FIB entries, and because of that the FIB contains all known routes. This eliminates the need for route cache maintenance.

    • The FIB is updated with each routing table update.
    • The Processor is not involved with route lookup.
    • The FIB is a much more efficient lookup structure.
  • CEF Adjacency Table

  • The Adjacency table is used to maintain addressing information for all Layer 2 next-hop addresses in the FIB. Nodes in the network are adjacent if they can reach each other with a single hop via layer 2.

    • Has information about directly connected devices.
    • Adjacency = reachable via a single Layer 2 (link layer) hop.
    • Layer 2 next-hop addresses are maintained in the table.

Cisco Express Forwarding can be enabled in one of two modes:

Central CEF:

In Central mode, the route processor will perform the express forwarding. The FIB and adjacency tables will reside on the route processor. Use this if line cards are not available for CEF forwarding, or if you need to use features incompatible with Distributed CEF forwarding (See below).

Distributed CEF: In dCEF, line cards (a line card is an IO module / expansion card which provides ports for transmitting/receiving network traffic) will perform the express forwarding on their own (maintaining identical copies of the FIB and adjacency tables). This relives stress from the main processor. dCEF uses Inter-process communication (FOR-210 w/ Prof. Khader) to synchronize the FIB and adjacency table between the route processor and line cards.