Contents

Enabling or Disabling CEF or dCEF

This module contains information about Cisco Express Forwarding and describes the required and optional tasks for enabling or disabling Cisco Express Forwarding and distributed Cisco Express Forwarding. Cisco Express Forwarding is an advanced Layer 3 IP switching technology. It optimizes network performance and scalability for all kinds of networks: those that carry small amounts of traffic and those that carry large amounts of traffic in complex patterns, such as the Internet and networks characterized by intensive web-based applications or interactive sessions.

Finding Feature Information

Your software release may not support all the features documented in this module. For the latest caveats and feature information, see Bug Search Tool and the release notes for your platform and software release. To find information about the features documented in this module, and to see a list of the releases in which each feature is supported, see the feature information table at the end of this module.

Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to www.cisco.com/​go/​cfn. An account on Cisco.com is not required.

Prerequisites for Enabling or Disabling CEF or dCEF

Cisco Express Forwarding requires a software image that includes Cisco Express Forwarding and IP routing enabled on the switch or router.

Restrictions for Enabling or Disabling CEF or dCEF

Central Cisco Express Forwarding or distributed Cisco Express Forwarding has the following restrictions:

  • The Cisco 12000 Series Internet routers operate only in distributed Cisco Express Forwarding mode.

  • If you enable Cisco Express Forwarding and then create an access list that uses the logkeyword, the packets that match the access list are not Cisco Express Forwarding switched. They are process switched. Logging disables Cisco Express Forwarding.

  • Distributed Cisco Express Forwarding switching cannot be configured on the same Versatile Interface Processor (VIP) card on which distributed fast switching is configured.

  • Distributed Cisco Express Forwarding is not supported on Cisco 7200 series routers.

Restrictions for Cisco Express Forwarding or Distributed Cisco Express Forwarding Operation on an Interface

  • On the Cisco 12000 Series Internet Router, you must not disable distributed Cisco Express Forwarding on an interface.

  • Not all switching methods are available on all platforms.

Information About Enabling or Disabling CEF or dCEF

Cisco Platform Support for Central CEF and dCEF

Cisco Express Forwarding is enabled by default on most Cisco platforms running Cisco IOS software Release12.0 or later. When Cisco Express Forwarding is enabled on a router, the Route Processor (RP) performs the express forwarding.

To find out if Cisco Express Forwarding is enabled on your platform, enter the show ip cefcommand. If Cisco Express Forwarding is enabled, you receive output that looks like this:

Router# show ip cef 
Prefix              Next Hop            Interface
[...]
10.2.61.8/24        192.168.100.1       FastEthernet1/0/0
                    192.168.101.1       FastEthernet6/1
[...]

If Cisco Express Forwarding is not enabled on your platform, the output for the show ip cefcommand looks like this:

Router# show ip cef
%CEF not running

Distributed Cisco Express Forwarding is enabled by default on the Catalyst 6500 series switch, the Cisco 7500 series router, and the Cisco 12000 Series Internet Router. When distributed Cisco Express Forwarding is enabled on your platform, the line cards perform the express forwarding.

If Cisco Express Forwarding is not enabled on your platform, use the ip cefcommand to enable central Cisco Express Forwarding or the ip cef distributed command to enable distributed Cisco Express Forwarding.

When to Enable or Disable Central CEF on a Router

Enable central Cisco Express Forwarding operation when line cards are not available for Cisco Express Forwarding switching or when you need to use features not compatible with distributed Cisco Express Forwarding switching. When central Cisco Express Forwarding operation is enabled, the Cisco Express Forwarding Forwarding Information Base (FIB) and adjacency tables reside on the RP, and the RP performs express forwarding.

Disable central Cisco Express Forwarding on a router when you want to turn off central Cisco Express Forwarding on the router and on all interfaces on the router. You might want to do this if your router and router interfaces are configured with a feature that central Cisco Express Forwarding or distributed Cisco Express Forwarding does not support.

To disable central Cisco Express Forwarding on a router and on all interfaces on the router, use the no ip cef command.

When to Enable dCEF on a Line Card

Enable distributed Cisco Express Forwarding on a line card when you want the line card to perform express forwarding so that the RP can handle routing protocols or switch packets from legacy interface processors. When distributed Cisco Express Forwarding is enabled, line cards, such as the VIP line cards or the Cisco 12000 Series Internet Router line cards, maintain an identical copy of the FIB and adjacency tables. The line cards perform express forwarding between port adapters, thus relieving the RP of involvement in the switching operation. distributed Cisco Express Forwarding uses an interprocess communication (IPC) mechanism to ensure synchronization of FIB tables and adjacency tables on the RP and line cards.

The Cisco 12000 Series Internet routers operate only in distributed Cisco Express Forwarding mode. In other routers you can mix various types of line cards in the same router, and all of the line cards you are using need not support Cisco Express Forwarding. When a line card that does not support Cisco Express Forwarding receives a packet, the line card forwards the packet to the next higher switching layer (the RP) or forwards the packet to the next hop for processing. This structure allows legacy interface processors to exist in the router with newer interface processors.


Note


When you enable distributed Cisco Express Forwarding globally, all interfaces that support distributed Cisco Express Forwarding are enabled by default.


When to Enable or Disable CEF on an Interface

You need to decide whether or not you want Cisco Express Forwarding operation on an interface. In some instances, you might want to disable Cisco Express Forwarding or distributed Cisco Express Forwarding on a particular interface because that interface is configured with a feature that Cisco Express Forwarding or distributed Cisco Express Forwarding does not support. Because all interfaces that support Cisco Express Forwarding or distributed Cisco Express Forwarding are enabled by default when you enable Cisco Express Forwarding operation globally, you must use the no form of the ip route-cache cefcommand to turn off Cisco Express Forwarding operation on a particular interface. To reenable Cisco Express Forwarding, use the ip route-cache cef command. To reenable distributed Cisco Express Forwarding, use the ip route-cache distributed command.

Disabling Cisco Express Forwarding or distributed Cisco Express Forwarding on an interface disables Cisco Express Forwarding switching for packets forwarded to the interface, but has no effect on packets forwarded out of the interface.

