31-2
Software Configuration Guide—Release 15.0(2)SG
OL-23818-01
Chapter 31 Configuring Cisco Express Forwarding
About CEF
CEF provides the following features:
Improves performance over the caching schemes of multilayer switches, which often flush the entire
cache when information changes in the routing tables.
Provides load balancing that distributes packets across multiple links based on Layer 3 routing
information. If a network device discovers multiple paths to a destination, the routing table is
updated with multiple entries for that destination. Traffic to that destination is then distributed
among the various paths.
CEF stores information in several data structures rather than the route cache of multilayer switches. The
data structures optimize lookup for efficient packet forwarding.
Forwarding Information Base
The Forwarding Information Base (FIB) is a table that contains a copy of the forwarding information in
the IP routing table. When routing or topology changes occur in the network, the route processor updates
the IP routing table and CEF updates the FIB. Because there is a one-to-one correlation between FIB
entries and routing table entries, the FIB contains all known routes and eliminates the need for route
cache maintenance that is associated with switching paths, such as fast switching and optimum
switching. CEF uses the FIB to make IP destination-based switching decisions and maintain next-hop
address information based on the information in the IP routing table.
On the Catalyst 4500 series switches, CEF loads the FIB in to the integrated switching engine hardware
to increase the performance of forwarding. The integrated switching engine has a finite number of
forwarding slots for storing routing information. If this limit is exceeded, CEF is automatically disabled
and all packets are forwarded in software. In this situation, you should reduce the number of routes on
the switch and then reenable hardware switching with the ip cef command.
Adjacency Tables
In addition to the FIB, CEF uses adjacency tables to prepend Layer 2 addressing information. Nodes in
the network are termed adjacent if they are within a single hop from each other. The adjacency table
maintains Layer 2 next-hop addresses for all FIB entries.

Adjacency Discovery

The adjacency table is populated as new adjacent nodes are discovered. Each time an adjacency entry is
created (such as using the Address Resolution Protocol (ARP), a link-layer header for that adjacent node
is stored in the adjacency table. Once a route is determined, the link-layer header points to a next hop
and corresponding adjacency entry. The link-layer header is subsequently used for encapsulation during
CEF switching of packets.

Adjacency Resolution

A route might have several paths to a destination prefix, such as when a router is configured for
simultaneous load balancing and redundancy. For each resolved path, a pointer is added for the
adjacency corresponding to the next-hop interface for that path. This method is used for load balancing
across several paths.