Per−destination load balancing—Enabled by default when you enable CEF. It allows multiple paths
to be used for load sharing. Packets destined for a given destination or source host are guaranteed to
take the same path, although multiple destinations are available.
Per−packet load balancing—Uses a round−robin approach to determine what path individual packets
will take over the network. Per−packet load balancing ensures balancing when multiple paths are
available to a given destination. This method allows packets for a given destination to take different
paths. However, per−packet load balancing does not work well with data such as Voice over IP and
video; these types of data packets need a guarantee that they will arrive at the destination in the same
sequence they were sent.
The Adjacency Table
The adjacency table maintains a one−to−one correspondence to the FIB. All entries in the FIB are maintained
in the adjacency table. A node is said to be adjacent if the node can be reached in one hop. CEF uses the
adjacency table to apply Layer 2 address information determined by such protocols as Address Resolution
Protocol (ARP) when the next hop must use the physical hardware address of the interface. The adjacency
table provides the Layer 2 information necessary to switch the packet to its next point destination; the table is
updated as adjacencies are discovered.
The adjacency table contains the MAC address for routers that map to Layer 2 to Layer 3 addresses. It uses
the IP ARP to populate neighbors gleaned from IP and Internetwork Packet Exchange (IPX) updates, indexed
by interface and address. For each computed path, a pointer is added for the adjacency corresponding to the
next hop. This mechanism is used for load balancing where more than one path exists to a destination.
Using host−to−route adjacencies, a few other types of adjacencies are used to expedite switching in certain
instances. Let’s look at these instances and the conditions in which other adjacencies are used:
Null adjacency—Packets destined for a Null0. The Null0 address is referred to as the bit bucket.
Packets sent to the bit bucket are discarded. This is an effective form of access filtering.
Glean adjacency—A node connected directly to more than one host, such as a multihomed PC. In this
situation, the router or switch maintains a prefix for the subnet instead of the individual host. If a
packet needs to reach a specific host, the adjacency table is gleaned for the information specific to that
node.
Punt adjacency—Packets that need to be sent to another switching layer for handling. This is done
when a packet needs special handling, or when the packets need to be forwarded to a higher switching
layer.
Discard adjacency—Packets that are sent to the bit bucket and whose prefix is checked. The Cisco
12000 GSR is the only Cisco device using this type of adjacency.
CEF Search Engine
The CEF search engine can make either Layer 2−based or Layer 3−based switching decisions. The FIB places
incoming packets into the internal memory. From there, the first 64 bytes of the frame are read. If a Layer 2
adjacency resolution needs to be made, the microcode sends the search engine the relevant source MAC
address, destination MAC address, or the Layer 3 network destination. The search engine then conducts a
lookup of the CAM table for the corresponding information. CEF uses the search engine to find the MAC
address or the longest match on the destination network address. It does this very quickly and responds with
the corresponding rewrite information; it then stores this information in the CAM table.
The CEFA now knows the port−of−exit for the packet, based either on its MAC address or on the Layer 3 IP
or IPX network numbers. The packet is now transferred across the switching fabric to its point of destination
to be sent to its next hop. The destination interface prepares the packet prior to exiting the switch. Figure 4.3
shows the CEFA components.
74