|
|
This chapter describes switching paths that can be configured on Cisco IOS devices. It contains the following sections:
To understand how switching works, it helps to first understand the basic router architecture and where various processes occur in the router.
Figure 1 illustrates a possible internal configuration of a Cisco 7500 series router. In this configuration, the Cisco 7500 series router has an integrated Route/Switch Processor (RSP) and uses route caching to forward packets. The Cisco 7500 series router also uses Versatile Interface Processors (VIPs), a RISC-based interface processor that receives and caches routing information from the RSP. The VIP card uses the route cache to make switching decisions locally, which relieves the RSP of involvement and speeds overall throughput. This type of switching is called distributed switching. Multiple VIP cards can be installed in one router.

The routing, or forwarding, function comprises two interrelated processes to move information in the network:
Cisco IOS platforms perform both routing and switching, and there are several types of each.
Routing is more processing intensive and has higher latency than switching as it determines path and next-hop considerations. The first packet routed requires a lookup in the routing table to determine the route. The route cache is populated after the first packet is routed by the route-table lookup. Subsequent traffic for the same destination is switched using the routing information stored in the route cache. Figure 2 illustrates the basic routing process.
A router sends routing updates out each of its interfaces that are configured for a particular protocol. It also receives routing updates from other attached routers. From these received updates and its knowledge of attached networks, it builds a map of the network topology.
Through the switching process, the router determines the next hop toward the destination address. Switching moves traffic from an input interface to one or more output interfaces. Switching is optimized and has lower latency than routing because it can move packets, frames, or cells from buffer to buffer with simpler determination of the source and destination of the traffic. It saves resources because it does not involve extra lookups. Figure 3 illustrates the basic switching process.

In Figure 3, packets are received on the Fast Ethernet interface and destined for the FDDI interface. Based on information in the packet header and destination information stored in the routing table, the router determines the destination interface. It looks in the protocol's routing table to discover the destination interface that services the destination address of the packet.
The destination address is stored in tables such as ARP tables for IP or AARP tables for AppleTalk. If there is no entry for the destination, the router will either drop the packet (and inform the user if the protocol provides that feature), or it must discover the destination address by some other address resolution process, such as through the ARP protocol. Layer 3 IP addressing information is mapped to the Layer 2 MAC address for the next hop. Figure 4 illustrates the mapping that occurs to determine the next hop.
Basic switching paths are as follows:
When packets are fast switched, the first packet is copied to packet memory and the destination network or host is found in the fast-switching cache. The frame is rewritten and sent to the outgoing interface that services the destination. Subsequent packets for the same destination use the same switching path. The interface processor computes the CRC. Fast switching is described in the "Configuring Fast Switching" chapter later in this publication.
When CEF mode is enabled, the CEF FIB and adjacency tables reside on the route processor, and the route processor performs the express forwarding. You can use CEF mode when line cards are not available for CEF switching or when you need to use features not compatible with distributed CEF switching. For information on configuring CEF, see the "Cisco Express Forwarding Overview" chapter later in this publication.
![]() |
Note Beginning with Cisco IOS Release 12.0, CEF is the preferred and default switching path. And NetFlow switching has been integrated into CEF switching. For information NetFlow switching, see the "Cisco Express Forwarding Overview" chapter and the "Configuring Cisco Express Forwarding" chapter later in this publication. |
In distributed switching, the switching process occurs on VIP and other interface cards that support switching. When distributed CEF (dCEF) is enabled, line cards, such as VIP line cards or GSR line cards, maintain an identical copy of the FIB and adjacency tables. The line cards perform the express forwarding between port adapters, relieving the RSP of involvement in the switching operation. dCEF uses an Inter Process Communication (IPC) mechanism to ensure synchronization of FIBs and adjacency tables on the route processor and line cards.
For model numbers and hardware compatibility information, refer to the Cisco Product Catalog. For information on configuring dCEF, see the "Configuring Cisco Express Forwarding" chapter later in this publication.
For information on configuring Multicast Distributed Switching (MDS), see the "Configuring Multicast Distributed Switching" chapter later in this publication.
Figure 5 illustrates the distributed switching process on the Cisco 7500 series.

The VIP card installed in this router maintains a copy of the routing cache information needed to forward packets. Because the VIP card has the routing information it needs, it performs the switching locally, making the packet forwarding much faster. Router throughput is increased linearly based on the number of VIP cards installed in the router.
Depending on the routing platform you are using, availability and default implementations of switching paths varies. Table 3 shows the correlation between Cisco IOS switching paths and routing platforms.
| Switching Path | Cisco 7200 Series | Cisco 7500 Series | Comments | Configuration Command |
|---|---|---|---|---|
Process switching | Yes | Yes | Initializes switching caches | no protocol route-cache |
Fast switching | Yes | Yes | Default (except for IP) | protocol route-cache |
CEF Switching | Yes | Yes | Default for IP | protocol route-cache cef |
dCEF Switching | No | Yes | Using Second-Generation VIP line cards | protocol route-cache cef distributed |
Performance is derived from the switching mechanism you are using. Some Cisco IOS features require special handling and cannot be switched until the additional processing they require has been performed. This special handling is not processing that the interface processors can do. Because these features require additional processing, they affect switching performance. These features include:
For information on Quality of Service (QoS) performance, refer to the Cisco IOS Quality of Service Solutions Configuration Guide.
Queueing occurs when network congestion occurs. When traffic is moving well within the network, packets are sent as they arrive at the interface. Cisco IOS software implements four different queueing algorithms:
Random Early Detection is designed for congestion avoidance. Traffic is prioritized based on type of service (TOS), or precedence. This feature is available on T3, OC-3, and ATM interfaces.
Depending on the protocol you are using, various compression options are available in Cisco IOS software. Refer to the Cisco IOS configuration guide for the protocol you are using to see what compression options you have.
You can define access lists to control access to or from a router for a number of services. You could, for example, define an access list to prevent packets with a certain IP address from leaving a particular interface on a router. How access lists are used depends on the protocol. For information on access lists, refer to the appropriate Cisco IOS configuration guide for the protocol you are using.
Encryption algorithms are applied to data to alter its appearance, making it incomprehensible to those who are not authorized to see the data. For information about encryption features available with the Cisco IOS software, refer to the Cisco IOS Security Configuration Guide.
You can configure accounting features to collect network data related to resource usage. The information you collect (in the form of statistics) can be used for billing, chargeback, and planning resource usage. Refer to the appropriate Cisco IOS configuration guide for the protocol you are using for information regarding accounting features you can use.
![]()
![]()
![]()
![]()
![]()
![]()
![]()
Posted: Mon Jul 17 17:01:31 PDT 2000
Copyright 1989-2000©Cisco Systems Inc.