Cisco Express Forwarding (CEF)
Total Page:16
File Type:pdf, Size:1020Kb
White Paper Cisco Express Forwarding (CEF) Cisco’s Express Forwarding (CEF) technology for IP is a CEF avoids the potential overhead of continuous cache scalable, distributed, layer 3 switching solution designed to churn by instead using a Forwarding Information Base (FIB) meet the future performance requirements of the Internet and for the destination switching decision which mirrors the Enterprise networks. It represents the latest advance in Cisco entire contents of the IP routing table. i.e. there is a IOSTM switching capabilities that includes NetFlowTM one-to-one correspondence between FIB table entries and Switching and Distributed Switching. CEF is also a key routing table prefixes; therefore no need to maintain a component of Cisco’s Tag Switching architecture. route-cache. Express Forwarding evolved to best accommodate the This offers significant benefits in terms of performance, changing network dynamics and traffic characteristics scalability, network resilience and functionality, particularly resulting from increasing numbers of short duration flows in large complex networks with dynamic traffic patterns. typically associated with Web-based applications and CEF Performance interactive type sessions. Existing layer 3 switching paradigms use a route-cache model to maintain a fast lookup CEF implements a Cisco patent-pending expedited IP table for destination network prefixes. The route-cache look-up and forwarding algorithm to deliver maximum layer entries are traffic-driven in that the first packet to a new 3 switching performance. Additionally Express Forwarding destination is routed via routing table information and as is less CPU intensive than route-caching therefore it allows part of that forwarding operation, a route-cache entry for more CPU horsepower to be dedicated to packet forwarding. that destination is then added. This allows subsequent CEF Scalability - dCEF packets flows to that same destination network to be Cisco’s Express Forwarding technology is optimized for switched based on an efficient route-cache match. These information distribution allowing it to take advantage of the entries are periodically aged out to keep the route cache distributed architecture of the high end Cisco IOS(tm) current and can be immediately invalidated if the network routers such as the C7500. Thus Distributed CEF (dCEF) topology changes. This ‘demand-caching’ scheme — delivers scalable switching capacity by providing each of the maintaining a very fast access subset of the routing topology C7500 Versatile Interface Processors (VIPs) with an identical information — is optimized for scenarios whereby the on-card copy of the FIB database enabling them to majority of traffic flows are associated with a subset of autonomously perform Express Forwarding and therefore destinations. However, given that traffic profiles at the core significantly increase aggregate throughput. CEF also uses of the Internet (and potentially within some large Enterprise Adjacency Tables to hold the layer 2 next hop addresses for networks) are no longer resembling this model, a new all FIB entries so that the associated prepend can be added switching paradigm was required that would eliminate the locally, thus minimizing latency, before switching between increasing cache maintenance resulting from growing linecards. Therefore in the case of dCEF on the C7500 numbers of topologically dispersed destinations and dynamic platform, the Route Switch Processor (RSP) is relieved of any network changes. switching operation and so has significantly more CPU power available to perform routing functions, management, network services etc. Copyright © 1997 Cisco Systems, Inc. All Rights Reserved. Page 1 of 4 C7500 Distributed Architecture Route Switch Processor Forwarding Routing Information Table Base IPC Versatile Interface Processor Versatile Interface Processor Versatile Interface Processor Forwarding Adjacency Forwarding Adjacency Forwarding Adjacency Information Information Information Table Table Table Base Base Base dCEF employs a reliable Inter Process Communications entries to be invalidated and then reestablished to reflect any (IPC) mechanism to ensure guaranteed and synchronized FIB topology changes. In networking environments which information and because of the correlation between FIB frequently experience significant routing activity (such as the entries and the routing table, updates are only sent to the VIP Internet backbone) this can cause traffic to be forwarded via linecards when changes in the routing topology occur. the routing table (which represents Cisco IOS(tm) Process Cisco’s upcoming Gigabit Switch Router (GSR) will also Level Switching) as opposed to via the route-cache (Cisco employ dCEF to deliver full topology forwarding at IOS(tm) Fast Switching). During major network convergence performance rates of millions of packets per second per or flux, performance can thus be sub-optimal. line card. Express Forwarding obviates this Process Switching/ Fast Switching scenario and since the FIB is topology-driven CEF Resilience rather than traffic-driven, CEF’s switching performance is Express Forwarding offers an unprecedented level of largely independent of and unaffected by network size or switching consistency and stability in large, dynamic dynamics. networks. This results from the fact that the FIB look-up table CEF Functionality contains all known routes therefore eliminating the potential Express Forwarding is feature-rich in that it can be used in for “cache-misses” which occur with demand caching conjunction with leading-edge Cisco IOS(tm) capabilities. schemes. i.e. if a route is not found in the forwarding cache, Even when deployed in dCEF mode, there is no compromise the first packet(s) then looks to the routing table to determine between performance and functionality, hence backbone the outbound interface and then a cache entry is added for networks can realize the benefits of Express Forwarding that destination. Since the cache information is derived from while still having the flexibility to offer Cisco IOS(tm) the routing table, routing changes cause existing cache network services. Copyright © 1997 Cisco Systems, Inc. All Rights Reserved. Page 2 of 4 These capabilities include: • Quality of Service – IP Precedence based Class of Service and Weighted Random Early Detection (wRED) support. • Load Balancing – Per destination (the default) and per packet over equal/unequal cost links for as many paths as known in the routing topology • Traffic Statistics – Byte and packet counts at a granularity of per-prefix, per-neighbour etc. • Media Independence – CEF currently supports Packet over Sonet, ATM/AAL5, Frame Relay, Ethernet, FDDI, HDLC and mPPP • Tunneling – Generic Route Encapsulation (GRE) • Cisco IOS(tm) subinterface support – allowing for the flexibility of per subinterface configurations e.g. MTU Express Forwarding and Netflow(tm) Switching When deployed along with CEF, NetFlow Switching is NetFlow Switching manages traffic in terms of flows between typically used at the periphery of the Layer 3 backbone network layer source-destination address pairs and unlike network and Express Forwarding used in the core since it is conventional destination-prefix based forwarding, it also most useful and efficient to perform any security, QoS or provides visibility to the application layer. By caching this accounting operations early in the data path and at the level of information on a per-session basis, NetFlow network boundary as traffic is forwarded to and from the Switching is designed to support complex packet filtering backbone: security without incurring any per-packet overhead. i.e. only Express Forwarding and Tag Switching the initial packet is passed through the Access Control Lists Tag Switching combines the price/performance and traffic (ACLs) and if allowed, used to build a NetFlow entry management capabilities of Layer 2 cell or frame switching containing address, port and application information such with the scalability and functionality of Layer 3 routing. This that subsequent packets belonging to that flow match this multilayer integration is achieved by having routers and entry and therefore do not need to also be compared against switches interconnect as peer networking devices, an the ACLs. NetFlow Switching’s traffic profiling capabilities, architecture that scales well beyond existing models. when used in conjunction with NetFlow Data Export, also Essentially the technology associates a small tag value with facilitate sophisticated network billing and accounting destination prefixes such that packets going to a particular applications. Traffic flows are now invariably short-lived and destination now have a tag prepended as they are switched to maximize performance entries are removed as soon as the across the network. This therefore allows Tag Switching particular flow finishes. In environments with very many devices to perform very efficient and fast forwarding concurrent flows, this can mean significant NetFlow decisions (using a technique known as ‘label-swapping’) and demand-cache maintenance, with the initial packet from new so deliver the switching speeds that will be required with flows used in establishing the entries having to be Process future line rates. Switched. Now, by using the Forwarding Information Base for flow creation, NetFlow Switching avoids this overhead. NetFlow Switching Cisco Express Forwarding • Deployed at backbone periphery • Deployed at Layer 3 network core for network services: for: Traffic Accounting Forwarding Performance