Pcornel
Browse topics
Options
Recent
Favorites
Networking · Technical reference

BGP Table

Direct answer

The BGP table holds every path BGP has received for each prefix, with its attributes; the best one is marked > and offered to the routing table. show bgp ipv4 unicast shows it — a path in the BGP table is not necessarily in the RIB.

When to use this

Use it to read show ip bgp: is the prefix there, how many paths exist, which one is best, and did it make it into the routing table.

First 30 seconds

1. show ip bgp — all paths received and kept (Adj-RIB-In after policy).

2. * valid, > best, i iBGP, r RIB-failure.

3. Only the best path is installed in the RIB and advertised.

Operational verification

UPDATE received → inbound policy → path stored in the BGP table → valid (next hop reachable) → best path > → routing table (unless r) → advertised to neighbours

Evidence · next step

Compare Weight, LOCAL_PREF, local origination, AS_PATH, Origin, MED and NEXT_HOP in order.

Continue only after interpreting the current observation.
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 · IOS/IOS XE · Cisco IOS XE
Key commandshow ip bgp
Scope / prerequisiteUse it to read show ip bgp: is the prefix there, how many paths exist, which one is best, and did it make it into the r…
What next?3 suggested next steps
Evidence3
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.

7 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 First 30 seconds Verify boundary

Immediate answer: For the target prefix, compare every received path and its validity/best markers before looking at the global routing table.

Verification chain: received paths → policy effects → validity/next-hop → best-path attributes → selected BGP path → RIB installation

Stop condition: A best path in the BGP table does not show it is installed in the global RIB or usable by CEF.

Step 2 Operational verification and known-good state Verify boundary
show ip bgp
show ip bgp 203.0.113.0 255.255.255.0
show ip bgp neighbors 192.0.2.2 routes
show ip bgp rib-failure

The table view gives one line per path with status codes in front and attributes behind. The prefix view shows each path in full with its attributes spelled out. The neighbour view lists what was accepted from that neighbour. The last command lists best paths that did not make it into the routing table, with the reason.

Known-good: the prefix is present with the expected number of paths, exactly one is >, and the routing table shows it as a BGP route via that path's next hop.

Step 3 Verification and output interpretation Verify boundary

For a target prefix, inspect all BGP paths, validity, best-path marker, next-hop reachability and key attributes. Then compare the selected path with show ip route and the expected CEF result. If the prefix is absent from the BGP table, investigate advertisement/policy before RIB issues; if present but not best, inspect attributes; if best but not installed, inspect RIB competition or next-hop validity.

Step 4 Step-by-step troubleshooting Narrow the fault

2. Walk this chain: received paths → policy effects → validity/next-hop → best-path attributes → selected BGP path → RIB installation.

Boundary rule: A best path in the BGP table does not show it is installed in the global RIB or usable by CEF.

Step 5 Verification & troubleshooting Narrow the fault

1. show ip bgp <prefix> → is the prefix there, how many paths, which one is best?

2. Not there: show ip bgp neighbors <ip> routes shows what was accepted from a neighbour; then check the neighbour's side and your inbound filter.

3. There, but no path is best: look at the next hop — is it marked inaccessible?

4. Best, but flagged r: show ip bgp rib-failure and show ip route <prefix> show which other source holds the prefix.

5. Your own prefix is missing: compare the network statement's mask with show ip route.

Step 6 Failure signatures and troubleshooting branches Narrow the fault
  • The prefix is missing. The neighbour does not send it, an inbound filter drops it, or its AS_PATH contains your own AS.
  • Paths are present but none is best. The next hop is inaccessible.
  • r> in front of the prefix. A static or IGP route with a lower administrative distance has the same prefix. Sometimes intended; the BGP path is still advertised.
  • Your own prefix is not in the table. The network statement's mask does not match a route in the routing table exactly.
  • The table version climbs continuously. A prefix or a session is flapping.
Step 7 When the problem is really fixed Narrow the fault
  • The prefix is in the BGP table with the expected paths.
  • One path is marked best, and you can say why.
  • The routing table shows the prefix via that path — or the RIB-failure is understood and intended.
  • The table version is stable.
Evidence references

Evidence · 3 on this Topic

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

command output · 2configuration · 1
Command lookup Jump straight to Cisco syntax
Key points

Status codes at the start of the line: * valid, > best, i learned from iBGP, r not installed in the routing table (RIB-failure). The code at the end of the line is the ORIGIN (i, e, ?) — a different thing. Next hop 0.0.0.0 means this router originated the prefix. The table shows paths after inbound policy; a filtered route is simply absent.

