Cisco Express Forwarding (CEF) is advanced, layer 3 IP forwarding technology. CEF optimizes network performance and scalability where networks have large and dynamic traffic patterns, such as the Internet itself.
CEF offers the following benefits:
● Improved performance—CEF is less CPU-intensive than older fast switching. As a result, more CPU processing power can be dedicated to other layer 3 services such as quality of service (QoS) and encryption.
● Scalability—CEF offers full switching capacity at each line card or blade when distributed CEF (dCEF) mode is active.
● Resilience—CEF offers switching consistency and stability in large dynamic networks. In dynamic networks, fast-switched cache entries go through high level of churn and are frequently invalidated due to routing changes. These changes can cause traffic to be process switched using the routing table, rather than fast switched using the route cache. With CEF, Forwarding Information Base (FIB) lookup table contains all known routes that exist in the routing table, it eliminates route cache maintenance and as a result avoids sub optimal forwarding scenarios that takes place with the fast-switch or process switching.
CEF uses a FIB to make IP destination prefix-based switching decisions. The FIB is conceptually similar to a routing table or information base. It maintains a mirror image of the forwarding information contained 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.
Hardware based switching platforms use Content Addressable Memory (CAM) for storing the CEF related information. These tables are finite and can fill up to exhaustion, which would cause forwarding to fall back to software. Catalyst 4500, as an example, can carry up to 128K entries in Supervisor IV/ V CAMs. Once those entries are filled up, it switches to software forwarding with an error message “C4K_L3HWFORWARDING-2-FWDCAMFULL”. You can verify CAM table usage by show platform hardware ip route summary command.
Adam, Paul (2014-07-12). All-in-One CCIE V5 Written Exam Guide (Kindle Locations 867-873). . Kindle Edition.