Pcornel
Browse topics
Options
Recent
Favorites
Networking · Technical reference

RIB / FIB / CEF

Direct answer

RIB, FIB and CEF describe different stages between control-plane route selection and actual packet forwarding. The RIB selects routing intent; CEF derives forwarding state in the FIB and adjacency structures.

When to use this

Use it when the routing table and actual forwarding disagree, or packets are punted to the CPU.

First 30 seconds

Identify destination, address family and VRF; compare the selected route, CEF entry and local next-hop adjacency.

Failure signatureRouting protocol knows the route, but it is not installed in the RIB

The route appears in the OSPF database, EIGRP topology or BGP table but not in show ip route.

Possible stored cause: Another source with a lower administrative distance wins, the next hop is unresolvable, or a distribute-list/filter blocks installation.
Context & applicabilityCommon mistakes · platform/version boundaries
Platform / version applicability
Cisco IOS / IOS XE
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

PlatformCisco IOS / IOS XE · Cisco IOS XE · IOS/IOS XE
Key commandshow ip route <destination>
Scope / prerequisiteUse it when the routing table and actual forwarding disagree, or packets are punted to the CPU.
What next?3 suggested next steps
Child topics (this level)7
Documented command examples10
Evidence1
On this pageJump to a specific section
Cisco IOS / IOS XE

RIB → FIB → adjacency

Use the same destination, address family and VRF throughout. Syntax and hardware diagnostics depend on the device and release.

CEF adjacency

A CEF adjacency supplies the next-hop forwarding action and, where applicable, the Layer 2 rewrite. It differs from an OSPF adjacency, which represents a routing-protocol neighbor relationship.

show ip route <destination>

Find the selected route and longest matching prefix.

show ip route <next-hop>

Follow recursive resolution toward a directly connected next hop.

show ip cef <prefix> detail

Inspect the forwarding action, next hop and interface.

show adjacency detail

Inspect rewrite information and incomplete adjacency state.

More commands, output and technical sourcesECMP · IPv6 · exceptions · examples
show ip cef exact-route <src> <dst>

Inspect the path selected for one source/destination pair.

show ip cef summary

Check IPv4 forwarding table status and summary.

show cef drop

Inspect CEF drop counters where this command is supported; compare counter changes during the test.

show ipv6 route <prefix>

Inspect the selected IPv6 route; retain link-local next-hop interface scope.

show ipv6 cef <prefix> detail

Inspect IPv6 forwarding resolution separately from the IPv4 FIB.

show ipv6 cef exact-route <src> <dst>

Inspect an IPv6 source/destination lookup on supported releases.

How to read the outputLook first · healthy · warning · proof boundary

Route: Look first at prefix, source and next hop. Healthy means the intended route wins in the correct family/VRF; an unexpected default or recursive path is a warning. Installation does not prove delivery.

CEF: Look first at action, resolved next hop and interface. Healthy means these match the intended path. Drop, unresolved recursion or an unexpected interface needs investigation. A software FIB does not independently prove hardware programming.

Adjacency: Look first at interface, neighbor and rewrite. A resolved rewrite is healthy for an ordinary unicast next hop. Incomplete is a warning; special adjacencies require their own interpretation. A local rewrite does not prove the remote service.

IPv6: Read IPv6 route and CEF output together. Keep link-local next hops tied to their outgoing interface and check ND. IPv4 success does not prove an IPv6 path.

Forwarding exceptionsSpecial adjacencies · CEF state · platform boundaries

Glean triggers neighbor resolution for an attached network; receive handles traffic addressed to the device; punt sends traffic to a different processing path; drop/discard rejects it. These entries are not all forwarding faults.

If the device reports CEF is not running, confirm its supported forwarding mode before changing configuration. Some platforms require distributed CEF. uRPF may reject a source even when the destination lookup succeeds; inspect source validation and its interface policy. Hardware forwarding can require a separate platform-specific FED/TCAM check; use the command reference for that device.

Example output

