Fast Switching and CEF
Problem
You want to use the most efficient mechanism in the router to switch the packets.
Solution
As we discuss in Appendix B, one of the most important things you can do to improve router performance, and consequently network performance, is to ensure that you are using the best packet switching algorithm. All Cisco routers support Fast Switching, and it is enabled by default. However, some types of configurations require that it be disabled. The following example shows how to turn Fast Switching back on if it has been disabled:
Router#configure terminalEnter configuration commands, one per line. End with CNTL/Z. Router(config)#interfaceRouter(config-if)#FastEthernet0/0ip route-cacheRouter(config-if)#exitRouter(config)#endRouter#
If you are using policies, including policies for Class-based QoS, you also need to configure Fast Switching to handle them, using the ip route-cache policy command:
Router#configure terminalEnter configuration commands, one per line. End with CNTL/Z. Router(config)#interfaceRouter(config-if)#FastEthernet0/0ip route-cache policyRouter(config-if)#exitRouter(config)#endRouter#
CEF, on the other hand, is not enabled by default. Unlike Fast Switching, which is enabled separately for each interface, you have to enable CEF globally for the entire router, as well as on each interface:
Router#configure terminalEnter configuration commands, one per line. End with CNTL/Z. Router(config)#ip cefRouter(config)#interfaceFastEthernet0/0 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access