 preferred. The number of steps involved in forwarding a packet varies with the switching path used. The method of storing and retrieving next-hop and interface information also differs in each of the switching paths. Additionally, various router models operate differently in terms of memory and where the decisions are made. Chapter 15: Switching Algorithms in Cisco Routers Process Switching The original method of determining which interface to forward a packet to is called process switching. This may be the easiest method to understand because it behaves in a way you'd probably expect. With process switching, when a packet comes in, the processor calls a process that examines the routing table, determines what interface the packet should be switched to, and then switches the packet. This happens for every packet seen on every interface. Figure 15-2 shows the steps involved. Routing Information Base Input process (RIB) Processor Process memory Input Output Network interface interface Network media Input/output memory media processor processor Figure 15-2. Process switching These are the steps for process switching: 1. The interface processor detects a packet and moves the packet to the input/ output memory. 2. The interface processor generates a receive interrupt. During this time, the central processor (CPU) determines the packet type (IP), and copies it to the pro- cessor memory, if necessary (this is platform-dependent). The processor then places the packet on the appropriate process's input queue and releases the interrupt. The process for IP packets is titled ip_input. When the scheduler next runs, it notices the presence of a packet in the input queue for the ip_input process, and schedules the process for execution. 4. When the ip_input process runs, it looks up the next hop and output interface information in the RIB. The ip_input process then consults the ARP cache to retrieve the layer-2 address for the next hop. 5. The process rewrites the packet's MAC header with the appropriate addresses, then places