04-06-2015 05:56 PM - edited 03-05-2019 01:10 AM
what is CEF ( cisco express forwarding ) used for and how it is work actually ?
04-06-2015 07:37 PM
Hi,
Here are the explanations about CEF, how it operates and the advantages about it:
Cisco Express Forwarding (CEF) is advanced, Layer 3 IP switching technology. CEF optimizes network performance and scalability for networks with large and dynamic traffic patterns, such as the Internet, on networks characterized by intensive Web-based applications, or interactive sessions.
Benefits
CEF offers the following benefits:
•Improved performance—CEF is less CPU-intensive than fast switching route caching. More CPU processing power can be dedicated to Layer 3 services such as quality of service (QoS) and encryption.
•Scalability—CEF offers full switching capacity at each line card when dCEF mode is active.
•Resilience—CEF offers an unprecedented level of switching consistency and stability in large dynamic networks.
Because the Forwarding Information Base (FIB) lookup table contains all known routes that exist in the routing table, it eliminates route cache maintenance and the fast-switch or process-switch forwarding scenario. CEF can switch traffic more efficiently than typical demand caching schemes.
CEF Components:
CEF uses a FIB to make IP destination prefix-based switching decisions. The FIB is conceptually similar to a routing table or information base. It maintains a mirror image of the forwarding information contained in the IP routing table. When routing or topology changes occur in the network, the IP routing table is updated, and those changes are reflected in the FIB. The FIB maintains next hop address information based on the information in the IP routing table.
Because there is a one-to-one correlation between FIB entries and routing table entries, the FIB contains all known routes and eliminates the need for route cache maintenance that is associated with switching paths such as fast switching and optimum switching.
Nodes in the network are said to be adjacent if they can reach each other with a single hop across a link layer. In addition to the FIB, CEF uses adjacency tables to prepend Layer 2 addressing information. The adjacency table maintains Layer 2 next-hop addresses for all FIB entries.
Basically to sum up using CEF will improve network performance, because it would not use CPU to make a routing decision. It is a best practice to use it, it is actually more secure.
Please proceed to rate and mark as correct this Post!
If you have any other question just let me know!
David Castro,
Regards,
04-06-2015 10:10 PM
From my understanding, CEF is like routing cache, something like arp for L3.
Try "show ip cef"
Prefix Next Hop Interface
0.0.0.0/0 10.10.10.10 GigabitEthernet0/0
0.0.0.0/8 drop
0.0.0.0/32 receive
1.0.0.0/24 10.10.10.10 GigabitEthernet0/0
1.0.4.0/24 10.10.10.10 GigabitEthernet0/0
1.0.5.0/24 10.10.10.10 GigabitEthernet0/0
1.0.6.0/24 10.10.10.10 GigabitEthernet0/0
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide