Content

| 5.3 |  | MLS and CEF Configuration Tasks |
| 5.3.6 |  | CEF configuration and verification |

CEF Configuration
One of the most-appealing features of CEF might be its configuration. CEF for PFC2 is permanently enabled on Supervisor Engine 2 with the PFC2 and the MSFC2 so no configuration is required. However, some platforms allow CEF to be disabled or don’t default to enabling CEF.

To enable CEF, use the following command in global configuration mode:

> Router(config)#ip cef

To enable dCEF on line cards so that the route processor can handle routing protocols or switch packets from legacy interface processors, issue the following command in global configuration mode:

> Router(config)#ip cef distributed

When CEF or dCEF is enabled globally, all interfaces that support CEF are enabled by default.

An administrator might want to disable CEF or dCEF on a particular interface because that interface is configured with a feature that CEF or dCEF does not support. For example, policy routing and CEF cannot be used together. Sometimes one interface is configured to support policy routing while the other interfaces support CEF. In this case, enable CEF globally, but disable CEF on the interface configured for policy routing. This would enable all but one interface to express forward.

To disable CEF or dCEF on an interface, use the following command in interface configuration mode:

> Router(config-if)# no ip route-cache cef

When CEF or dCEF is disabled, Cisco IOS software switches packets using the next fastest switching path. In the case of dCEF, the next fastest switching path is CEF on the route processor. If CEF or dCEF is disabled on an interface, an administrator would re-enable it by using the ip route-cache cef command while in interface configuration mode.

Monitoring CEF
The contents of the FIB table can be viewed by issuing the command show ip cef detail from the MSFC2. An example of the output of the show ip cef detail command is shown.

The command show ip cef can be used to view the contents of the CEF adjacency table from the MSFC2. The command show ip cef summary provides a brief overview of the CEF process. It shows information such as the total number of adjacencies and routes. Sample output for both these commands is displayed.