1.6 Routing and Switching in a Cisco Router
A packet transiting the router is accepted into the router if the frame header contains the Layer 2 address of one of the router's interfaces. If properly addressed, after the framing is checked, the frame and its content are buffered, pending further processing. The buffering occurs in main memory or some other specialized memory location. If the source and destination Layer 3 address of the datagram have not been seen by this router before, the datagram will be process switched or routed. This event, a process initiates a lookup in this routing table and a decision about how the datagram should be forwarded. The packet is then encapsulated. If fast switching is enabled, the packet is then examined again, and an entry is put into a route cache. On subsequent packets, if the IP destination matches a prefix found in the route cache, the packet is forwarded using this information. The routing function is not disturbed, nor are the CPU cycles required to feed this monster expended. The type of route cache used depends on the hardware used. The caches available are called fast switching, autonomous switching, silicon switching, and Cisco Express Forwarding (CEF). If CEF switching is used, then the story changes again. With CEF switching, each card runs its own copy of the express forwarding and has its own copy of a forwarding information base (FIB). In the event of a routing change, this new entry is forwarded by the CPU to each separate line card.