Content

| 5.2 |  | Cisco Express Forwarding |
| 5.2.3 |  | CEF operation |

Understanding how CEF functions on a Catalyst 6000 Supervisor Engine 2 requires a basic understanding of the architecture of the Supervisor Engine 2.

Supervisor Engine 2 consists of three primary components:

- Supervisor base board – The Supervisor base board provides the connectivity to the switching fabric, 32-Gbps bus, multicast replication ASIC, Network Management Processor (NMP), and two Gigabit Interface Converter (GBIC)-based Gigabit Ethernet ports. In addition, the base board offers connectors for attaching the PFC2 and MSFC2 daughter boards.
- Policy Feature Card 2 (PFC2) – PFC2 is a factory-installed daughter card of a Supervisor Engine 2. The PFC2 provides an array of ASICs to enable all hardware- based forwarding. The Layer 3 forwarding engine ASIC provides the actual CEF function via its inherent logic. It also provides access to the various Layer 3 tables (the FIB, adjacency table, and NetFlow table). In addition, the PFC2 daughter card also contains the ASICs that deliver hardware-based access control lists and QoS mechanisms.
- Multilayer Switching Feature Card 2 (MSFC2) – The MSFC2 is an optional daughter card that provides a CPU for the handling of all Layer 3 control-plane activities. The control plane is the portion of the hardware architecture that handles route calculations. The MSFC2 is responsible for handling any functions that cannot be handled in the hardware elements of the PFC2, as well as the processing of all routing protocol activities such as OSPF and BGP routing updates. The MSFC2 is also responsible for populating the IP routing table, FIB table, and adjacency table.

Of these three elements, the Supervisor base board and PFC2 are mandatory components, and the MSFC2 element is optional (although it is effectively required for Layer 3 switching because it contains the CPU for the population of the CEF tables).

The CPU on the MSFC2 daughter card runs all instances of whatever configured routing protocols are required. In addition, it handles packets that cannot be processed in hardware. The MSFC2 is a Cisco IOS Software-based router, and it is configured as such. The configuration parameters are identical to those on a Cisco 7200 series router. With the Supervisor Engine 2, CEF is enabled by default. In fact, it cannot be disabled. For most common CEF functions, no specific configuration is required to enable CEF, beyond the standard configuration of routing protocols, network interface addressing, and so on.

When the router is initialized, a routing table is constructed based on information in the router software configuration (such as static routes, directly connected routes, and dynamically learned routes via routing protocol exchanges). After the routing table is constructed, the CPU creates the FIB and adjacency tables automatically. The FIB and adjacency tables represent the data present within the routing table in a manner in which optimal forwarding can be performed.

Unlike a flow cache, which is based on traffic flow, the CEF table is based on the network topology. When a packet enters the switch, the switch Layer 3 forwarding engine ASIC performs a longest-match lookup based on the destination network and the most-specific netmask. For example, instead of switching based on a destination address of 172.34.10.3, the PFC-2 looks for the network 172.34.10.0/24 and switches to the interface connecting to that network. This scheme is highly efficient and does not involve the software for anything other than the routing table and pre-population of the FIB table. In addition, cache invalidation because of a route flap does not occur. As soon as a change in the routing table is made, all CEF tables are updated immediately. This makes CEF more adaptable to changes in the network topology.