-
Cisco Express Forwarding (CEF) is an advanced Layer 3 IP switching technology that enhances packet forwarding. -
CEF offers improved performance over fast switching by using less CPU for the switching process. -
CEF is scalable and can be offloaded to the line cards using dCEF (distributed CEF) technology. -
CEF offers consistency and stability in large networks. Because CEF uses a database of information called a FIB (Forwarding Information Base), which is built from the routing table, it adjusts quickly to routing table changes. -
CEF can be deployed in any part of the network, but it is designed for large IP backbones running on technology such as 12000, 7500, or 6500 series devices. -
CEF is also the basic switching method for MPLS and must be enabled on all interfaces running MPLS. Configuration -
(Optional) Enable CEF: (global) ip cef If you want to use CEF technology, dCEF is the preferred option, but if you don't have interfaces that support dCEF, use the ip cef command to enable global CEF. -
(Optional) Enable distributed CEF: (global) ip cef distributed Using the distributed option allows interfaces capable of performing dCEF to begin switching locally. NOTE On the 12000 series routers, dCEF is enabled by default, so the command shown in Step 2 is unavailable. Also, because defaults do not show up in the configuration files, you will see no indication that dCEF is enabled unless you issue the show cef interface detail command. -
(Optional) Disable CEF on an interface: (interface) no ip route-cache cef When you enable CEF globally, it automatically begins on each interface. However, you might want to disable it on some interfaces, such as on interfaces that run policy routing, because policy routing is not a CEF-supported feature. -
(Optional) Configure destination load balancing: (interface) ip load-sharing [ per-packet ] [ per-destination ] This command specifies how IP load sharing is handled when a destination has two equal-cost paths. The default is per-destination (that is, packets to a particular destination always use the same link). If you have an unusually high amount of traffic to a particular host, you might want to consider per-destination load sharing. NOTE When configuring CEF IP load sharing, you must configure the method on each outgoing interface that will participate in the load-sharing process. Unlike the per-packet load sharing used by process switching, using CEF and per-packet load sharing does not decrease the router's performance. Example This example configures CEF globally and distributed CEF on the Fast Ethernet interfaces. It also configures per-packet load sharing across equal- path serial interfaces: ip cef interface ethernet 1/0/1 ip address 10.1.1.1 255.255.255.0 ip cef distributed interface ethernet 1/0/2 ip address 10.1.2.1 255.255.255.0 ip cef distributed interface serial 0 ip address 192.168.255.1 255.255.255.252 ip load-sharing per-packet interface serial 1 ip address 192.168.255.5 255.255.255.252 ip load-sharing per-packet end |