Pcornel
Browse topics
Options
Recent
Favorites
Networking · Technical reference

BGP Adj-RIB-In / Loc-RIB / Adj-RIB-Out Reference

Direct answer

A BGP route passes through stages inside a router: received from a neighbour, filtered by inbound policy, compared with other paths, installed in the routing table, filtered by outbound policy, and advertised. Each stage has its own table and show command.

When to use this

Use it when a route is missing or not passed on: check the stages in order and stop at the first one where the route is absent.

First 30 seconds

1. show ip bgp neighbors <ip> routes | include <prefix> — accepted from the neighbour?

2. show ip bgp <prefix> — valid, and best?

3. show ip route <prefix> — installed as a BGP route?

4. show ip bgp neighbors <ip> advertised-routes | include <prefix> — passed on?

5. Policy changed? clear ip bgp <ip> soft in / soft out.

Operational verification

neighbour sends the prefix → inbound policy accepts → next hop reachable → best path selected → installed in the routing table (no RIB-failure) → outbound policy permits → advertised to the next neighbour

Context & applicabilityCommon mistakes · platform/version boundaries
Platform / version applicability
Protocol standard + deployed implementation
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.

PlatformProtocol standard
Key commandshow ip bgp neighbors 192.0.2.2 received-routes | include 203.0.113.0
Scope / prerequisiteUse it when a route is missing or not passed on: check the stages in order and stop at the first one where the route is…
What next?3 suggested next steps
Evidence1
On this pageJump to a specific section
Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

2 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

Capture the concrete output, symptom, packet, log or counter before changing anything.

Step 1 Operational verification Verify boundary
show ip bgp neighbors 192.0.2.2 received-routes | include 203.0.113.0
show ip bgp neighbors 192.0.2.2 routes | include 203.0.113.0
show ip bgp 203.0.113.0/24
show ip route 203.0.113.0
show ip bgp neighbors 10.0.0.3 advertised-routes | include 203.0.113.0

Work from left to right through the stages and stop at the first command where the prefix is absent or differs from what is expected. The prefix detail in the middle shows every accepted path with its attributes, which one is best, and to which neighbours (update groups) it is advertised.

Known-good: the prefix is accepted from the intended neighbour, that path is best, the routing table shows it, and it is in the advertised routes towards the neighbours that should have it.

Step 2 Failure isolation workflow Narrow the fault
  • Not in received-routes. The neighbour does not send it; check its advertised routes.
  • In received-routes but not in routes. Inbound policy rejects it — or the AS path contains the local AS.
  • In the BGP table but not best. Another path wins; compare the attributes in show ip bgp <prefix>, and check that the next hop is reachable.
  • Best, but not in the routing table. RIB-failure: a route with lower administrative distance exists.
  • Best and installed, but not advertised to a neighbour. Outbound policy, the iBGP rule, or a community such as no-export.
  • received-routes returns an error. Inbound soft reconfiguration is not enabled for that neighbour.
  • The stages look right but reflect the old policy. The session was not refreshed after the change.
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
Command lookup Jump straight to Cisco syntax
Key points

received-routes needs soft-reconfiguration inbound. Only the best path is installed and advertised. A best path may still be kept out of the routing table by a route with lower administrative distance (RIB-failure). A path with an unreachable next hop is not a candidate.

Key checks
  • show ip bgp neighbors <ip> received-routes — everything the neighbour sent, before policy.
  • show ip bgp neighbors <ip> routes — what was accepted.
  • show ip bgp <prefix> — all paths, the best one, and whom it is advertised to.
  • show ip route <prefix> and show ip bgp rib-failure — installed or not.
  • show ip bgp neighbors <ip> advertised-routes — what is sent on.
ReferenceWhat it is1 section · depth on demand

Mechanics & mental model

A BGP route passes through several stages inside a router: it is received from a neighbour, filtered by inbound policy, compared with other paths, possibly installed in the routing table, filtered by outbound policy, and sent on. The standard names for the tables at these stages are Adj-RIB-In, Loc-RIB and Adj-RIB-Out.

ReferenceWhy it matters1 section · depth on demand

Why it matters operationally

"The route is missing" can mean it was never received, was filtered on the way in, lost the best-path comparison, was not installed, or was filtered on the way out. Each stage has its own show command, and checking them in order finds the stage where the route stops.

ReferenceHow it works1 section · depth on demand

How it works

StageWhat it holdsCisco IOS command
Adj-RIB-InEverything a neighbour sent, before inbound policyshow ip bgp neighbors <ip> received-routes
After inbound policyWhat was accepted from that neighbourshow ip bgp neighbors <ip> routes
Loc-RIBAll accepted paths from all neighbours; one is marked best per prefixshow ip bgp and show ip bgp <prefix>
Routing tableThe best paths that won against other route sourcesshow ip route bgp
Adj-RIB-OutWhat is sent to a neighbour, after outbound policyshow ip bgp neighbors <ip> advertised-routes

