CEF ( Cisco Express Forwarding) technology is a new routing exchange scheme introduced by Cisco Corporation. It has good switching performance, enhanced switching architecture and high packet Forwarding rate.
The basic function of traditional router is routing computing and packet forwarding, usually based on shared memory architecture, using centralized CPU, That is, a single CPU ( or multiple CPU, connected into a router cluster) controls the shared bus and connects multiple interface cards. The interface card contains a simple queue and other structures. It communicates with the CPU and forwards the data packets through a shared bus. With the rapid development of the Internet and the emergence of a large number of new service requirements, The requirement of routing and switching performance is higher. In order to improve the packet forwarding rate and system performance, we must improve the design architecture of the traditional router and switch device, and add some new designs to improve the system performance. The switch router using CEF technology has qualitative changes in architecture, routing mode and interface card performance, especially in the core layer of large traffic ISP network, and is also widely used in the backbone of high-speed enterprise network.
CEF has two modes:
Allow a routing processing module to run Express Switch, i.e., FIB and adjacency table reside in the routing processing module, the centralized CEF switching mode can be used when the line card is unavailable or does not have the function of decentralized CEF switching.
The (normally called dCEF) allows the router’s multiple line cards (VIP) to run the Express Switch function separately, provided that the line is a VIP line card or a GSR line card. The central routing processor completes the functions of system management/ routing selection and transfer computing, and distributes the CEF table to a single line card. Each line card maintains the same copy of a FIB and adjacency table. The line card performs fast forwarding between the port adapters so that the switch operation does not involve the routing switch module. DCEF uses an “internal process communication” mechanism to ensure the synchronization of the FIB and adjacency tables between the routing processor and the interface card.
The original Cisco router used centralized CPU packet switching. All packets were transferred to the CPU by shared bus, looked up by route table, recalculated by CRC, and then passed the shared bus to the appropriate circuit card.
An IP packet that arrives at a specific destination address usually causes a packet flow, i.e., if a packet is swapped to a specific destination, another packet is likely to arrive soon. By building a cache for the swap target, you can reduce the number of times a packet finds the same object in the full routing table, This “one-time routing, then switching” approach is called fast switching, which greatly increases the packet forwarding rate of the router, and thus becomes the default switch mechanism on the Cisco router platform. However, it should be noted that the change of IP routing table will invalidate the cache, and the advantage of routing caching will be limited in the changing routing environment.
Autonomous switching is characterized by unloading some of the switching capabilities from the CPU. In effect, move the routing cache function from the CPU to the secondary switch processor, The receive packet on the line card completes the local route cache target lookup in the switch processor and interrupts the CPU to perform the route table lookup if the lookup fails. Here, Cisco renames the CPU that periodically computes the route to a routing processor, and the secondary switch processor to a switch processor. Implementation of autonomous switching on a Cisco 7000-series router can improve throughput and other performance.
With the introduction of the VIP ( Versatile Interface Processor) card, the switch architecture of the router is gradually developed to the peer-to-peer multiprocessor architecture. Each VIP card contains an RISC processor that maintains the latest copies of the fast swap cache generated by the routing switch processor, It can realize the function of routing switch independently and finish two types of switching at high speed-local VIP exchange and VIP exchange.
As mentioned earlier, the cache mechanism for fast swapping is used in high-speed dynamic routing environments such as the Internet (often with network topology changes) Routing changes, routing shocks, etc. do not scale well, and routing changes cause cache invalidation, while reconstructing caches (that is, processes that perform “process switching”) is computationally expensive. At the same time, with the rapid development of Internet and its services, various applications and interactive services based on WEB increase the real-time data stream with high communication frequency and short communication time, The cache content of fast swapping is in a state of flux, and the burden of rebuilding cache is increased, which leads to the performance degradation of the router. The CEF Express Exchange technology is designed to address the above shortcomings.
CEF is an advanced Layer 3 switching technology, which is mainly designed for high performance and high scalability of the third layer IP backbone switching. To optimize the routing lookup mechanism for packet Forwarding, CEF defines two main components: a Forwarding Information base and an Adjacency Table.
Forward Information Base ( FIB) is the lookup table that the router decides to exchange the target. There is a one-to-one correspondence between the FIB entries and the IP routing table entries, that is, FIB is a mirror image of the routing information contained in the IP routing table. Since the FIB contains all the required routing information, the routing cache is no longer maintained. When the network topology or route changes, the IP routing table is updated and the content of the FIB changes.
CEF leverages the adjacency table to provide the required information for the MAC layer rewriting of a packet. Each item in the FIB points to a next-hop relay section in the adjacency table. If the adjacent nodes can forward each other through the data link layer, the nodes are listed in the adjacency table.
Once the system finds the adjacency relationship, it writes it to the adjacency table, and the adjacency sequence is generated at any time, producing one adjacency item at a time, It pre-computes a link layer header information for the adjacent node and stores the link layer header information in the adjacency table, which points to the next network segment and the corresponding adjacency entry when routing is decided. The packets are then encapsulated with CEF swapping when it is performed. To view information about the adjacency table, you can use the Cisco IOS command: show adjacency/show adjacency detail. When we look at the adjacency table information, we find the following two main adjacency types: Host adjacency and Point to Point.. The Host adjacency type is typically displayed as an IP address, which represents the next hopped IP address adjacency to it; The Point to Point type is displayed as “Point 2point”, which means it’s a Point-to-Point circuit. There are other special types, such as Null adjacency, Glean adjacency, and so on.
CEF is a high-speed switched mode designed for high-performance, high-scalability IP backbone networks. From the above introduction we can see that CEF can provide unprecedented consistency and stability in large-scale dynamic IP networks. It can effectively make up for the frequent failure of cache entries in fast switch. Using dCEF distributed switch, each line card can be exchanged completely and provide better performance. CEF takes less memory than fast-switched routing caches and provides load balancing, network billing and other functions. Cisco’s GSR router has achieved great success globally with the help of CEF Express Switching and other revolutionary innovations.
For more articles you can follow us on: