IP Addresses and Services Configuration Guide for Cisco 8000 Series Routers, IOS XR Releases

PDF

IP Addresses and Services Configuration Guide for Cisco 8000 Series Routers, IOS XR Releases

Cisco Express Forwarding fundamentals

Want to summarize with AI?

Log in

Explains how CEF uses forwarding and adjacency data to provide scalable Layer 3 packet forwarding and covers its operation, supported functions, benefits, and access requirement.


Cisco Express Forwarding (CEF) is an advanced Layer 3 IP switching technology that

  • optimizes performance for large and dynamic traffic patterns

  • maintains forwarding and adjacency information for software and hardware forwarding engines, and

  • operates as an inherent feature without requiring an enablement configuration.

Cisco 8000 Series Routers support single-stage forwarding.


How Cisco Express Forwarding works

CEF always operates in CEF mode in Cisco IOS XR Software.

Summary

CEF uses two key components:

  • Forwarding Information Base (FIB): Maintains IPv4 and IPv6 unicast forwarding tables on the route processor and each line card.

  • Adjacency Information Base (AIB): Maintains protocol-independent adjacency information.

Workflow

These stages describe CEF packet forwarding:

  1. Each routing protocol selects suitable routes and installs them in the Routing Information Base (RIB).

  2. The FIB process on each node receives RIB updates, resolves routes, and independently maintains its forwarding table.

  3. CEF uses the FIB and AIB data to forward packets through software or hardware forwarding engines.

Result

The route processor and line cards maintain forwarding tables that can differ slightly because each node processes updates independently.


CEF features and benefits

Use this information to identify the functions and benefits of CEF.

CEF supports these functions and operational features:

  • Software switching paths

  • Forwarding and adjacency tables for software and hardware forwarding engines

  • Bundle interfaces and multiple paths

  • Route consistency

  • Packaging, restartability, and out-of-resource handling

  • OSPFv2 shortest path first prefix prioritization

  • Border Gateway Protocol (BGP) attribute downloads

CEF provides these benefits:

  • Performance: Uses less processor capacity than fast-switching route caching.

  • Scalability: Provides full switching capacity at each line card.

  • Resilience: Uses a complete FIB lookup table to avoid route-cache maintenance during routing changes.

Table 1. CEF forwarding databases

Database

Function

IPv4 CEF database

Stores IPv4 unicast routes for forwarding IPv4 unicast packets.

IPv6 CEF database

Stores IPv6 unicast routes for forwarding IPv6 unicast packets.


Verify CEF tables

Verify the contents and resolution state of an IPv4 or IPv6 CEF table.

Before you begin

Confirm that your task group permits the required CEF show commands.

Procedure

  1. Display a summary of an IPv4 or IPv6 CEF table.

    Example:

    Router# show cef ipv4 summary
    Router ID is 216.1.1.1
    
    IP CEF with switching (Table Version 0) for node0_RP0_CPU0
    
      Load balancing: L4
      Tableid 0xe0000000 (0x8cf5b368), Vrfid 0x60000000, Vrid 0x20000000, Flags 0x1019
      Vrfname default, Refcount 4129
      56 routes, 0 protected, 0 reresolve, 0 unresolved (0 old, 0 new), 7616 bytes
      13 rib, 0 lsd, 0:27 aib, 1 internal, 10 interface, 4 special, 1 default routes
      56 load sharing elements, 24304 bytes, 1 references
      1 shared load sharing elements, 432 bytes
      55 exclusive load sharing elements, 23872 bytes
      0 route delete cache elements
      13 local route bufs received, 1 remote route bufs received,  0 mix bufs received
      13 local routes, 0 remote routes
      13 total local route updates processed
      0 total remote route updates processed
      0 pkts pre-routed to cust card
      0 pkts pre-routed to rp card
      0 pkts received from core card
      0 CEF route update drops, 0 revisions of existing leaves
      0 CEF route update drops due to version mis-match
      Resolution Timer: 15s
      0 prefixes modified in place
      0 deleted stale prefixes
      0 prefixes with label imposition, 0 prefixes with label information
      0 LISP EID prefixes, 0 merged, via 0 rlocs
     28 next hops
      1 incomplete next hop
    
     0 PD backwalks on LDIs with backup path
    

    Use show cef ipv6 summary for the IPv6 table.

  2. Display detailed CEF information for an address.

    Example:

    Router# show cef 203.0.113.2 detail
    203.0.1.2/32, version 102239, internal 0x1000001 0x0 (ptr 0xa932b408) [1], 0x0 (0xaf4a6ad8), 0xa20 (0xc22c6da8)
     Updated Jul  3 21:40:17.827 
     local adjacency 203.1.104.2
     Prefix Len 32, traffic index 0, precedence n/a, priority 3
      gateway array (0xb9061e70) reference count 1982, flags 0x8068, source lsd (5), 1 backups
                    [1983 type 4 flags 0x108401 (0x943df068) ext 0x0 (0x0)]
      LW-LDI[type=1, refc=1, ptr=0xaf4a6ad8, sh-ldi=0x943df068]
      gateway array update type-time 1 Jul  3 20:23:36.957
     LDI Update time Jul  3 20:23:36.964
     LW-LDI-TS Jul  3 21:40:17.834
       via 203.1.104.2/32, Bundle-Ether104, 11 dependencies, weight 0, class 0 [flags 0x0]
        path-idx 0 NHID 0x0 [0xa446b0a8 0x0]
        next hop 203.1.104.2/32
        local adjacency
       via 203.1.114.2/32, Bundle-Ether114, 9 dependencies, weight 0, class 0 [flags 0x0]
        path-idx 1 NHID 0x0 [0xa446ac18 0x0]
        next hop 203.1.114.2/32
        local adjacency
    
        Load distribution: 0 1 (refcount 1983)
    
        Hash  OK  Interface                 Address
        0     Y   Bundle-Ether104           203.1.104.2    
        1     Y   Bundle-Ether114           203.1.114.2