What is Fast Switching?
It was the initial Route caching service enabled on networking devices and was endorsed well by industry leaders due to its functionality of offloading the Route processor. It is actually a reactive cache-based IP forwarding mechanism i.e. the address lookup uses a route cache to find the IP next-hop, outgoing interface, and outbound layer-2 header. Destination addresses are stored in the high-speed cache (Fast Switching) to expedite forwarding. Routers offer better packet-transfer performance when it is enabled.
When using Fast Switching, the first packet for a specific destination is forwarded to the route processor for a switching decision. When the processor completes its processing, it adds a forwarding entry for the destination to the fast cache. When the next packet for that specific destination enters the device, the packet is forwarded using the information available in the fast cache without directly going to the processor for routing decision.
Let’s note that fast switching allows outgoing packets to be load balanced on a per-destination basis, unlike CEF which has both options of per-destination and per-packet load balancing.
Related- Load Balancing Per Packet vs Per Destination
Below is “IP route-cache” interface configuration command to enable Fast Switching on a Router –
R2(config-if)#ip route-cache
R2(config)#int fa0/1
R2(config-if)#ip route-cache
Below command will verify whether Fast Switching has been enabled on the specified interface (Fa0/0) –
IP fast switching is enabled
IP fast switching on the same interface is disabled
As shown above, “enabled” confirms that Fast Switching is configured on the interface.
A lab setup as shown below was created to verify and understand the “Fast Switching” entries in the cache. The setup is configured so that all the given networks are reachable from any Router
Below command “show ip cache” shows entries for Fast Switching. As seen from the output, this cache is empty since no traffic has traversed till now.
IP routing cache 0 entries, 0 bytes
0 adds, 0 invalidates, 0 refcounts
Minimum invalidation interval 2 seconds, maximum interval 5 seconds,
quiet interval 3 seconds, threshold 0 requests
Invalidation rate 0 in last second, 0 in last 3 seconds
Last full cache invalidation occurred 01:12:05 ago
Prefix/Length Age Interface Next Hop
Now after sending traffic from R1 Loopback (1.1.1.1/24) to R3 Loopback (3.3.3.3/24) below is the changes seen in the cache table. Notable is that Entries change to “2” for both the above-said networks in addition to information about the destination, the outgoing interface, the next-hop and age of entry –
IP routing cache 2 entries, 392 bytes
6 adds, 4 invalidates, 0 refcounts
Minimum invalidation interval 2 seconds, maximum interval 5 seconds,
quiet interval 3 seconds, threshold 0 requests
Invalidation rate 0 in last second, 0 in last 3 seconds
Last full cache invalidation occurred 00:00:24 ago
Prefix/Length Age Interface Next Hop
1.1.1.0/24 00:00:05 FastEthernet0/0 192.168.12.1
3.3.3.0/24 00:00:05 FastEthernet0/1 192.168.23.3
#R2
Viewers can also understand the clear difference between Fast Switching and Cisco Express Forwarding through this link –
CEF Switching vs Fast Switching
Related- Process Switching vs Fast Switching
ABOUT THE AUTHOR
I am here to share my knowledge and experience in the field of networking with the goal being – “The more you share, the more you learn.”
I am a biotechnologist by qualification and a Network Enthusiast by interest. I developed interest in networking being in the company of a passionate Network Professional, my husband.
I am a strong believer of the fact that “learning is a constant process of discovering yourself.”
– Rashmi Bhardwaj (Author/Editor)