You are on page 1of 2

Express Forwarding (CEF)

Routers must make decisions about where to forward your packets. This decision-making process is called "switching." This shouldn't be confused with an Ethernet switch. Switching is what a router does when it makes the following decisions:

Whether or not to forward the packet after checking that the destination for the packet is reachable? If the destination is reachable, what is the next hop of the next router, and what interface will the router use to get to that destination? Whether or not to modify the Ethernet MAC on the packet?

CEF is one of the available switching options for Cisco routers. Based on the routing table, CEF creates it own table, called the Forwarding Information Base (FIB). The FIB is organized differently than the routing table, and CEF uses the FIB to decide which interface to send traffic from. CEF offers the following benefits:

Better performance than fast-switching (the default) and takes less CPU to perform the same task When enabled, allows for advanced features like NBAR Overall, CEF can switch traffic faster than route-caching using fast-switching

Enabling and disabling CEF


CEF is disabled by default on all routers except the 7xxx series routers. Enabling and Disabling CEF is easy. To enable CEF, you go into global configuration mode and enter the ip cef command, like this:
Router# config t Router(config)# ip cef Router(config)#

Disabling CEF works the same way, but in reverse. To disable CEF, just type no ip cef.

Showing CEF status


You can check on the status of CEF with a few different commands: Show ip cef shows the entries in CEF's FIB. The FIB could be compared to a routing table. For detailed information on this command, see the command reference. Here is an example of the command output:
Router# show ip cef

Prefix 0.0.0.0/0 0.0.0.0/32 192.168.0.0/24 192.168.2.0/30 192.168.3.0/30 192.168.4.0/24 192.168.5.0/30

Next Hop 192.168.1.5 receive 192.168.10.1 192.168.10.1 192.168.10.1 192.168.10.1 192.168.10.1

Interface FastEthernet0/0

Serial0/2/0 Serial0/2/0 Serial0/2/0 Serial0/2/0 Serial0/2/0

Show ip cef detail shows detailed information on every entry in the FIB. Show ip cef summary shows a summary of entries in the FIB, like this:
Router# show ip cef summary IP CEF with switching (Table Version 1267), flags=0x0 239 routes, 0 reresolve, 0 unresolved (0 old, 0 new), peak 3 3 instant recursive resolutions, 0 used background process 239 leaves, 153 nodes, 195448 bytes, 776 inserts, 537 invalidations 0 load sharing elements, 0 bytes, 0 references universal per-destination load sharing algorithm, id 9C1B7D1D 3(0) CEF resets, 483 revisions of existing leaves Resolution Timer: Exponential (currently 1s, peak 1s) 485 in-place/0 aborted modifications refcounts: 40214 leaf, 39424 node Table epoch: 0 (239 entries at this epoch)

Adjacency Table has 3 adjacencies Router#

The commands shown above are just a few of the command options for show ip cef. For a full list, just type show ip cef ?