Cisco Packet-Switching Mechanisms

Cisco Packet-Switching Mechanisms

At the beginning of this chapter, the distinction between IP forwarding and IP routing is discussed, and the separation between the forwarding plane and the control plane in modern routers is mentioned. As noted, the control plane is associated with the route processor, which runs the routing protocols. As illustrated in Figure 1-9, actual forwarding of packets is performed by dedicated hardware-based forwarding engines, which are mainly implemented in application-specific integrated circuits (ASICs). ASIC-based forwarding engines are necessary to achieve high forwarding rates. CPU-based forwarding is relatively slow; however, over the years , Cisco has developed various methods for speeding up the lookup process on CPU-based router processors. Fast switching is one such mechanism. Fast switching later evolved into Cisco Express Forwarding (CEF). The predecessor of both fast switching and CEF switching is referred to as process switching.

Process Switching

Process switching refers to switching packets by queuing them to the CPU on the route processor at the process level. In this case, every packet-switching request is queued alongside other applications and serviced, in turn , by the CPU on the route processor. The CPU performs route lookup for every packet to determine the Layer 2 rewrite string before the packet is switched to the next hop or destination. Obviously, process switching is slow and can be CPU- intensive . Process switching is illustrated in Figure 1-10.

Figure 1-10. Illustration of process switching.

graphics/01fig10.gif

Fast Switching

Fast switching is an enhancement of process switching in which any packet-switching request is first performed at the process level, and the Layer 2 rewrite information obtained is cached for reuse. When fast switching is enabled, the CPU receives an interrupt for any forwarding request to check the IP cache for a matching entry to the destination. If an entry is found, the Layer 2 rewrite is retrieved and the packet is switched immediately. If no entry exists, the packet is queued for process switching. After it is process switched, the Layer 2 rewrite is then cached for reuse. Note that the fast-switching cache is built by process switching the first packet to any destination. Figure 1-11 shows the fast-switching process.

Figure 1-11. Illustration of fast switching.

graphics/01fig11.gif

Cisco Express Forwarding

CEF takes fast switching a step further by abandoning the latter's demand-based mechanisms and dependence on process switching to build the fast-switching cache (see Figure 1-12). Instead, CEF predetermines all the Layer 2 rewrite information, where possible, for all known entries in the routing table. This allows CEF to switch at interrupt context for even the first packet to any destination. An exception exists for destinations on connected multipoint media such as LANs, where an ARP process is required for the first packet to any connected host, to obtain Layer 2 rewrite information for the destination. CEF also optimizes storage by using two databases: one for prefixes, called the forwarding information base ( FIB ); and the other for Layer 2 rewrite information, called the adjacency database.

Figure 1-12. Illustration of CEF switching.

graphics/01fig12.gif

Currently, most Cisco routers have only one active route processor if even more than one are installed; therefore, where process switching is allowed, it is done at only a central location. In routers with distributed architecture, such as the Cisco 7500 Series, however, the fast-switching cache and the CEF tables can be distributed to intelligent interface processors known as versatile interface processors ( VIP ) to enable concurrent distributed forwarding at many locations in the router. The Cisco 12000 Series routers have a fully distributed architecture and also support only distributed CEF switching to achieve high forwarding rates. For more information on packet switching on Cisco routers, read Inside Cisco IOS Software Architecture (Cisco Press. 2000. ISBN: 1-57870-181-3) and Large-Scale IP Network Solutions (Cisco Press. 2000. ISBN: 1-57870-084-1).



IS-IS Network Design Solutions
IS-IS Network Design Solutions (Networking Technology)
ISBN: 1578702208
EAN: 2147483647
Year: 2005
Pages: 144
Authors: Abe Martey

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net