Switching - CEF

Cisco Express Forwarding (CEF) also known as topology based switching, is a switching methodology used by routers and Layer 3 switches. CEF creates a forwarding table within the hardware before any switching takes place. All packets are switched directly by hardware.

Specifically, it creates the Forwarding Information Base (FIB). The FIB 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 such as fast switching and optimum switching

It also maintains the adjacency table which is used to prepend Layer 2 addressing information. The adjacency table maintains Layer 2 next-hop addresses for all FIB entries.

This method is faster than both process switching and fast switching.