Pcornel
Networking · Routing › RIB / FIB / CEF

CEF (Cisco Express Forwarding)

Cheat sheet · https://pcornel.dk/topic.php?topic=2607

Back to the Topic

Answer

CEF (Cisco Express Forwarding) is the forwarding table built from the routing table: one entry per prefix with the resolved next hop and a prepared layer-2 rewrite (adjacency). Packets are forwarded from CEF, not from the routing table.

Remember

Check that CEF agrees with the routing table. With several equal paths, CEF picks per flow by a hash — exact-route tells which. An incomplete or glean adjacency means the next hop's MAC address is not yet known.

First checks

  • show ip cef <dst> — the entry and next hop used.
  • show ip cef <dst> detail — recursion and all paths.
  • show ip cef exact-route <src> <dst> — the path for one flow.
  • show adjacency <interface> detail — layer-2 rewrite per next hop.
  • show ip cef summary — overall state.

Commands

show ip cef <prefix>
CEF/FIB forwarding resolution for a prefix.
show ip cef <prefix> detail
Inspect detailed CEF recursion/forwarding state.
show ip route
show ip cef summary
show ip route summary
show cef drop
show adjacency summary
show ip cef 10.20.0.0 255.255.255.0 internal
show ip cef
show ip cef exact-route <src> <dst>

Verify in this order

routing table updated → CEF entry rebuilt → next hop resolved recursively → adjacency complete → flow hashed to a path → packet rewritten and sent

Where it usually breaks

underlay/interface reachability → protocol adjacency/session → received/originated state → policy → best path/RIB → FIB/adjacency → traffic path

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=2607

Confirmation

Confirm action

Continue?