Figure 17-12 shows a router connecting different types of
networks.
Figure 17-12 Using a Router to Connect Different
Networks
Routing in So ware
As discussed earlier in this chapter, routers participate in
route discovery, path determination, and packet
forwarding. Route discovery and path determination are
part of the routing protocol, and as the router becomes
part of this discovery process, it discovers and updates
the routing tables accordingly. There are basically three
types of forwarding:
Process switching: The CPU is involved for every packet that is
routed and requires a full routing table lookup. Process switching,
shown in Figure 17-13, is the slowest type of forwarding as each of the
packets that the interface driver receives (step 1 in the figure) is punted
and put in the input queue for the processor for further action (step 2).
In this case, the processor receives the packets (step 3), determines the
next interface it needs to send them to, and rewrites the headers as
needed and puts the new packets in the output queue (step 4). Finally,
the kernel driver for the new network interface picks up the packets and
transmits them on the interface (step 5).