Distributed Cisco Express Forwarding
Information About Cisco Express Forwarding
Cisco Express Forwarding (CEF) is a Layer 3 IP switching technology used to optimize network performance.
CEF implements an advanced IP look-up and forwarding algorithm to deliver maximum Layer 3 switching
performance. CEF is less CPU-intensive than fast switching route caching, allowing more CPU processing
power to be dedicated to packet forwarding. In a switch stack, the hardware uses distributed CEF (dCEF) in
the stack. In dynamic networks, fast switching cache entries are frequently invalidated because of routing
changes, which can cause traffic to be process switched using the routing table, instead of fast switched using
the route cache. CEF and dCEF use the Forwarding Information Base (FIB) lookup table to perform
destination-based switching of IP packets.
The two main components in CEF and dCEF are the distributed FIB and the distributed adjacency tables.
•
The FIB is similar to a routing table or information base and maintains a mirror image of the forwarding
information in the IP routing table. When routing or topology changes occur in the network, the IP
routing table is updated, and those changes are reflected in the FIB. The FIB maintains next-hop address
information based on the information in the IP routing table. Because the FIB contains all known routes
that exist in the routing table, CEF eliminates route cache maintenance, is more efficient for switching
traffic, and is not affected by traffic patterns.
•
Nodes in the network are said to be adjacent if they can reach each other with a single hop across a link
layer. CEF uses adjacency tables to prepend Layer 2 addressing information. The adjacency table
maintains Layer 2 next-hop addresses for all FIB entries.
Because the switch or switch stack uses Application Specific Integrated Circuits (ASICs) to achieve
Gigabit-speed line rate IP traffic, CEF or dCEF forwarding applies only to the software-forwarding path, that
is, traffic that is forwarded by the CPU.
How to Configure Cisco Express Forwarding
CEF or distributed CEF is enabled globally by default. If for some reason it is disabled, you can re-enable it
by using the ip cef or ip cef distributed global configuration command.
The default configuration is CEF or dCEF enabled on all Layer 3 interfaces. Entering the no ip route-cache
cef interface configuration command disables CEF for traffic that is being forwarded by software. This
command does not affect the hardware forwarding path. Disabling CEF and using the debug ip packet detail
privileged EXEC command can be useful to debug software-forwarded traffic. To enable CEF on an interface
for the software-forwarding path, use the ip route-cache cef interface configuration command.
Although the no ip route-cache cef interface configuration command to disable CEF on an interface is
visible in the CLI, we strongly recommend that you do not disable CEF or dCEF on interfaces except for
debugging purposes.
Caution
To enable CEF or dCEF globally and on an interface for software-forwarded traffic if it has been disabled:
Routing Configuration Guide, Cisco IOS XE Everest 16.6.x (Catalyst 9500 Switches)
180
Configuring IP Unicast Routing
Distributed Cisco Express Forwarding