When you disable Cisco Express Forwarding or distributed Cisco Express Forwarding, Cisco IOS software switches packets received on the interface using the next fastest switching path. For Cisco Express Forwarding, the next fastest switching path is fast switching on the RP. For distributed Cisco Express Forwarding, the next fastest switching path is Cisco Express Forwarding on the RP.

The input interface determines the Cisco IOS switching path that a packet takes. Consider the following rules of thumb when enabling or disabling switching methods on a particular interface:

  • You need Cisco Express Forwarding to be enabled on the incoming interface for packets to be Cisco Express Forwarding switched.

  • Because Cisco Express Forwarding makes the forwarding decision on input, you need to use the no ip route-cache cefcommand on the ingress interface if you want to disable Cisco Express Forwarding.

  • In contrast, because Cisco IOS builds a fast-switching cache entry after switching a packet, a packet coming in on a process-switched interface and going out through a fast-switched interface is fast switched.

  • If you want to disable fast switching, use the no ip route-cache command on the egress interface.

How to Enable or Disable Central CEF or dCEF

To enable or disable Cisco Express Forwarding or distributed Cisco Express Forwarding, perform either of the following tasks depending on whether you want to enable or disable Cisco Express Forwarding or distributed Cisco Express Forwarding on the router or to enable or disable Cisco Express Forwarding or distributed Cisco Express Forwarding on an interface:

Enabling or Disabling CEF or dCEF on a Router

Perform the following task to enable or disable Cisco Express Forwarding or distributed Cisco Express Forwarding operation on a router. Cisco Express Forwarding can optimize your network performance and scalability.

SUMMARY STEPS

    1.    enable

    2.    show ip cef [vrf vrf-name] [unresolved [detail]] | [detail | [summary]]

    3.    configure terminal

    4.    Do one of the following:

    • [no] ip cef
    • [no] ip cef distributed

    5.    exit

    6.    show ip cef [vrf vrf-name] [unresolved [detail] | [detail | summary]]


