MPLS Fundamentals: 4 – CEF

Process Switching

Process switching is the slowest of all switching methods. When switching a packet through the router, a Cisco IOS process copies  the packet to the CPU memory and looks up the destination IP address in the IP routing table. Based on the outcome of this lookup,  the process switches out the packet on a particular interface after it does some housekeeping on the IP header.

Fast Switching

The first packet for a destination that arrives is process switched. The switching of the first packet by the central CPU gives the CPU  the opportunity to build a cache. This cache is called the IP fast switching route cache and is used by the interrupt code to switch  subsequent packets for the same destination.

If a prefix changes in the routing table, the entry in the fast switching cache is invalidated, and the first packet for a destination has  to be process-switched again to build the new entry in the route cache.

Each IP prefix entry in the route cache has an outgoing interface, next hop, and Layer 2 rewrite field. This Layer 2 rewrite (or MAC  rewrite) is the information that the router needs to change in the Layer 2 frame header when the frame is rebuilt so that it can be  sent on the outgoing interface. Continue reading “MPLS Fundamentals: 4 – CEF”

Share this!