Pcornel
Browse topics
Options
Recent
Favorites
Networking · Technical reference

BGP Fundamentals

Direct answer

BGP exchanges reachability and path attributes over TCP port 179. eBGP normally connects different autonomous systems; iBGP distributes BGP reachability between speakers in the same AS. The transport route, selected BGP path, routing-table entry and forwarding adjacency are separate states.

When to use this

Use it when a BGP session or route is missing and you need to work through transport, session, address family, next hop and best path.

First 30 seconds

1. show ip bgp summary

2. show ip bgp neighbors

3. show ip bgp 203.0.113.0/24

4. show ip bgp rib-failure

Operational verification

transport → session/AF → accepted path → next-hop resolution → best path → RIB → CEF → bounded traffic

Context & applicabilityCommon mistakes · platform/version boundaries
Platform / version applicability
Default VRF IPv4 unicast; review deployed IOS / IOS XE feature support.Cisco IOS XEIOS/IOS XECisco IOS / IOS XE
Applicability is projected only from persisted Topic profile and Command metadata.
At a glance

Operational reference

Fast context before you go deeper.

PlatformDefault VRF IPv4 unicast; review deployed IOS / IOS XE feature support. · Cisco IOS XE · IOS/IOS XE
Key commandshow ip bgp summary
Scope / prerequisiteUse it when a BGP session or route is missing and you need to work through transport, session, address family, next hop…
What next?2 suggested next steps
Child topics (this level)3
Evidence0
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 Verification — read-only Verify boundary
show ip bgp summary
show ip bgp neighbors
show ip bgp 203.0.113.0/24
show ip bgp rib-failure
show ip route bgp
show ip route 203.0.113.0
show ip cef 203.0.113.0/24

Start with peer state, inspect the exact path and next hop, then RIB and CEF. Use the full routing table for the prefix as well as the BGP-filtered view: the installed winner may be a static or IGP route.

Step 2 Failure Signatures Narrow the fault
  • Active/Connect: inspect source address, transport routes, TCP 179 filtering and reciprocal neighbor configuration.
  • Established with zero prefixes: inspect AF activation, origination and directional policy.
  • Candidate without valid/best marker: inspect next-hop resolution and competing paths.
  • RIB-failure: inspect the winning route and administrative distance; distinguish it from an unreachable next hop.
Command lookup Jump straight to Cisco syntax
Drill down

Subtopics

Go one level deeper into this subject.

Key points

Established proves a BGP session, not a required NLRI, acceptable policy, RIB installation or packet delivery. A best marker is local BGP selection. CEF output proves local programming at inspection time; successful delivery still needs a bounded flow and return-path check.

Key checks
show ip bgp summary
show ip bgp neighbors
show ip bgp 203.0.113.0/24
show ip bgp rib-failure
show ip route bgp
show ip route 203.0.113.0
show ip cef 203.0.113.0/24

Start with peer state, inspect the exact path and next hop, then RIB and CEF. Use the full routing table for the prefix as well as the BGP-filtered view: the installed winner may be a static or IGP route.

ReferenceWhat it is1 section · depth on demand

Direct Answer

BGP exchanges reachability and path attributes over TCP port 179. eBGP normally connects different autonomous systems; iBGP distributes BGP reachability between speakers in the same AS. The transport route, selected BGP path, routing-table entry and forwarding adjacency are separate states.

ReferenceHow it works1 section · depth on demand

Technical Mechanics

An AS is an administrative routing-policy boundary, not a physical topology. Classic iBGP retains the AS_PATH inside that boundary; eBGP normally adds the advertising AS. Confederations introduce member-AS exceptions and are outside these examples.

Idle, Connect, Active, OpenSent and OpenConfirm precede Established. TCP success alone does not prove OPEN identity/capability agreement. An IGP, connected route or deliberate static route must provide peer reachability; BGP need not carry its own transport. NEXT_HOP must also resolve independently.

For one prefix distinguish received candidates, eligible/best BGP path, global RIB installation and CEF adjacency. A more preferred non-BGP route can win the RIB even when BGP has a best path. Common attributes apply to both internal and external paths; Weight is Cisco-local, LOCAL_PREF is AS-internal, and MED comparison depends on the candidate AS context. Follow BGP Path Selection for the canonical attribute Topics.

ReferenceImportant terms & boundaries3 sections · depth on demand

Proof Boundaries

Established proves a BGP session, not a required NLRI, acceptable policy, RIB installation or packet delivery. A best marker is local BGP selection. CEF output proves local programming at inspection time; successful delivery still needs a bounded flow and return-path check.

In depth

BGP is the path-vector protocol that exchanges reachability between autonomous systems and, in large networks, inside them. Routers form TCP sessions (port 179) with configured neighbors, exchange routes with attributes, apply policy, and pick one best path per prefix.

BGP building blockPurpose
Neighbor (peer)Explicitly configured, TCP 179
eBGP / iBGPBetween ASes / within an AS
Address familiesIPv4, IPv6, VPNv4, EVPN and more
Path attributesPolicy and best-path inputs
Policy (route maps, prefix lists)What is accepted and advertised

Unlike IGPs, BGP does not discover neighbors or find the shortest path automatically; it implements policy, which is why it scales to the internet.

ReferenceConfiguration & state1 section · depth on demand

Configuration — Cisco IOS / IOS XE

Configuration changes state. Example scope: default VRF, IPv4 unicast, AS 65000, local Loopback0 10.0.0.1/32, remote loopback 10.0.0.2/32. Both loopbacks already have bidirectional underlay reachability. Configure the reciprocal neighbor on the other router; no production prefix origination is implied.

router bgp 65000
 bgp router-id 10.0.0.1
 no bgp default ipv4-unicast
 neighbor 10.0.0.2 remote-as 65000
 neighbor 10.0.0.2 update-source Loopback0
 address-family ipv4 unicast
  neighbor 10.0.0.2 activate
 exit-address-family
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 IOS XE 17.xSingle eBGP neighbor advertising one prefix.

Assumptions: Interface 192.0.2.1/30 toward AS 65002 is up; 10.10.0.0/16 exists in the RIB (static to Null0 if needed).

router bgp 65001
 bgp router-id 10.255.0.1
 bgp log-neighbor-changes
 neighbor 192.0.2.2 remote-as 65002
 neighbor 192.0.2.2 description ISP-A
 !
 address-family ipv4
  network 10.10.0.0 mask 255.255.0.0
  neighbor 192.0.2.2 activate
 exit-address-family
!
ip route 10.10.0.0 255.255.0.0 Null0

Expected output

Cisco IOS / IOS XE IOS XE 17.xshow ip bgp summary

Expected state: The neighbor is Established (a number in State/PfxRcd) and prefixes are received.

BGP router identifier 10.255.0.1, local AS number 65001
Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
192.0.2.2       4 65002    1203    1188       42    0    0 18:22:07      12
A word (Idle, Active, Connect) in the last column means the session is not up; a number is the received prefix count. Use show ip bgp neighbors 192.0.2.2 advertised-routes to prove what you send. Illustrative authored output: field layout matches the tool, values will differ in your environment.
Depth when you need it

Deep reference

Healthy vs suspicious evidence

Expected Output — illustrative

Authored illustration; not a device capture. Field wording varies with IOS / IOS XE release.

Neighbor        V    AS     Up/Down  State/PfxRcd
10.0.0.2        4    65000  00:20:00  1

*>i 203.0.113.0/24  10.0.0.2  0  100  0  65010 i

Numeric State/PfxRcd means Established in this family; 1 is a prefix count, not a forwarding result. In the path line, * means valid, > locally selected best, the first i internal, and the final i ORIGIN IGP. ORIGIN IGP does not say OSPF carried this prefix.

Confirmation

Confirm action

Continue?