put/output memory. When a packet comes into an inter- face, the router must decide to which interface the packet should be sent. Once that decision is made, the packet's MAC headers are rewritten and the packet is sent on its way. Input Output Network interface interface Network media media processor processor Input Output Network interface media Input/output memory interface Network media processor processor Input Output Network interface interface Network media media processor processor Packets must get from one interface to another. How the router decides which interface to switch the packet to is based on the switching path in use. Figure 15-1. Router switching requirements The routing table contains all the information necessary to determine the correct in- terface, but process switching must be used to retrieve data from the routing table, and this is inefficient. Interrupt context switching is typically 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 dif- ferently in terms of memory and where the decisions are made. Chapter 15: Switching Algorithms in Cisco Routers Process Switching The original method for determining to which interface a packet should be forwarded 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 scheduler calls a process that examines the routing table, determines which 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 following 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) det