Expert Reference Series of White Papers
The Evolution of
Cisco Switching
The Evolution of Cisco Switching
Joe Rinehart, MBA, CCIE #14256, CCNP/DP/VP
Introduction
Cisco Systems was founded in 1984 by Len Bosack and Sandy Lerner, a husband and wife team, along with other associates, while working on the network staff of Stanford University. The early Cisco team saw a tremen-dous commercial application for a multiprotocol router, and literally assembled the devices in their home. While the router was the flagship product, Cisco eventually ventured into other network technology areas, such as Local Area Network (LAN) switches, which it developed through acquisition of existing companies.
Figure 1: Cisco 3750 Switch www.cisco.com
Just as the various switching models and/or platforms (represented in part by the Catalyst line, depicted above) have evolved over time, so have the technologies involved. For example, early switches ran at 10 Mbps, while newer devices boast speeds in excess of many times that. In addition, the methods by which frames are pro-cessed have also evolved, and described as switching methods. The purpose of this white paper is to examine both the historical and modern methods employed by Cisco switches.
Traditional Multilayer Switching
One of the early switching processes, described as multilayer switching, was developed for the Catalyst 5000/5500 series and extended to early versions of the still-popular 6500 series of chassis-based switching platforms. In the example depicted above (Figure 2), two workstations are involved in the data transmission process, with the workstation on the left sending traffic to the workstation shown on the right. The first packet sent in the stream is received by the switch, which serves as the default gateway on the LAN. Seeing that the destination MAC address matches that of the route processor (i.e., part of a Layer 3 switch), it creates what is referred to as a candidate entry for the flow, and then forwards it to the route processor for Layer 3 lookup. After the routing lookup, the MAC address is rewritten to match that of the target workstation (this new packet is referred to as an enabler packet), and it is forwarded to the destination. Subsequent packets in the flow do not have to be forwarded to the route processor again, and the packet rewrite is performed based on the
candidate entry. Performing this entire set of operations required additional feature cards and processes, which were later replaced by Cisco Express Forwarding (CEF) Switching.
Figure 2: Multilayer (Netflow) Switching Process
(Image adapted from Understanding and Configuring Multilayer Switching, Cisco Press)
Router-Based Switching Methods
Unlike switches that forward packets in hardware, routers perform packet forwarding in software and utilize a completely different set of processes to accomplish the task. While some of the router-based switching methods have used various methods over the years, several types have remained constant, and include process switch-ing and fast switching.
Process Switching
Figure 3: Router-Based Process Switching
Once again using the example of a simple network, the workstation on the left (Figure 3) once again wants to transmit to the workstation on the right, but using a router as the intervening device rather than a switch. The router receives the Ethernet (Layer 2) frame on the Fast Ethernet 0/0 interface, and discards the frame. With the IPv4 packet in its raw form, the router forwards it to the CPU for processing, where a routing lookup is per-formed. Once the destination and outgoing interface are determined, an entirely new Ethernet frame is created,
with the router MAC address with the source address, and the MAC of the workstation as the destination ad-dress. At this point, the frame is forwarded out of the Fast Ethernet 0/1 interface to workstation 2. This method, called process switching since the CPU has to process the packet, is slow, and resource intensive.
Fast Switching
Router
FA0/0 FA0/1CPU
FIRST Packet Process Switched FIRST Packet Process SwitchedRouter records switching information in a cache Figure 4: Router-Based Fast Switching
Process switching clearly needed a technological “upgrade” in order to reduce demands on the CPU as well as increase router performance. The answer, fast switching, sounds remarkably similar to multilayer switch-ing, but obviously is deployed on a router rather than a switch. The fast switching methodology actually begins by performing process switching on the very first packet in a flow, as illustrated above (Figure 4). However, during the process, a cached entry is created with all of the necessary parameters discovered during the transac-tion, allowing all subsequent packets to be looked up and processed using the fast switching table. By default, now most routers will perform fast switching by default and can be easily enabled on any interface using the ip route-cache command. In addition, Cisco Express Forwarding switching can be enabled using the ip route-cache cef command.
Cisco Express Forwarding for Switches
Cisco Express Forwarding, as the name suggests, is a Cisco-proprietary Layer 3 switching technology created for the purpose of enhancing the forwarding and processing of packets through a Cisco device, in this case, switch-es. In routers, CEF runs in software, while on switches, it is performed in hardware. As illustrated in the image above (Figure 5), the process has several critical components to understand.
Figure 5: Switch-Based CEF Switching
(Image adapted from Understanding and Configuring Multilayer Switching, Cisco Press)
Routing Functionality
While switches originally operated only at the Data-Link (L2) Layer, routing functionality was introduced through the addition of route-processors on the various platforms. Sometimes referred to as the Control Plane, this entity is responsible for the various routing processes, including route table lookup, routing protocol processing, Address Resolution Protocol (ARP) processes, and so forth. Another term used for the routing engine on switch-es is route processor, or RP.
Data Forwarding Functionality
The second major component enabling the process of CEF switching is identified as the Data Plane, and it is responsible for the forwarding of packets through the switch. Paired closely with the route processor, this logical construct relies on two tables by which it performs its tasks, namely the Forwarding Information Base (FIB) and the Adjacency Table (ADJ).
• Forwarding Information Base
For many network engineering professionals, the acronym FIB equates to an IPv4 routing table, which to a great extent is still true with regards to a CEF-based Layer 3 switch. While it does con-tain destination network information as a routing table does, it is further organized into a hierarchy, sorted by longest prefixes first, with more general entries farther down. In addition to subnet entries, it also contains the next-hop address for each network in the table.
• Adjacency Table
Layer 3 switches operate quite differently than their router counterparts, since they rewrite frames rather than discarding them. To complete this process, the switch has to know Layer 2/MAC-level information to complete the forwarding paradigm. The adjacency table contains information on all directly connected devices and derived either though explicit configuration information or the results of the IPv4 ARP table. This provides a complete set of data for Layer 2 to perform the rewrite process, which takes place using the last major component, the packet rewrite engine.
Forwarding Process
Now that we have identified the proverbial players in the CEF equation, the chain of processes can easily be traced, as in the example we used at the very beginning. First, the switch receives a frame with the destination MAC address of the route processor, where a CEF table lookup is performed. If no entry exists, a routing table lookup is performed and written to the FIB table for later use. At this point, the frame and packet are rewritten with both the Layer 2 and Layer 3 destination information derived from the FIB and ADJ tables, and then for-warded out the appropriate interface. During the rewrite process, checksums are recalculated, and the IPv4 TTL is decremented by 1. Using this method for processing traffic is far more efficient than earlier methods and gives the equipment the ability to act with much greater speed, freeing CPU resources in the process. Ultimately, CEF switching shortens the entire process of route lookups and packet processing, resulting in more rapid transmis-sion of data.
Conclusion
A thorough understanding of the fundamentals of routing and switching dynamics is not only necessary but expected by network professionals today. While the various processes may run almost invisibly on a properly configured device in a healthy network, inevitable issues will nearly always require the ability to examine problems at the most fundamental level. Knowing the mechanics of switch processing intimately can mean the difference between frustration and success in real-world settings, the very purpose of professional writings such as this one.
Learn More
To learn more about how you can improve productivity, enhance efficiency, and sharpen your competitive edge, Global Knowledge suggests the following courses:
ROUTE - Implementing Cisco IP Routing v1.0
SWITCH - Implementing Cisco IP Switched Networks v1.0
Visit www.globalknowledge.com or call 1-800-COURSES (1-800-268-7737) to speak with a Global Knowledge training advisor.
About the Author
Joe Rinehart, MBA, CCIE #14256, CCNP/DP/VP is a professional trainer specializing in technology, business, and social media. He is also a successful speaker and published author, as well as a columnist for the Federal Way
Mirror. He is active in the social media space, managing one of the largest groups on LinkedIn, as well as serv-ing on the national steerserv-ing committee of the Cisco Collaboration Users Group. Joe also serves as president of the Seattle Cisco Users Group, serving technology professionals throughout the Puget Sound region.
Joe Rinehart
MBA, CCIE #14256, CCNP/DP/VP President and Chief Edutainment Officer Gracestone Professionals, LLC