Simplified illustrative examples; formatting varies. These are not captured device output or production Evidence.

Resolved path

R1# show ip cef 198.51.100.0/24 detail
198.51.100.0/24
  nexthop 192.0.2.2 GigabitEthernet0/0

R1# show adjacency detail
Protocol Interface                 Address
IP       GigabitEthernet0/0         192.0.2.2
                                   001122334455AABBCCDDEEFF0800

The prefix resolves to a next hop and a Layer 2 rewrite. This simplified output does not prove the downstream or return path.

Incomplete adjacency

R1# show ip cef 198.51.100.0/24 detail
198.51.100.0/24
  nexthop 192.0.2.2 GigabitEthernet0/0

R1# show adjacency detail
Protocol Interface                 Address
IP       GigabitEthernet0/0         192.0.2.2
                                   incomplete

A route and FIB next hop can exist before a usable rewrite is resolved. Check link/VLAN and local ARP or IPv6 ND, then repeat the lookup and traffic test.

Technical sources

Documentation checked 10 October 2026. Device execution and technical verification dates remain separate.
Subject-specific reference · not observed execution

Verification & Troubleshooting

Focused checks for this Topic. Stored verification and troubleshooting material remains available below.

4 focused checksProtocol candidate → RIB winner → recursive next hop → FIB/CEF → adjacency → original traffic test

Check 1 — Identify the winning route

Record destination, source and VRF. Use show ip route <destination> to find the winning prefix and next hop; resolve an indirect next hop with show ip route <next-hop>.

Check 2 — Compare forwarding state

Use show ip cef <prefix> detail to compare the resolved path with the RIB. For ECMP, show ip cef exact-route <src> <dst> identifies the lookup for that pair; it does not demonstrate every flow or successful delivery.

Check 3 — Resolve the local adjacency

Inspect show adjacency detail and the directly connected next-hop ARP/ND state. A CEF adjacency describes local forwarding/rewrite information, not an OSPF neighbor relationship. An incomplete entry needs local resolution checks before changing routing.

Check 4 — Repeat the failing traffic test

Use the original endpoints and VRF. If RIB, FIB and adjacency agree, check policy, downstream forwarding and the return path. Local tables alone cannot prove delivery.

More detailAdditional checks3 sections

Longer notes behind the focused checks above. Start with the checks; use these when you need more detail.

ECMP and load sharing

When several equal-cost routes exist, the RIB installs them all (up to maximum-paths, default 4 for most IGPs on IOS XE; BGP defaults to 1). CEF hashes each flow (source/destination address, optionally ports) to one path, so a single flow never uses two paths and does not get reordered.

router ospf 1
 maximum-paths 8
!
ip cef load-sharing algorithm include-ports source destination

Use show ip cef exact-route <src> <dst> to see which path a given flow takes. Documented example, not captured output.

Verification & troubleshooting

SymptomCommandLook forNext check
Route present, traffic droppedshow ip cef <dest> detailA valid next hop and interfaceglean/drop: ARP for the next hop, or a null route
FIB differs from RIBshow ip route <dest> vs show ip cef <dest>Same prefix and next hopHardware programming or CEF inconsistency (show ip cef inconsistency)
Recursive route not usedshow ip cef <next-hop>The next hop resolves through the IGPIGP route to the BGP/static next hop
Uneven ECMPshow ip cef exact-route <src> <dst>Flows spread across pathsPer-destination hashing keeps one flow on one path

Where it fails

Typical failure order: prefix missing from the protocol table (no route offered) → present in the protocol but not in the RIB (lower AD route wins, or next hop invalid) → in the RIB but the recursive next hop does not resolve → FIB entry is glean because ARP/ND for the next hop failed → adjacency complete but hardware programming differs (show ip cef inconsistency, platform commands) → forwarding correct, but an ACL, NAT or the return path drops the traffic.

Evidence references

Evidence · 1 on this Topic

Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.

observation · 1
Original verification profile

routing protocols → RIB → FIB → adjacency → forwarding

1. The RIB holds best routes from all sources; the FIB (CEF) is the forwarding copy.

2. Adjacencies provide L2 rewrites.

3. Hardware platforms program the FIB into TCAM.

4. RIB ≠ FIB means programming issues.

5. Verify both for a destination.

Command lookup Jump straight to Cisco syntax
Drill down

Subtopics

Go one level deeper into this subject.

Stored reference material

Original text and tables, including historical templates and owner notes.

Key points
  • Route selection and packet forwarding are separate evidence boundaries
  • Destination lookup uses longest-prefix match; administrative distance is relevant between competing sources for the same prefix
  • A protocol database can contain a candidate that never wins the RIB
  • A RIB route can exist while recursive next-hop or adjacency resolution prevents usable forwarding
  • CEF is the Cisco IOS / IOS XE forwarding architecture built around FIB and adjacency information
  • show ip route, show ip cef and show adjacency answer different questions.
Key checks
  • show ip route <prefix> — RIB best route
  • show ip cef <prefix> — FIB entry
  • show adjacency detail — rewrite info
ReferenceWhat it is1 section · depth on demand

What it is

Cisco routers separate route selection from packet forwarding:

1. Routing protocols, static routes and connected networks offer candidates.

2. The RIB installs the best candidate per prefix: lowest administrative distance first, then the protocol's own metric.

3. CEF copies the RIB into the FIB, resolving recursive next hops in advance.

4. The adjacency table holds the prebuilt Layer 2 header for each directly connected next hop.

5. A packet is forwarded by a longest-prefix lookup in the FIB plus a rewrite from the adjacency table, without consulting the RIB.

ReferenceWhy it matters1 section · depth on demand

Why it matters

A route in show ip route only shows the control plane chose it. Packets are switched by CEF using the FIB and the adjacency table. When those disagree with the RIB, or the next hop has no Layer 2 rewrite yet, traffic is dropped or punted even though the route looks fine.

ReferenceImportant terms & boundaries2 sections · depth on demand

Key points

  • RIB: the best route per prefix after AD and metric comparison (show ip route).
  • FIB: the CEF copy of the RIB with recursive next hops already resolved (show ip cef).
  • Adjacency table: the Layer 2 rewrite (MAC from ARP or ND) for each next hop (show adjacency).
  • An entry marked glean means no ARP/ND entry yet; drop or null means the packet is discarded; punt means it goes to the CPU.
  • Recursive routes (for example BGP next hops) depend on the IGP route to the next hop.
  • CEF is on by default; load sharing is per destination (per flow) by default.

In depth

RIB, FIB and CEF: from routing to forwarding

Routers separate deciding routes from forwarding packets. Cisco's Catalyst 9000 hardware resources technote defines the pieces: the RIB is the routing table shown by show ip route; the FIB is a simplified table of prefixes added from the RIB and ARP tables, each pointing to an adjacency; and the adjacency table stores the next-hop information used to rewrite packets. Cisco Express Forwarding (CEF) is the mechanism that keeps these forwarding tables in step with the RIB.

TableBuilt fromUsed for
RIBConnected, static and protocol routes, after AD comparisonRoute decisions; show ip route
FIB (CEF table)RIB prefixes and ARP/host entriesPer-packet lookup
Adjacency tableARP and other Layer 2 resolutionMAC rewrite and egress interface
Hardware tables (ASIC)FIB and adjacencies programmed into hardwareLine-rate forwarding on switches

The path from protocol to hardware

StepDetail
Protocols compute routesOSPF SPF, EIGRP DUAL, BGP best path
RIB selectsLowest administrative distance for each prefix
CEF builds the FIBEach prefix with its resolved next hop
Adjacencies resolvedARP supplies MACs
Hardware programmedFMAN-FP and FED program the ASIC (technote)
R1# show ip route 10.60.0.0
R1# show ip cef 10.60.0.0/16
10.60.0.0/16
  nexthop 10.0.12.2 GigabitEthernet0/0/1
R1# show adjacency GigabitEthernet0/0/1 detail
Protocol Interface                 Address
IP       GigabitEthernet0/0/1      10.0.12.2(9)
                                   0 packets, 0 bytes
                                   epoch 0
                                   A4BB6D201201A4BB6D1001200800
SW1# show platform software fed switch active ip route summary

Why separate them

BenefitExplanation
SpeedForwarding needs one lookup, not a routing computation
StabilityRoute churn updates tables without per-flow caches
Hardware offloadSwitches forward in ASICs from the programmed FIB

When the RIB and forwarding disagree (route present, traffic black-holed), compare show ip route, show ip cef and, on switches, the hardware view.

Documented example, not captured output.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.
ReferenceConfiguration & state1 section · depth on demand

Commands and what each proves

CommandShows
show ip route <dest>Which prefix, source and AD won in the RIB
show ip cef <dest> detailThe FIB entry actually used, the resolved next hop and the outgoing interface
show adjacency <if> detailThe Layer 2 rewrite for the next hop is complete
show ip cef exact-route <src> <dst>Which of several equal-cost paths one flow uses
show ip arp <next-hop>ARP resolved the next hop
Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor docCisco IOS / IOS XE Current documentation reviewed 2026-09-14

Authoritative/upstream documentation reviewed for bounded claims in Routing → RIB / FIB / CEF. Documentation verification only; this is not observed lab or production Evidence.

Basis: https://www.cisco.com/c/en/us/support/ios-nx-os-software/ios-xe-17/series.html · confidence 94%
Terminology layer

Terms & aliases

Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.

Aliases that resolve here
RIB FIB CEFrouting vs forwardingroute exists but traffic fails
Embedded reference data

Quick lookup tables

RIB / FIB / CEF evidence boundaries

What each layer proves

LayerMain questionPrimary evidenceDoes not prove
Protocol databaseDoes the protocol know a candidate?protocol-specific show commandRIB installation
RIBWhich route won locally?show ip route <prefix>usable forwarding adjacency
RecursionCan the selected next hop resolve?route to next hop + CEF detaildownstream reachability
FIB / CEFWhat local forwarding action is programmed?show ip cef <prefix> detailreturn path/application
AdjacencyIs local rewrite/neighbor resolution usable?show adjacency detail, ARP/NDremote path success

RIB vs FIB vs CEF

Keep routing intent separate from forwarding state.

LayerMain questionUseful evidence
RIBWhich route is selected for the destination?show ip route <destination>
FIB / CEFHow is that route programmed for forwarding?show ip cef <destination>
AdjacencyIs the directly connected next-hop rewrite resolved?show adjacency, ARP/ND
Embedded quick reference

Operational notes

Former standalone Cheat Sheet content now lives directly inside the Topic where it belongs.

Route exists but traffic fails

RIB → CEF → adjacency → policy

1. show ip route <destination> — exact winning prefix/next hop.

2. show ip cef <destination> — recursive forwarding action.

3. show adjacency / ARP/ND — local next-hop resolution.

4. Then inspect ACL/PBR/NAT/QoS and return path.

5. Finally validate transport/application behavior.

Do not use show ip route as end-to-end proof.

RIB → FIB → CEF

Fra control-plane route til faktisk forwarding.

Chain

Protocol database → RIB → FIB/CEF → adjacency

Commands

  • show ip route <prefix>
  • show ip cef <prefix>
  • show adjacency

Remember

A route in the RIB is not the same as correct forwarding. Verify CEF and the next-hop adjacency.

Depth when you need it

Deep reference

Healthy vs suspicious evidence

Reading show ip cef detail

Illustrative output, not captured Evidence:

10.20.0.0/16, epoch 2
  recursive via 10.255.0.2
    nexthop 10.1.12.2 GigabitEthernet0/0/1

The prefix resolves recursively through 10.255.0.2, which CEF reaches via 10.1.12.2 on Gi0/0/1. If the line shows glean instead of a next hop, ARP for that next hop is missing.

Confirmation

Confirm action

Continue?