Section 8.1: CEF Components

Information conventionally stored in a route cache is stored in two data structures for CEF switching. The data structures are the Forwarding Information Base (FIB) and the Adjacency Tables, and provide optimized lookup for efficient packet forwarding.

8.1.1: Forwarding Information Base (FIB)

CEF uses a FIB to make IP destination prefix-based switching decisions. The FIB is similar to a routing table and maintains a mirror image of the forwarding information contained in the IP routing table. When routing or topology changes, the IP routing table is updated, and those changes are reflected in the FIB. The FIB also maintains next-hop address information based on the information in the IP routing table. 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.

8.1.2: Adjacency Tables

Nodes in the network are adjacent if they are a single hop across a link layer from each other. CEF uses adjacency tables to maintain Layer 2 next-hop addresses for all FIB entries. The adjacency table is populated as adjacencies are discovered. Each time an adjacency entry is created; a link-layer header for that adjacent node is computed and stored in the adjacency table. Once a route is determined, it points to a next hop and corresponding adjacency entry. It is subsequently used for encapsulation during CEF packet switching. However, a route might have several paths, such as when a router is configured for load balancing and/or redundancy. For each resolved path, a pointer is added for the adjacency corresponding to the next-hop interface for that path. This mechanism is also used for load balancing across several paths.

In addition to adjacencies associated with next-hop interfaces, other types of adjacencies are used to facilitate switching when exception processing conditions exist. When the prefix is defined, prefixes requiring exception processing are cached with one of the special adjacencies listed in Table 8.1.

Table 8.1: Adjacency Types for Exception Processing

Adjacency Type

Purpose

Null adjacency

Glean adjacency

Drops packets destined for a Null interface. This can be used as are form of access filtering.

When a router is connected directly to several hosts, the FIB

table on the router maintains a prefix for the subnet rather than for the individual host prefixes. The subnet prefix points to a glean adjacency. When packets need to be forwarded to a specific host, the adjacency database is "gleaned" for the specific prefix.

Punt adjacency

Discard adjacency Drop adjacency

Features that require special handling or features that are not yet supported in conjunction with CEF switching paths are forwarded to the next switching layer for handling while features that are not supported are forwarded to the next higher switching level.

Discards packets.

Drops packets, but checks the prefix.