Key checks

show ip bgp → one line per path, status codes and attributes. show ip bgp <prefix> → every path for one prefix in detail. show ip bgp neighbors <ip> routes / advertised-routes → what was accepted from, and sent to, one neighbour.

ReferenceWhat it is2 sections · depth on demand

BGP scope — internal and external paths

The BGP table contains internal and external candidate paths. A received path needs acceptable policy and a resolvable NEXT_HOP before best-path eligibility. Local BGP selection is distinct from global RIB installation; a lower administrative-distance route can win the RIB. Compare the selected exact prefix, show ip bgp rib-failure, the full IP route and CEF. The retained external-peer examples apply only to their illustrated source context.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.

What it is

The BGP table — what show ip bgp displays — holds every path the router has accepted from its neighbours, plus the prefixes it originates itself, with all their attributes. For each prefix one path is marked best; only that one is offered to the routing table and advertised onward.

ReferenceWhy it matters1 section · depth on demand

Why it matters

This is where the three questions of BGP troubleshooting are answered: did the route arrive, which path won and why, and did it reach the routing table. The BGP table is not the routing table. It can hold several paths for one prefix, and a prefix can be present here and still be absent — or come from another source — there.

ReferenceImportant terms & boundaries6 sections · depth on demand

Key points

  • Codes at the start of a line: * valid, > best, i learned over iBGP, r not installed in the routing table (RIB-failure), s suppressed.
  • Code at the end of a line: the ORIGIN — i, e or ?.
  • An empty Network field means "same prefix as the line above".
  • Next hop 0.0.0.0 marks a prefix originated on this router.
  • The table shows paths after inbound policy; a filtered route is simply not there.
  • A network statement adds a prefix only if exactly that prefix and mask is in the routing table.
  • The table version rises with every change; a rapidly rising version means instability.

In depth

The BGP table: every path, not just the best

BGP keeps all received paths for each prefix in the BGP table (also called the BGP RIB), selects one best path per prefix, and offers that path to the routing table. The Catalyst 9300 BGP guide lists show ip bgp, show ip bgp neighbors and show ip bgp network among its monitoring commands, and states that network configures a local network and adds it to the BGP table.

R1# show ip bgp
BGP table version is 412, local router ID is 10.0.0.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale, m multipath, b backup-path, x best-external
Origin codes: i - IGP, e - EGP, ? - incomplete
     Network          Next Hop            Metric LocPrf Weight Path
 *>  0.0.0.0          192.0.2.1                0             0 64510 i
 *                    192.0.2.5                0             0 64511 i
 *>  198.51.100.0/24  0.0.0.0                  0         32768 i
 r>i 10.20.0.0/16     10.0.0.2                 0    100      0 i
 *>  203.0.113.0      192.0.2.1                               0 64510 3356 15169 i
R1# show ip bgp 203.0.113.0
R1# show ip bgp rib-failure

Reading the status codes

CodeMeaning
*Valid: the next hop is reachable
>Best path; offered to the routing table
i (before the prefix)Learned from iBGP
rRIB failure: a route with better AD exists (here 10.20.0.0/16 via the IGP)
sSuppressed by an aggregate
Weight 32768Locally originated

Three tables

TableContains
Adj-RIB-InWhat each neighbour sent (kept with soft-reconfiguration inbound)
Loc-RIB (BGP table)All accepted paths, best marked >
Adj-RIB-OutWhat is advertised to each neighbour (show ip bgp neighbors … advertised-routes)

From the BGP table to the routing table

The best path is installed if no route from a source with a lower administrative distance exists (eBGP 20, iBGP 200 per the guide). A network statement only originates a prefix when an exact match exists in the routing table.

Size

A full Internet table is about a million IPv4 and over 200,000 IPv6 prefixes. Catalyst 9300 switches aren't sized for that; they typically take a default route plus selected prefixes.

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.

Quick reference

The BGP table (Adj-RIB-In after policy plus Loc-RIB) contains every valid path BGP knows for each prefix, with attributes. The best path (>) is offered to the routing table and advertised to peers.

show bgp ipv4 unicast
!    Network          Next Hop        Metric LocPrf Weight Path
! *> 203.0.113.0/24   198.51.100.1         0             0 64500 i
! *  203.0.113.0/24   192.0.2.1            0             0 64600 64500 i
show bgp ipv4 unicast 203.0.113.0/24

Documented example, not captured output.

* = valid, > = best, i (in the first column) = learned via iBGP, r = RIB failure (another source with lower AD won).

Mechanics and state ownership