Points that explain most surprises.

  • received-routes needs extra configuration. By default IOS does not keep routes that inbound policy rejected. The command works only with neighbor <ip> soft-reconfiguration inbound, which stores a copy of everything received, at a cost in memory.
  • Only the best path moves on. A router may hold five paths for a prefix; it installs one and advertises one. A path that is not best is visible in show ip bgp <prefix> and nowhere after.
  • A best path is not necessarily installed. If another routing source has the prefix with a lower administrative distance, BGP's route stays out of the routing table. It is flagged r (RIB-failure) in show ip bgp and listed by show ip bgp rib-failure. It is still advertised to neighbours by default.
  • A path with an unreachable next hop is not a candidate. It appears in the table without the valid mark and cannot be best.
  • Some routes are not advertised regardless of policy. A route learned from an iBGP neighbour is not sent to other iBGP neighbours, and a route is not sent back to the neighbour it was learned from as best.

Policy changes do not apply to routes already in these tables until the session is refreshed: clear ip bgp <ip> soft in or soft out.

ReferenceImportant terms & boundaries1 section · depth on demand

In depth

From Adj-RIB-In to Adj-RIB-Out

RFC 4271 describes BGP's route handling as three conceptual tables. Adj-RIBs-In hold the unprocessed routes learned from each peer. The Loc-RIB holds the routes the local decision process has selected. Adj-RIBs-Out hold the routes chosen for advertisement to each specific peer. The decision process connects them in three phases:

1. Calculate a degree of preference for each received route, after inbound policy.

2. Select the best route per prefix for the Loc-RIB.

3. Disseminate routes to peers through outbound policy.

Where each stage shows up on Cisco IOS XE

StageWhat it holdsCommand
Adj-RIB-In before policyEverything the peer sentshow bgp ipv4 unicast neighbors <ip> received-routes (needs soft-reconfiguration inbound)
After inbound policyAccepted routesshow bgp ipv4 unicast neighbors <ip> routes
Loc-RIBBest path per prefix (marked >)show bgp ipv4 unicast <prefix>
RIB/FIBWhat forwarding usesshow ip route bgp, show ip cef <prefix>
Adj-RIB-OutWhat is sent to a peershow bgp ipv4 unicast neighbors <ip> advertised-routes

Why a route may stop at each stage

StageReason
Not in Adj-RIB-InThe peer didn't send it (their outbound policy, or no route)
Dropped by inbound policyA prefix list, AS-path filter or route map denied it
Not bestAnother path won the decision process
Not in the RIBA better administrative distance (IGP, static) or RIB failure
Not advertisedOutbound policy, iBGP split horizon, or no next-hop reachability
R1# show bgp ipv4 unicast neighbors 203.0.113.2 received-routes | include 192.0.2.0
 *   192.0.2.0        203.0.113.2              0             0 64500 i
R1# show bgp ipv4 unicast neighbors 203.0.113.2 routes | include 192.0.2.0
R1# show bgp ipv4 unicast 192.0.2.0/24 | include best|Refresh|valid
R1# show bgp ipv4 unicast rib-failure
R1# show bgp ipv4 unicast neighbors 10.255.0.2 advertised-routes | include 192.0.2.0

In this example the route appears in received-routes but not in routes, so R1's inbound policy dropped it. The peer and the network are not the cause.

Memory note

Keeping a copy of the pre-policy Adj-RIB-In with soft-reconfiguration inbound costs memory. With route refresh, it is only needed to see what a peer sent before policy.

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.
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 docProtocol standard + deployed implementation RFC 4271

Authoritative/upstream documentation reviewed for bounded claims in Network & Protocols → BGP Adj-RIB-In / Loc-RIB / Adj-RIB-Out Reference. Documentation verification only; this is not observed lab or production Evidence.

Basis: https://www.rfc-editor.org/rfc/rfc4271.html · confidence 94%
Technical changelog & impact

What changed and what may be affected

Recent technical edits are separated from ordinary page timestamps. Relationship impact is advisory: it identifies nearby canonical references to review, not automatic breakage.

Related reference impactReview these references after material technical changes when their shared boundary is affected.
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
adj rib inloc ribadj rib outbgp rib pipelinebgp received routesadvertised routes
Embedded quick reference

Operational notes

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

BGP Route Pipeline — Fast Check

Where did the prefix disappear?

Peer UPDATE → inbound policy → Adj-RIB-In → Loc-RIB/best path → IP RIB → CEF → outbound policy → advertised-routes.

Check one boundary at a time.

Confirmation

Confirm action

Continue?