DETAILED STEPS
     Command or ActionPurpose
    Step 1 enable


    Example:
    Router> enable
     

    Enables privileged EXEC mode.

    • Enter your password if prompted.

     
    Step 2 show ip cef [vrf vrf-name] [unresolved [detail]] | [detail | [summary]]


    Example:
    Router# show ip cef
     

    Displays entries in the forwarding information base (FIB).

    Use this command to determine if Cisco Express Forwarding is enabled globally and on a particular interface. If Cisco Express Forwarding is not enabled, the output displays:

    %CEF not running
     
    Step 3 configure terminal


    Example:
    Router# configure terminal
     

    Enters global configuration mode.

     
    Step 4Do one of the following:
    • [no] ip cef
    • [no] ip cef distributed


    Example:
    Router(config)# ip cef


    Example:
              


    Example:
    Router(config)# ip cef distributed
     

    Enables Cisco Express Forwarding on the route processor card.

    or

    Enables distributed Cisco Express Forwarding operation. Cisco Express Forwarding information is distributed to line cards. Line cards perform express forwarding.

     
    Step 5 exit


    Example:
    Router(config)# end
     

    Exits to privileged EXEC mode.

     
    Step 6 show ip cef [vrf vrf-name] [unresolved [detail] | [detail | summary]]


    Example:
    Router# show ip cef
     

    Displays entries in the FIB.

    Use this command to verify that Cisco Express Forwarding is enabled. If Cisco Express Forwarding is enabled, the output displays destination prefixes, next-hop IP addresses, and next-hop interfaces.

     

    Enabling or Disabling CEF or dCEF on an Interface

    Perform the following task to enable or disable Cisco Express Forwarding or distributed Cisco Express Forwarding operation on an interface. Cisco Express Forwarding can optimize your network performance and scalability.

    SUMMARY STEPS

      1.    enable

      2.    show cef interface [type number] [statistics] [detail]

      3.    configure terminal

      4.    Do one of the following:

      • interface type slot / port
      • interface type slot / port-adapter / port

      5.    [no] ip route-cache cef

      6.    end

      7.    show cef interface [type number] [statistics] [detail]


    DETAILED STEPS
       Command or ActionPurpose
      Step 1 enable


      Example:
      Router> enable
       

      Enables privileged EXEC mode.

      • Enter your password if prompted.

       
      Step 2 show cef interface [type number] [statistics] [detail]


      Example:
      Router# show cef interface fastethernet 1/0/0
       

      Displays detailed Cisco Express Forwarding information for a specified interface or for all interfaces.

      Look for "IP CEF switching enabled" or "IP Distributed CEF switching enabled" in the output.

       
      Step 3 configure terminal


      Example:
      Router# configure terminal
       

      Enters global configuration mode.

       
      Step 4Do one of the following:
      • interface type slot / port
      • interface type slot / port-adapter / port


      Example:
      Router(config)# interface ethernet 1/1


      Example:
      or 


      Example:
      Router(config)# interface fastethernet 1/0/0
       

      Configures an interface type and enters interface configuration mode.

      • The type argument specifies the type of interface to be configured.

      • The slot/ argument specifies the slot number. Refer to the appropriate hardware manual for slot and port information.

      • The port argument specifies the port number. Refer to the appropriate hardware manual for slot and port information.

      • The port-adapter/ argument specifies the port adapter number. Refer to the appropriate hardware manual for information about port adapter compatibility.

       
      Step 5 [no] ip route-cache cef

      Example:
      or 


      Example:
      [no] ip route-cache distributed


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


      Example:
      or 


      Example:
      Router(config-if)# no ip route-cache distributed
       

      Disables Cisco Express Forwarding operation on an interface or enables Cisco Express Forwarding operation on an interface after Cisco Express Forwarding operation was disabled.

      or

      Disables distributed Cisco Express Forwarding operation on an interface or enables distributed Cisco Express Forwarding operation on an interface after distributed Cisco Express Forwarding operation was disabled.

       
      Step 6 end


      Example:
      Router(config)# end
       

      Exits to privileged EXEC mode.

       
      Step 7 show cef interface [type number] [statistics] [detail]


      Example:
      Router# show cef interface fastethernet 1/0/0
       

      Displays detailed Cisco Express Forwarding information for a specified interface or for all interfaces.

      Verify that "IP CEF switching enabled" or "IP Distributed CEF switching enabled" is displayed in the output.

       

      Configuration Examples for Central CEF or dCEF

      Example Enabling or Disabling CEF or dCEF on a Router

      Cisco Express Forwarding is enabled by default on the Cisco 7100, 7200, and 7500 series routers. You might want to disable Cisco Express Forwarding if your router and router interfaces are configured with a feature that Cisco Express Forwarding does not support. The following example shows how to disable Cisco Express Forwarding on a router and on all interfaces on the router:

      configure terminal
      !
      no ip cef
      end
      

      Distributed Cisco Express Forwarding is enabled by default on the Cisco 6500 and 12000 series routers. The following example shows how to enable distributed Cisco Express Forwarding on the line cards of a router, such as the Cisco 7500 series router, that supports distributed Cisco Express Forwarding:

      configure terminal
      !
      ip cef distributed
      end
      

      You might want to disable distributed Cisco Express Forwarding if your router and router interfaces are configured with a feature that distributed Cisco Express Forwarding does not support. The following example shows how to disable distributed Cisco Express Forwarding on a router:

      configure terminal
      !
      no ip cef distributed
      end

      Example Enabling or Disabling Central CEF or dCEF on an Interface

      All interfaces that support Cisco Express Forwarding operation (central Cisco Express Forwarding or distributed Cisco Express Forwarding) are enabled by default when you enable Cisco Express Forwarding operation globally. You might want to disable central Cisco Express Forwarding or distributed Cisco Express Forwarding on a particular interface if that interface is configured with a feature that central Cisco Express Forwarding or distributed Cisco Express Forwarding does not support.

      The following example shows how to disable central Cisco Express Forwarding on a particular interface:

      configure terminal
      !
      interface ethernet 1/1
       no ip route-cache cef
       end
      

      The following example shows how to reenable central Cisco Express Forwarding operation on an interface:

      configure terminal
      !
      interface ethernet 1/1
       ip route-cache cef
       end
      

      The following example shows how to disable distributed Cisco Express Forwarding on Ethernet interface 0:

      configure terminal
      !
      interface e0
       no ip route-cache distributed
       end
      

      The following example shows how to reenable distributed Cisco Express Forwarding operation on Ethernet interface 0:

      configure terminal
      !
      ip cef distributed 
      !
      interface e0
      # ip route-cache distributed
       end
      

      The following example shows how to enable Cisco Express Forwarding operation on the router (globally) and turn off Cisco Express Forwarding operation on Ethernet interface 0:

      configure terminal
      !
      ip cef 
      !
      interface e0
       no ip route-cache cef
       end
      

      The following example shows how to enable distributed Cisco Express Forwarding operation on the router (globally) and turn off Cisco Express Forwarding operation on Ethernet interface 0:

      configure terminal
      !
      ip cef distributed 
      interface e0
       no ip route-cache cef
       end
      

      The following example shows how to reenable distributed Cisco Express Forwarding operation on Ethernet interface 0:

      configure terminal
      !
      ip cef distributed 
      !
      interface e0
       ip route-cache distributed
       end

      Additional References

      Related Documents

      Related Topic

      Document Title

      Cisco IOS commands

      Cisco IOS Master Commands List, All Releases

      IP switching commands: complete command syntax, command modes, command history, defaults, usage guidelines, and examples.

      Cisco IOS IP Switching Command Reference

      Overview of the Cisco Express Forwarding feature

      Cisco Express Forwarding Overview

      Tasks for verifying Cisco Express Forwarding information on your router

      Configuring Basic Cisco Express Forwarding for Improved Performance, Scalability, and Resiliency in Dynamic Networks

      Tasks for configuring a load-balancing scheme for Cisco Express Forwarding

      Configuring a Load-Balancing Scheme for Cisco Express Forwarding Traffic

      Tasks for configuring Cisco Express Forwarding consistency checkers

      Configuring Cisco Express Forwarding Consistency Checkers for Route Processors and Line Cards

      Tasks for configuring epochs for Cisco Express Forwarding tables

      Configuring Epochs to Clear and Rebuild Cisco Express Forwarding and Adjacency Tables

      Tasks for configuring and verifying Cisco Express Forwarding network accounting

      Configuring Cisco Express Forwarding Network Accounting

      Tasks for customizing the display of recorded Cisco Express Forwarding events

      Customizing the Display of Recorded Cisco Express Forwarding Events

      Troubleshooting tips for incomplete adjacencies

      http:/​/​www.cisco.com/​en/​US/​tech/​tk827/​tk831/​technologies_​tech_​note09186a0080094303.shtml Troubleshooting Incomplete Adjacencies with CEF

      Description and use of the Cisco Express Forwarding consistency checkers available for the Cisco 7500 and 12000 series routers

      Troubleshooting Prefix Inconsistencies with Cisco Express Forwarding

      Information about troubleshooting Cisco Express Forwarding routing loops and suboptimal routing

      Troubleshooting Cisco Express Forwarding Routing Loops

      Causes of common Cisco Express Forwarding-related error messages on platforms running distributed Cisco Express Forwarding switching (Cisco 7500 series routers and Cisco 12000 Series Internet routers) and how to troubleshoot them

      Troubleshooting Cisco Express Forwarding-Related Error Messages

      Explanation of and troubleshooting information for the Cisco IOS software implementation of Layer 3 load balancing across multiple parallel links when Cisco Express Forwarding is used

      Troubleshooting Load Balancing Over Parallel Links Using Cisco Express Forwarding

      QoS features that require Cisco Express Forwarding

      When Is CEF Required for Quality of Service

      Cisco Express Forwarding command changes for MPLS HA application and the MFI infrastructure in Cisco IOS 12.2S releases

      Cisco Express Forwarding: Command Changes

      Standards

      Standard

      Title

      No new or modified standards are supported by this feature, and support for existing standards has not been modified by this feature.

      --

      MIBs

      MIB

      MIBs Link

      No new or modified MIBs are supported by this feature, and support for existing MIBs has not been modified by this feature.

      To locate and download MIBs for selected platforms, Cisco IOS releases, and feature sets, use Cisco MIB Locator found at the following URL:

      http:/​/​www.cisco.com/​go/​mibs

      RFCs

      RFC

      Title

      No new or modified RFCs are supported by this feature, and support for existing RFCs has not been modified by this feature.

      --

      Technical Assistance

      Description

      Link

      The Cisco Support and Documentation website provides online resources to download documentation, software, and tools. Use these resources to install and configure the software and to troubleshoot and resolve technical issues with Cisco products and technologies. Access to most tools on the Cisco Support and Documentation website requires a Cisco.com user ID and password.

      http:/​/​www.cisco.com/​cisco/​web/​support/​index.html

      Feature Information for Enabling or Disabling CEF or dCEF

      The following table provides release information about the feature or features described in this module. This table lists only the software release that introduced support for a given feature in a given software release train. Unless noted otherwise, subsequent releases of that software release train also support that feature.

      Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to . An account on Cisco.com is not required.
      Table 1 Feature Information for Enabling or Disabling Cisco Express Forwarding or Distributed Cisco Express Forwarding

      Feature Name

      Releases

      Feature Configuration Information

      This table is intentionally left blank because no features were introduced or modified in Cisco IOS Release 12.2(1) or later. This table will be updated when feature information is added to this module.

      --

      --

      Glossary

      adjacency --A relationship formed between selected neighboring routers and end nodes for the purpose of exchanging routing information. Adjacency is based upon the use of a common media segment by the routers and nodes involved.

      Cisco Express Forwarding --A Layer 3 switching technology. Cisco Express Forwarding can also refer to central Cisco Express Forwarding mode, one of two modes of Cisco Express Forwarding operation. Cisco Express Forwarding enables a Route Processor to perform express forwarding. Distributed Cisco Express Forwarding is the other mode of Cisco Express Forwarding operation.

      distributed Cisco Express Forwarding --A mode of Cisco Express Forwarding operation in which line cards (such as Versatile Interface Processor (VIP) line cards) maintain identical copies of the forwarding information base (FIB) and adjacency tables. The line cards perform the express forwarding between port adapters; this relieves the Route Switch Processor of involvement in the switching operation.

      FIB --forwarding information base. A component of Cisco Express Forwarding that is conceptually similar to a routing table or information base. The router uses the FIB lookup table to make destination-based switching decisions during Cisco Express Forwarding operation. The router maintains a mirror image of the forwarding information in an IP routing table.

      GRE --generic routing encapsulation. A tunneling protocol developed by Cisco that enables encapsulation of a wide variety of protocol packet types inside IP tunnels. GRE creates a virtual point-to-point link to Cisco routers at remote points over an IP internetwork. By connecting multiprotocol subnetworks in a single-protocol backbone environment, IP tunneling using GRE allows the expansion of a network across a single-protocol backbone environment.

      IPC --interprocess communication. The mechanism that enables the distribution of Cisco Express Forwarding tables from the Route Switch Processor (RSP) to the line card when the router is operating in distributed Cisco Express Forwarding mode.

      label disposition --The removal of Multiprotocol Label Switching (MPLS) headers at the edge of a network. In MPLS label disposition, packets arrive on a router as MPLS packets and, with the header removed, are transmitted as IP packets.

      label imposition --The action of putting a label on a packet.

      LER --label edge router. A router that performs label imposition.

      LFIB --Label Forwarding Information Base. The data structure used by switching functions to switch labeled packets.

      LIB --Label information base. A database used by a label switch router (LSR) to store labels learned from other LSRs, as well as labels assigned by the local LSR.

      line card --A general term for an interface processor that can be used in various Cisco products. For example, a Versatile Interface Processor (VIP) is a line card for the Cisco 7500 series router.

      LSP --label switched path. A sequence of hops (Router 0...Router n). A packet travels from R0 to Rn by means of label switching mechanisms. An LSP can be chosen dynamically, based on normal routing mechanisms, or you can configure the LSP manually.

      LSR --label switch router. A Layer 3 router that forwards a packet based on the value of a label encapsulated in the packet.

      MPLS --Multiprotocol Label Switching. An emerging industry standard for the forwarding of packets along the normal routing paths (sometimes called MPLS hop-by-hop forwarding).

      prefix --The network address portion of an IP address. A prefix is specified by a network and mask and is generally represented in the format network/mask. The mask indicates which bits are the network bits. For example, 1.0.0.0/16 means that the first 16 bits of the IP address are masked, making them the network bits. The remaining bits are the host bits. In this example, the network number is 10.0.

      RIB --Routing Information Base. A central repository of routes that contains Layer 3 reachability information and destination IP addresses or prefixes. The RIB is also known as the routing table.

      RP --Route Processor. The processor module in the Cisco 7000 series routers that contains the CPU, system software, and most of the memory components that are used in the router. It is sometimes called a supervisory processor.

      RSP --Route Switch Processor. The processor module used in the Cisco 7500 series routers that integrates the functions of the Route Processor (RP) and the Switch Processor (SP).

      SP --Switch Processor. Cisco 7000-series processor module that acts as the administrator for all CxBus activities. It is also sometimes called a CiscoBus controller.

      VIP --Versatile Interface Processor. An interface card used in Cisco 7000 and Cisco 7500 series routers. The VIP provides multilayer switching and runs Cisco IOS software.

      VPN --Virtual Private Network. The result of a router configuration that enables IP traffic to use tunneling to travel securely over a public TCP/IP network.

      VRF --A Virtual Private Network (VPN) routing/forwarding instance. A VRF consists of an IP routing table, a derived forwarding table, a set of interfaces that use the forwarding table, and a set of rules and routing protocols that determine what goes into the forwarding table. In general, a VRF includes the routing information that defines a customer VPN site that is attached to a PE router.


      Enabling or Disabling CEF or dCEF

      Enabling or Disabling CEF or dCEF

      This module contains information about Cisco Express Forwarding and describes the required and optional tasks for enabling or disabling Cisco Express Forwarding and distributed Cisco Express Forwarding. Cisco Express Forwarding is an advanced Layer 3 IP switching technology. It optimizes network performance and scalability for all kinds of networks: those that carry small amounts of traffic and those that carry large amounts of traffic in complex patterns, such as the Internet and networks characterized by intensive web-based applications or interactive sessions.

      Finding Feature Information

      Your software release may not support all the features documented in this module. For the latest caveats and feature information, see Bug Search Tool and the release notes for your platform and software release. To find information about the features documented in this module, and to see a list of the releases in which each feature is supported, see the feature information table at the end of this module.

      Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to www.cisco.com/​go/​cfn. An account on Cisco.com is not required.

      Prerequisites for Enabling or Disabling CEF or dCEF

      Cisco Express Forwarding requires a software image that includes Cisco Express Forwarding and IP routing enabled on the switch or router.

      Restrictions for Enabling or Disabling CEF or dCEF

      Central Cisco Express Forwarding or distributed Cisco Express Forwarding has the following restrictions:

      • The Cisco 12000 Series Internet routers operate only in distributed Cisco Express Forwarding mode.

      • If you enable Cisco Express Forwarding and then create an access list that uses the logkeyword, the packets that match the access list are not Cisco Express Forwarding switched. They are process switched. Logging disables Cisco Express Forwarding.

      • Distributed Cisco Express Forwarding switching cannot be configured on the same Versatile Interface Processor (VIP) card on which distributed fast switching is configured.

      • Distributed Cisco Express Forwarding is not supported on Cisco 7200 series routers.

      Restrictions for Cisco Express Forwarding or Distributed Cisco Express Forwarding Operation on an Interface

      • On the Cisco 12000 Series Internet Router, you must not disable distributed Cisco Express Forwarding on an interface.

      • Not all switching methods are available on all platforms.

      Information About Enabling or Disabling CEF or dCEF

      Cisco Platform Support for Central CEF and dCEF

      Cisco Express Forwarding is enabled by default on most Cisco platforms running Cisco IOS software Release12.0 or later. When Cisco Express Forwarding is enabled on a router, the Route Processor (RP) performs the express forwarding.

      To find out if Cisco Express Forwarding is enabled on your platform, enter the show ip cefcommand. If Cisco Express Forwarding is enabled, you receive output that looks like this:

      Router# show ip cef 
      Prefix              Next Hop            Interface
      [...]
      10.2.61.8/24        192.168.100.1       FastEthernet1/0/0
                          192.168.101.1       FastEthernet6/1
      [...]
      

      If Cisco Express Forwarding is not enabled on your platform, the output for the show ip cefcommand looks like this:

      Router# show ip cef
      %CEF not running
      

      Distributed Cisco Express Forwarding is enabled by default on the Catalyst 6500 series switch, the Cisco 7500 series router, and the Cisco 12000 Series Internet Router. When distributed Cisco Express Forwarding is enabled on your platform, the line cards perform the express forwarding.

      If Cisco Express Forwarding is not enabled on your platform, use the ip cefcommand to enable central Cisco Express Forwarding or the ip cef distributed command to enable distributed Cisco Express Forwarding.

      When to Enable or Disable Central CEF on a Router

      Enable central Cisco Express Forwarding operation when line cards are not available for Cisco Express Forwarding switching or when you need to use features not compatible with distributed Cisco Express Forwarding switching. When central Cisco Express Forwarding operation is enabled, the Cisco Express Forwarding Forwarding Information Base (FIB) and adjacency tables reside on the RP, and the RP performs express forwarding.

      Disable central Cisco Express Forwarding on a router when you want to turn off central Cisco Express Forwarding on the router and on all interfaces on the router. You might want to do this if your router and router interfaces are configured with a feature that central Cisco Express Forwarding or distributed Cisco Express Forwarding does not support.

      To disable central Cisco Express Forwarding on a router and on all interfaces on the router, use the no ip cef command.

      When to Enable dCEF on a Line Card

      Enable distributed Cisco Express Forwarding on a line card when you want the line card to perform express forwarding so that the RP can handle routing protocols or switch packets from legacy interface processors. When distributed Cisco Express Forwarding is enabled, line cards, such as the VIP line cards or the Cisco 12000 Series Internet Router line cards, maintain an identical copy of the FIB and adjacency tables. The line cards perform express forwarding between port adapters, thus relieving the RP of involvement in the switching operation. distributed Cisco Express Forwarding uses an interprocess communication (IPC) mechanism to ensure synchronization of FIB tables and adjacency tables on the RP and line cards.

      The Cisco 12000 Series Internet routers operate only in distributed Cisco Express Forwarding mode. In other routers you can mix various types of line cards in the same router, and all of the line cards you are using need not support Cisco Express Forwarding. When a line card that does not support Cisco Express Forwarding receives a packet, the line card forwards the packet to the next higher switching layer (the RP) or forwards the packet to the next hop for processing. This structure allows legacy interface processors to exist in the router with newer interface processors.


      Note


      When you enable distributed Cisco Express Forwarding globally, all interfaces that support distributed Cisco Express Forwarding are enabled by default.


      When to Enable or Disable CEF on an Interface

      You need to decide whether or not you want Cisco Express Forwarding operation on an interface. In some instances, you might want to disable Cisco Express Forwarding or distributed Cisco Express Forwarding on a particular interface because that interface is configured with a feature that Cisco Express Forwarding or distributed Cisco Express Forwarding does not support. Because all interfaces that support Cisco Express Forwarding or distributed Cisco Express Forwarding are enabled by default when you enable Cisco Express Forwarding operation globally, you must use the no form of the ip route-cache cefcommand to turn off Cisco Express Forwarding operation on a particular interface. To reenable Cisco Express Forwarding, use the ip route-cache cef command. To reenable distributed Cisco Express Forwarding, use the ip route-cache distributed command.

      Disabling Cisco Express Forwarding or distributed Cisco Express Forwarding on an interface disables Cisco Express Forwarding switching for packets forwarded to the interface, but has no effect on packets forwarded out of the interface.

      When you disable Cisco Express Forwarding or distributed Cisco Express Forwarding, Cisco IOS software switches packets received on the interface using the next fastest switching path. For Cisco Express Forwarding, the next fastest switching path is fast switching on the RP. For distributed Cisco Express Forwarding, the next fastest switching path is Cisco Express Forwarding on the RP.

      The input interface determines the Cisco IOS switching path that a packet takes. Consider the following rules of thumb when enabling or disabling switching methods on a particular interface:

      • You need Cisco Express Forwarding to be enabled on the incoming interface for packets to be Cisco Express Forwarding switched.

      • Because Cisco Express Forwarding makes the forwarding decision on input, you need to use the no ip route-cache cefcommand on the ingress interface if you want to disable Cisco Express Forwarding.

      • In contrast, because Cisco IOS builds a fast-switching cache entry after switching a packet, a packet coming in on a process-switched interface and going out through a fast-switched interface is fast switched.

      • If you want to disable fast switching, use the no ip route-cache command on the egress interface.

      How to Enable or Disable Central CEF or dCEF

      To enable or disable Cisco Express Forwarding or distributed Cisco Express Forwarding, perform either of the following tasks depending on whether you want to enable or disable Cisco Express Forwarding or distributed Cisco Express Forwarding on the router or to enable or disable Cisco Express Forwarding or distributed Cisco Express Forwarding on an interface:

      Enabling or Disabling CEF or dCEF on a Router

      Perform the following task to enable or disable Cisco Express Forwarding or distributed Cisco Express Forwarding operation on a router. Cisco Express Forwarding can optimize your network performance and scalability.

      SUMMARY STEPS

        1.    enable

        2.    show ip cef [vrf vrf-name] [unresolved [detail]] | [detail | [summary]]

        3.    configure terminal

        4.    Do one of the following:

        • [no] ip cef
        • [no] ip cef distributed

        5.    exit

        6.    show ip cef [vrf vrf-name] [unresolved [detail] | [detail | summary]]


      DETAILED STEPS
         Command or ActionPurpose
        Step 1 enable


        Example:
        Router> enable
         

        Enables privileged EXEC mode.

        • Enter your password if prompted.

         
        Step 2 show ip cef [vrf vrf-name] [unresolved [detail]] | [detail | [summary]]


        Example:
        Router# show ip cef
         

        Displays entries in the forwarding information base (FIB).

        Use this command to determine if Cisco Express Forwarding is enabled globally and on a particular interface. If Cisco Express Forwarding is not enabled, the output displays:

        %CEF not running
         
        Step 3 configure terminal


        Example:
        Router# configure terminal
         

        Enters global configuration mode.

         
        Step 4Do one of the following:
        • [no] ip cef
        • [no] ip cef distributed


        Example:
        Router(config)# ip cef


        Example:
                  


        Example:
        Router(config)# ip cef distributed
         

        Enables Cisco Express Forwarding on the route processor card.

        or

        Enables distributed Cisco Express Forwarding operation. Cisco Express Forwarding information is distributed to line cards. Line cards perform express forwarding.

         
        Step 5 exit


        Example:
        Router(config)# end
         

        Exits to privileged EXEC mode.

         
        Step 6 show ip cef [vrf vrf-name] [unresolved [detail] | [detail | summary]]


        Example:
        Router# show ip cef
         

        Displays entries in the FIB.

        Use this command to verify that Cisco Express Forwarding is enabled. If Cisco Express Forwarding is enabled, the output displays destination prefixes, next-hop IP addresses, and next-hop interfaces.

         

        Enabling or Disabling CEF or dCEF on an Interface

        Perform the following task to enable or disable Cisco Express Forwarding or distributed Cisco Express Forwarding operation on an interface. Cisco Express Forwarding can optimize your network performance and scalability.

        SUMMARY STEPS

          1.    enable

          2.    show cef interface [type number] [statistics] [detail]

          3.    configure terminal

          4.    Do one of the following:

          • interface type slot / port
          • interface type slot / port-adapter / port

          5.    [no] ip route-cache cef

          6.    end

          7.    show cef interface [type number] [statistics] [detail]


        DETAILED STEPS
           Command or ActionPurpose
          Step 1 enable


          Example:
          Router> enable
           

          Enables privileged EXEC mode.

          • Enter your password if prompted.

           
          Step 2 show cef interface [type number] [statistics] [detail]


          Example:
          Router# show cef interface fastethernet 1/0/0
           

          Displays detailed Cisco Express Forwarding information for a specified interface or for all interfaces.

          Look for "IP CEF switching enabled" or "IP Distributed CEF switching enabled" in the output.

           
          Step 3 configure terminal


          Example:
          Router# configure terminal
           

          Enters global configuration mode.

           
          Step 4Do one of the following:
          • interface type slot / port
          • interface type slot / port-adapter / port


          Example:
          Router(config)# interface ethernet 1/1


          Example:
          or 


          Example:
          Router(config)# interface fastethernet 1/0/0
           

          Configures an interface type and enters interface configuration mode.

          • The type argument specifies the type of interface to be configured.

          • The slot/ argument specifies the slot number. Refer to the appropriate hardware manual for slot and port information.

          • The port argument specifies the port number. Refer to the appropriate hardware manual for slot and port information.

          • The port-adapter/ argument specifies the port adapter number. Refer to the appropriate hardware manual for information about port adapter compatibility.

           
          Step 5 [no] ip route-cache cef

          Example:
          or 


          Example:
          [no] ip route-cache distributed


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


          Example:
          or 


          Example:
          Router(config-if)# no ip route-cache distributed
           

          Disables Cisco Express Forwarding operation on an interface or enables Cisco Express Forwarding operation on an interface after Cisco Express Forwarding operation was disabled.

          or

          Disables distributed Cisco Express Forwarding operation on an interface or enables distributed Cisco Express Forwarding operation on an interface after distributed Cisco Express Forwarding operation was disabled.

           
          Step 6 end


          Example:
          Router(config)# end
           

          Exits to privileged EXEC mode.

           
          Step 7 show cef interface [type number] [statistics] [detail]


          Example:
          Router# show cef interface fastethernet 1/0/0
           

          Displays detailed Cisco Express Forwarding information for a specified interface or for all interfaces.

          Verify that "IP CEF switching enabled" or "IP Distributed CEF switching enabled" is displayed in the output.

           

          Configuration Examples for Central CEF or dCEF

          Example Enabling or Disabling CEF or dCEF on a Router

          Cisco Express Forwarding is enabled by default on the Cisco 7100, 7200, and 7500 series routers. You might want to disable Cisco Express Forwarding if your router and router interfaces are configured with a feature that Cisco Express Forwarding does not support. The following example shows how to disable Cisco Express Forwarding on a router and on all interfaces on the router:

          configure terminal
          !
          no ip cef
          end
          

          Distributed Cisco Express Forwarding is enabled by default on the Cisco 6500 and 12000 series routers. The following example shows how to enable distributed Cisco Express Forwarding on the line cards of a router, such as the Cisco 7500 series router, that supports distributed Cisco Express Forwarding:

          configure terminal
          !
          ip cef distributed
          end
          

          You might want to disable distributed Cisco Express Forwarding if your router and router interfaces are configured with a feature that distributed Cisco Express Forwarding does not support. The following example shows how to disable distributed Cisco Express Forwarding on a router:

          configure terminal
          !
          no ip cef distributed
          end

          Example Enabling or Disabling Central CEF or dCEF on an Interface

          All interfaces that support Cisco Express Forwarding operation (central Cisco Express Forwarding or distributed Cisco Express Forwarding) are enabled by default when you enable Cisco Express Forwarding operation globally. You might want to disable central Cisco Express Forwarding or distributed Cisco Express Forwarding on a particular interface if that interface is configured with a feature that central Cisco Express Forwarding or distributed Cisco Express Forwarding does not support.

          The following example shows how to disable central Cisco Express Forwarding on a particular interface:

          configure terminal
          !
          interface ethernet 1/1
           no ip route-cache cef
           end
          

          The following example shows how to reenable central Cisco Express Forwarding operation on an interface:

          configure terminal
          !
          interface ethernet 1/1
           ip route-cache cef
           end
          

          The following example shows how to disable distributed Cisco Express Forwarding on Ethernet interface 0:

          configure terminal
          !
          interface e0
           no ip route-cache distributed
           end
          

          The following example shows how to reenable distributed Cisco Express Forwarding operation on Ethernet interface 0:

          configure terminal
          !
          ip cef distributed 
          !
          interface e0
          # ip route-cache distributed
           end
          

          The following example shows how to enable Cisco Express Forwarding operation on the router (globally) and turn off Cisco Express Forwarding operation on Ethernet interface 0:

          configure terminal
          !
          ip cef 
          !
          interface e0
           no ip route-cache cef
           end
          

          The following example shows how to enable distributed Cisco Express Forwarding operation on the router (globally) and turn off Cisco Express Forwarding operation on Ethernet interface 0:

          configure terminal
          !
          ip cef distributed 
          interface e0
           no ip route-cache cef
           end
          

          The following example shows how to reenable distributed Cisco Express Forwarding operation on Ethernet interface 0:

          configure terminal
          !
          ip cef distributed 
          !
          interface e0
           ip route-cache distributed
           end

          Additional References

          Related Documents

          Related Topic

          Document Title

          Cisco IOS commands

          Cisco IOS Master Commands List, All Releases

          IP switching commands: complete command syntax, command modes, command history, defaults, usage guidelines, and examples.

          Cisco IOS IP Switching Command Reference

          Overview of the Cisco Express Forwarding feature

          Cisco Express Forwarding Overview

          Tasks for verifying Cisco Express Forwarding information on your router

          Configuring Basic Cisco Express Forwarding for Improved Performance, Scalability, and Resiliency in Dynamic Networks

          Tasks for configuring a load-balancing scheme for Cisco Express Forwarding

          Configuring a Load-Balancing Scheme for Cisco Express Forwarding Traffic

          Tasks for configuring Cisco Express Forwarding consistency checkers

          Configuring Cisco Express Forwarding Consistency Checkers for Route Processors and Line Cards

          Tasks for configuring epochs for Cisco Express Forwarding tables

          Configuring Epochs to Clear and Rebuild Cisco Express Forwarding and Adjacency Tables

          Tasks for configuring and verifying Cisco Express Forwarding network accounting

          Configuring Cisco Express Forwarding Network Accounting

          Tasks for customizing the display of recorded Cisco Express Forwarding events

          Customizing the Display of Recorded Cisco Express Forwarding Events

          Troubleshooting tips for incomplete adjacencies

          http:/​/​www.cisco.com/​en/​US/​tech/​tk827/​tk831/​technologies_​tech_​note09186a0080094303.shtml Troubleshooting Incomplete Adjacencies with CEF

          Description and use of the Cisco Express Forwarding consistency checkers available for the Cisco 7500 and 12000 series routers

          Troubleshooting Prefix Inconsistencies with Cisco Express Forwarding

          Information about troubleshooting Cisco Express Forwarding routing loops and suboptimal routing

          Troubleshooting Cisco Express Forwarding Routing Loops

          Causes of common Cisco Express Forwarding-related error messages on platforms running distributed Cisco Express Forwarding switching (Cisco 7500 series routers and Cisco 12000 Series Internet routers) and how to troubleshoot them

          Troubleshooting Cisco Express Forwarding-Related Error Messages

          Explanation of and troubleshooting information for the Cisco IOS software implementation of Layer 3 load balancing across multiple parallel links when Cisco Express Forwarding is used

          Troubleshooting Load Balancing Over Parallel Links Using Cisco Express Forwarding

          QoS features that require Cisco Express Forwarding

          When Is CEF Required for Quality of Service

          Cisco Express Forwarding command changes for MPLS HA application and the MFI infrastructure in Cisco IOS 12.2S releases

          Cisco Express Forwarding: Command Changes

          Standards

          Standard

          Title

          No new or modified standards are supported by this feature, and support for existing standards has not been modified by this feature.

          --

          MIBs

          MIB

          MIBs Link

          No new or modified MIBs are supported by this feature, and support for existing MIBs has not been modified by this feature.

          To locate and download MIBs for selected platforms, Cisco IOS releases, and feature sets, use Cisco MIB Locator found at the following URL:

          http:/​/​www.cisco.com/​go/​mibs

          RFCs

          RFC

          Title

          No new or modified RFCs are supported by this feature, and support for existing RFCs has not been modified by this feature.

          --

          Technical Assistance

          Description

          Link

          The Cisco Support and Documentation website provides online resources to download documentation, software, and tools. Use these resources to install and configure the software and to troubleshoot and resolve technical issues with Cisco products and technologies. Access to most tools on the Cisco Support and Documentation website requires a Cisco.com user ID and password.

          http:/​/​www.cisco.com/​cisco/​web/​support/​index.html

          Feature Information for Enabling or Disabling CEF or dCEF

          The following table provides release information about the feature or features described in this module. This table lists only the software release that introduced support for a given feature in a given software release train. Unless noted otherwise, subsequent releases of that software release train also support that feature.

          Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to . An account on Cisco.com is not required.
          Table 1 Feature Information for Enabling or Disabling Cisco Express Forwarding or Distributed Cisco Express Forwarding

          Feature Name

          Releases

          Feature Configuration Information

          This table is intentionally left blank because no features were introduced or modified in Cisco IOS Release 12.2(1) or later. This table will be updated when feature information is added to this module.

          --

          --

          Glossary

          adjacency --A relationship formed between selected neighboring routers and end nodes for the purpose of exchanging routing information. Adjacency is based upon the use of a common media segment by the routers and nodes involved.

          Cisco Express Forwarding --A Layer 3 switching technology. Cisco Express Forwarding can also refer to central Cisco Express Forwarding mode, one of two modes of Cisco Express Forwarding operation. Cisco Express Forwarding enables a Route Processor to perform express forwarding. Distributed Cisco Express Forwarding is the other mode of Cisco Express Forwarding operation.

          distributed Cisco Express Forwarding --A mode of Cisco Express Forwarding operation in which line cards (such as Versatile Interface Processor (VIP) line cards) maintain identical copies of the forwarding information base (FIB) and adjacency tables. The line cards perform the express forwarding between port adapters; this relieves the Route Switch Processor of involvement in the switching operation.

          FIB --forwarding information base. A component of Cisco Express Forwarding that is conceptually similar to a routing table or information base. The router uses the FIB lookup table to make destination-based switching decisions during Cisco Express Forwarding operation. The router maintains a mirror image of the forwarding information in an IP routing table.

          GRE --generic routing encapsulation. A tunneling protocol developed by Cisco that enables encapsulation of a wide variety of protocol packet types inside IP tunnels. GRE creates a virtual point-to-point link to Cisco routers at remote points over an IP internetwork. By connecting multiprotocol subnetworks in a single-protocol backbone environment, IP tunneling using GRE allows the expansion of a network across a single-protocol backbone environment.

          IPC --interprocess communication. The mechanism that enables the distribution of Cisco Express Forwarding tables from the Route Switch Processor (RSP) to the line card when the router is operating in distributed Cisco Express Forwarding mode.

          label disposition --The removal of Multiprotocol Label Switching (MPLS) headers at the edge of a network. In MPLS label disposition, packets arrive on a router as MPLS packets and, with the header removed, are transmitted as IP packets.

          label imposition --The action of putting a label on a packet.

          LER --label edge router. A router that performs label imposition.

          LFIB --Label Forwarding Information Base. The data structure used by switching functions to switch labeled packets.

          LIB --Label information base. A database used by a label switch router (LSR) to store labels learned from other LSRs, as well as labels assigned by the local LSR.

          line card --A general term for an interface processor that can be used in various Cisco products. For example, a Versatile Interface Processor (VIP) is a line card for the Cisco 7500 series router.

          LSP --label switched path. A sequence of hops (Router 0...Router n). A packet travels from R0 to Rn by means of label switching mechanisms. An LSP can be chosen dynamically, based on normal routing mechanisms, or you can configure the LSP manually.

          LSR --label switch router. A Layer 3 router that forwards a packet based on the value of a label encapsulated in the packet.

          MPLS --Multiprotocol Label Switching. An emerging industry standard for the forwarding of packets along the normal routing paths (sometimes called MPLS hop-by-hop forwarding).

          prefix --The network address portion of an IP address. A prefix is specified by a network and mask and is generally represented in the format network/mask. The mask indicates which bits are the network bits. For example, 1.0.0.0/16 means that the first 16 bits of the IP address are masked, making them the network bits. The remaining bits are the host bits. In this example, the network number is 10.0.

          RIB --Routing Information Base. A central repository of routes that contains Layer 3 reachability information and destination IP addresses or prefixes. The RIB is also known as the routing table.

          RP --Route Processor. The processor module in the Cisco 7000 series routers that contains the CPU, system software, and most of the memory components that are used in the router. It is sometimes called a supervisory processor.

          RSP --Route Switch Processor. The processor module used in the Cisco 7500 series routers that integrates the functions of the Route Processor (RP) and the Switch Processor (SP).

          SP --Switch Processor. Cisco 7000-series processor module that acts as the administrator for all CxBus activities. It is also sometimes called a CiscoBus controller.

          VIP --Versatile Interface Processor. An interface card used in Cisco 7000 and Cisco 7500 series routers. The VIP provides multilayer switching and runs Cisco IOS software.

          VPN --Virtual Private Network. The result of a router configuration that enables IP traffic to use tunneling to travel securely over a public TCP/IP network.

          VRF --A Virtual Private Network (VPN) routing/forwarding instance. A VRF consists of an IP routing table, a derived forwarding table, a set of interfaces that use the forwarding table, and a set of rules and routing protocols that determine what goes into the forwarding table. In general, a VRF includes the routing information that defines a customer VPN site that is attached to a PE router.