Cisco Express Forwarding
MPLS relies on Cisco Express Forwarding (CEF) to indicate the next hop
for a packet to use. Cisco routers can use three types of packet switching:
�¡ Process switching.The CPU must be interrupted and a route table
lookup done for every packet. This is the slowest type of switching.
�¡ Fast switching.A route table lookup is done only for the first packet
in a flow. The next-hop information, including the Layer 2 header, is
cached and used for the remainder of the packets in the flow. Faster
than process switching.
�¡ CEF switching.The router builds tables of next-hop and Layer 2
information before any traffic is received. This is the fastest type of
switching.
CEF takes information from the IP routing table and builds its own table, the
Forwarding Information Base (FIB). Because the CEF table is based on the
routing table, any route changes are immediately reflected in it. CEF also builds
an adjacency table, which contains the Layer 2 header for each next-hop
neighbor. When a packet needs to be forwarded through the router, CEF can
usually do all the processing in hardware, making it extremely fast. With
MPLS, an extra field with label information is added to the FIB.