It helps to think of three stages. What a neighbour sends passes the inbound policy and is stored as a path. Among all stored paths for a prefix, best-path selection marks one. That best path is then run through each neighbour's outbound policy and advertised. A router never advertises a path that is not its best, which is why neighbours see at most one path per prefix from you.

Because only accepted paths are stored, changing an inbound policy has no effect on routes already filtered away — the router no longer has them. A soft clear (clear ip bgp <neighbour> soft in) asks the neighbour to send its routes again so that the new policy can be applied without resetting the session.

The routing table is a separate decision. BGP offers its best path; if another source with a lower administrative distance already has the same prefix, the BGP route is not installed and the line is flagged r. The path is still BGP's best and is still advertised to neighbours.

State model and selection mechanics

The BGP table keeps per-prefix path information learned from peers or originated locally, including next hop and path attributes used during best-path selection. Multiple paths for the same NLRI can coexist, with one normally marked best for the local BGP decision process. The best BGP path is then offered to the RIB, where administrative distance and other route sources can determine whether it is actually installed. Thus “present in BGP” and “present in the routing table” are separate states.

Limits and common misconceptions

The BGP table is not the forwarding table. A valid path can be retained as an alternate, a best path can lose installation to another routing source, and a route can be hidden by policy before it ever appears locally. Likewise, a prefix count on a neighbor is only an aggregate and cannot show the state of one important prefix.

ReferenceConfiguration & state1 section · depth on demand

Policy and configuration model

Policy should be designed with awareness of where it acts: inbound policy changes which received paths are accepted or modified before local selection, while outbound policy changes what is advertised to a neighbor. Route origination also requires a source of truth, such as a matching route for a network statement or redistribution policy. Keep BGP-table intent separate from RIB competition.

Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Technical examples

Configuration & expected output

Concrete examples are shown only when the stored reference contains an actual configuration or output shape for this Topic.

Configuration example

Cisco IOS / IOS XE RFC 4271Put a local prefix into the BGP table

Assumptions: Lab addressing; local AS 65000; loopbacks carried in the IGP.

router bgp 65000
 address-family ipv4 unicast
  network 198.51.100.0 mask 255.255.255.0
! the exact prefix must already be in the routing table (connected, static or IGP)

Expected output

Cisco IOS / IOS XE RFC 4271show ip bgp

Expected state: One best path per prefix; codes explain the rest.

BGP table version is 42, local router ID is 1.1.1.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure
Origin codes: i - IGP, e - EGP, ? - incomplete

     Network          Next Hop            Metric LocPrf Weight Path
 *>  198.51.100.0/24  0.0.0.0                  0         32768 i
 *>  203.0.113.0/24   192.0.2.2                0             0 65010 i
 * i                  10.0.0.2                 0    100      0 65020 65010 i
! Illustrative output, not captured Evidence.
First line: locally originated (next hop 0.0.0.0, weight 32768). 203.0.113.0/24 has two paths; the blank Network field means "same prefix". The eBGP path is best; the second, marked `i` in front, came over iBGP and has the longer AS_PATH.
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 Routing → BGP → eBGP → BGP Table. Documentation verification only; this is not observed lab or production Evidence.

Basis: https://www.rfc-editor.org/rfc/rfc4271.html · confidence 94%
Embedded reference data

Quick lookup tables

BGP Table · routing reference

Compact path-selection and evidence boundaries for fast lookup.

LayerQuestion
NeighborWas routing information exchanged?
BGP tableWhich paths/attributes exist?
RIBWhich route source won?
CEFWhat will forward packets?

BGP Table operational reference

Topic-specific bounded interpretation: known-good BGP state, suspicious signatures and the next technical proof boundary.

BoundaryKnown-good for BGP TableSuspicious signatureNext proof
Session/inputCorrect peer, AF and prefix contextTransport, FSM or prefix eligibility disagreesPeer detail and exact prefix
Attribute/policythe local BGP path database for a prefix, including multiple candidate paths, validity, best-path marking, next-hop usability and the boundary between BGP selection and RIB installation matches intended policythe target prefix absent despite an Established peer, multiple paths present but the expected path not best, a path marked valid but with an unreachable next hop, a BGP best path absent from the RIB, or an installed route whose CEF adjacency still cannot forward the tested trafficCompare candidate paths and policy
Route/forwardingExpected best path reaches RIB/FIBBGP state exists but installed path disagreesRIB/FIB/CEF and next-hop proof
ClosureOriginal test passes for explained reasonSymptom moved, was bypassed or state was forcedRegression/failover test
Confirmation

Confirm action

Continue?