23-2
Software Configuration Guide—Release 12.2(25)SG
OL-7659-03
Chapter23 Configuring Cisco Express Forwarding
Overview of CEF
CEF provides the following benefits:
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 ro ute 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 rou te
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 Catalyst4500 series switches, CEF loads the FIB in to the Integrated Switching Engine hardware
to increase the performance of forwarding. The Integrated Switchi ng 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 said to be 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 a n adjacency entry is
created (such as through the Address Resolution Protocol (ARP), a link-layer header for that ad jacent
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 mechanism is used for load
balancing across several paths.