Pcornel
Browse topics
Options
Recent
Favorites
Networking · Technical reference

eBGP

Direct answer

eBGP is a BGP session between routers in different autonomous systems — how separate organisations exchange routes. The neighbour is normally directly connected, the sender adds its AS to the path and sets itself as next hop, and received routes have administrative distance 20.

When to use this

Use it at the edge towards a provider, customer or partner: to bring a session up, to control what is announced and accepted, and to avoid becoming a transit path by accident.

First 30 seconds

1. show ip bgp summary — Established?

2. Not → neighbour address and remote-as correct? Directly connected, or ebgp-multihop set?

3. show ip bgp neighbors <ip> advertised-routes — your prefixes, and only yours?

4. show ip bgp neighbors <ip> routes — the expected prefixes received?

5. Own prefix missing → does the network statement match a route exactly?

Operational verification

neighbour reachable (directly connected or multihop) → remote AS matches → Established → own prefixes in BGP and permitted outbound → advertised → neighbour's prefixes accepted inbound → installed with distance 20

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 · Cisco IOS / IOS XE · Cisco IOS XE
Key commandrouter bgp <asn>
Scope / prerequisiteUse it at the edge towards a provider, customer or partner: to bring a session up, to control what is announced and acc…
Show · 6Reference · 7
What next?3 suggested next steps
Child topics (this level)2
Catalog command links13
Evidence0
On this pageJump to a specific section
Cisco IOS / IOS XE first

Primary Commands

Configuration and operational commands for this Topic.

Verification

Show Commands

Read-only Cisco show commands for confirming state, narrowing a fault and interpreting the current boundary.

How to read the output

show bgp ipv4 unicast

Look first: paths, next hop, AS_PATH, local-pref/MED/weight, best marker

Healthy: Expected path is accepted and selected according to policy.

Warning: Unexpected best path, inaccessible next hop, missing path or policy attributes.

Does not prove: Best BGP path does not prove installation/forwarding if another boundary intervenes.

show bgp ipv4 unicast summary

Look first: peer, AS, state/PfxRcd, uptime

Healthy: Expected peer is Established and prefix count is plausible.

Warning: Idle/Active/Open* state, repeated uptime reset or unexpected prefix count.

Does not prove: Established does not prove desired prefixes pass policy or win best path.

show ip route bgp

Look first: route source/code, prefix, next hop, outgoing interface

Healthy: Expected prefix is installed with intended next hop/source.

Warning: Route absent, unexpected protocol/AD/metric, recursive next hop or wrong exit.

Does not prove: RIB presence does not prove FIB programming or packet delivery.

Operational workflow

Verification & Troubleshooting

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

8 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: Freeze peer and exact IPv4 prefix. Separate TCP/session failure from family/policy/prefix absence, then follow accepted path → RIB → CEF → sourced traffic.

Verification chain: peer/source/TCP → OPEN/Established → IPv4-unicast activation → prefix origination/export/import → BGP choice → RIB/CEF → traffic/return route

Boundary: Configuration and a local healthy display do not establish the complete transaction or end-to-end result.

Step 2 eBGP: bounded prefix test, non-transit and recovery Verify boundary

Illustrative lab, not an executed device test: AS 65001 at 192.0.2.1/30 peers with AS 65002 at 192.0.2.2/30. Each originates one dedicated test loopback/prefix present in its own RIB. Use explicit IPv4-unicast intent and import/export filters allowing only the chosen test prefixes; do not turn the lab edge into unrestricted transit.

Read both summaries and accepted prefix paths. Verify each test prefix's AS path, next hop, RIB installation and CEF resolution. Test between loopbacks with an explicit source and a valid reverse route. Session Established plus one received prefix is insufficient evidence for the specific requested route.

Negative test: in the isolated lab, filter only the selected outbound test prefix while preserving the session, then perform supported scoped policy re-evaluation. Expect its withdrawal on the receiving peer while the BGP session remains Established. Restore the exact prior filter, verify re-advertisement, route installation and traffic, and check a separately permitted prefix.

Changing filters or activation changes routing state. A hard peer clear can interrupt all routes on that session and is not a diagnostic read. Save the prior configuration and stop conditions; restoring configuration still requires convergence. No captured Evidence or new verification date is created.

Step 3 Operational verification and known-good state Verify boundary
show ip bgp summary
show ip bgp neighbors 192.0.2.2 advertised-routes
show ip bgp neighbors 192.0.2.2 routes
show ip bgp 203.0.113.0/24
show ip route bgp

The summary shows the session and the number of prefixes received. advertised-routes lists what is sent to the neighbour; routes lists what was accepted from it. The prefix detail shows the AS path, next hop and whether the path is best. The routing table shows which BGP routes were installed.

Known-good: the session shows a prefix count, the own prefixes are in advertised-routes, the expected prefixes are received, and their AS paths start with the neighbour's AS.

Step 4 Verification and output interpretation Verify boundary

Use show ip bgp summary for session state, peer AS, uptime and prefix-count context. Then use show ip bgp <prefix> or the table view to inspect the actual NLRI and path attributes, and show ip route <prefix> to confirm RIB installation. If the BGP table contains the expected best path but the RIB does not, inspect next-hop resolution and competing route sources. For policy questions, compare the received route, post-policy BGP table and advertised route in the correct direction rather than inferring policy behavior from session state.

Step 5 eBGP: transport, policy, prefix and forwarding branches Narrow the fault

1. Session not Established: verify interface/peer reachability, actual source address, remote AS, TCP/179 reachability and configured authentication. Inspect both peers. A successful ping alone does not establish BGP transport or OPEN compatibility.

2. Session established but target prefix absent: verify the intended IPv4-unicast family is active, origination requirements are met and export/import policy permits that exact prefix. A configured network statement requires an exact prefix/mask in the originating RIB. Check local advertised-routes where supported and the receiving peer's accepted table independently. A post-policy table cannot show every pre-policy advertisement; received-route visibility depends on platform/capabilities and retention settings.

3. Candidate present but not best: follow the scoped attribute comparison in Best-Path Reference; do not change transport to solve a policy decision.

4. Best BGP path but absent from RIB: inspect show ip route <destination> for a competing source and inspect next-hop resolution. A BGP best-path marker does not guarantee installation or CEF programming.

5. Route installed but service fails: inspect show ip cef <destination>, adjacency, downstream policy and the return prefix. Generate the original application flow with the intended source.

Preserve observations before any peer reset. Policy re-evaluation must use a reviewed peer/family-scoped method supported by negotiated capabilities.

Step 6 Verification & troubleshooting Narrow the fault

1. Verify peer address, local/remote AS and source/interface path.

2. Verify route to the peer and TCP/179.

3. Check summary and neighbor detail.

4. Verify the intended address family is active.

5. Inspect the exact route advertisement/receipt and best path.

6. Verify the route enters the RIB and forwarding plane.

Step 7 Failure signatures and troubleshooting branches Narrow the fault
  • The session stays Idle or Active. Wrong neighbour address or remote-as, the neighbour is not directly connected and ebgp-multihop is missing, or TCP port 179 is blocked.
  • Established, but the own prefix is not advertised. The network statement does not match a route in the routing table exactly, mask included.
  • Established, 0 prefixes received. The neighbour sends nothing, or an inbound filter drops everything.
  • A received route is discarded. Its AS path contains the local AS.
  • One provider's routes are being announced to the other. No outbound filter; the network has become a transit path.
  • The policy was changed without effect. Refresh with clear ip bgp <neighbor> soft in or soft out.
Step 8 When the problem is really fixed Narrow the fault
  • The session is Established and stable.
  • advertised-routes contains the own prefixes and nothing else.
  • The expected prefixes are received and installed.
  • The neighbour confirms that it receives the announcement, and an outside test reaches the prefix.
Command lookup Jump straight to Cisco syntax
Drill down

Subtopics

Go one level deeper into this subject.

Troubleshooting trees

Start from the symptom

Prove the nearest boundary, branch on the observation, and repeat the original test after the minimum controlled change.

Symptom-first flow BGP peer does not reach Established 7 decision steps

First proof

Start below BGP: prove peer addressing, routing and TCP reachability before changing BGP policy.

Useful read-only checks: show bgp ipv4 unicast summary · show ip route · show interfaces

Step 1 Peer addresses are correct Observe → decide

Compare configured neighbor addresses and local source/interface.

If healthy: The intended endpoints are being used.

If broken: Correct addressing/source assumptions before BGP changes.

Step 2 IP reachability exists Observe → decide

Prove a route to the peer and a valid return path.

If healthy: Both directions have plausible routing.

If broken: Fix routing before touching BGP timers or policy.

Step 3 TCP/179 can form Observe → decide

Test the control-path boundary and inspect resets/timeouts.

If healthy: The TCP session can establish.

If broken: Investigate ACL, CoPP, firewall or path failure.

Step 4 AS and neighbor parameters agree Observe → decide

Compare remote AS and relevant session parameters.

If healthy: Peer identities and AS expectations agree.

If broken: Correct the explicit session mismatch.

Step 5 BGP state transition Observe → decide

Read the exact Idle/Connect/Active/Open*/Established state.

If healthy: The peer reaches Established and remains stable.

If broken: Use the current state to choose the next boundary instead of clearing blindly.

Step 6 Capabilities and AF are usable Observe → decide

Confirm the intended address family is negotiated/activated.

If healthy: The desired AF is active.

If broken: Fix AF/capability scope without changing unrelated policy.

Step 7 Repeat the original prefix test Observe → decide

Verify the expected prefixes after the session is stable.

If healthy: Expected routes are exchanged according to policy.

If broken: Established alone is not route-policy proof.

Proof limit

A passing step proves only that boundary; continue until the original symptom is explained and retested.

Failure signatures

Recognize the symptom, then prove the boundary

Observed symptom → candidate boundary → discriminating check → original-test closure. A signature narrows the search; it never proves root cause by itself.

BGP neighbor remains Active / Connect
1 · Observe

The BGP FSM repeatedly fails before a stable Established session.

2 · Candidate boundaries

IP reachability · TCP/179 · neighbor source/address · ACL/firewall/CoPP · remote-AS/session parameters

3 · Discriminate

prove bidirectional peer reachability → verify TCP/179 behavior → compare neighbor address/source and AS

4 · Proof limit

Active is a session state, not proof of a BGP policy problem.

Repeat the original failing test after the minimum controlled change before calling recovery verified.
BGP Established but expected prefixes are absent
1 · Observe

The session is stable, but expected NLRI is not received, accepted or installed.

2 · Candidate boundaries

address-family activation · inbound/outbound policy · origination · next-hop/RIB selection

3 · Discriminate

inspect received/advertised paths where safe → check policy and AF scope → compare BGP table with RIB

4 · Proof limit

Established proves transport/session health, not route exchange correctness.

Repeat the original failing test after the minimum controlled change before calling recovery verified.
BGP path has inaccessible next hop
1 · Observe

A path is visible in BGP but cannot become usable because its next hop is unresolved.

2 · Candidate boundaries

IGP/static reachability to next hop · next-hop-self design · recursive lookup

3 · Discriminate

resolve next-hop in RIB → confirm intended next-hop policy → verify CEF after RIB installation

4 · Proof limit

A visible BGP path does not mean it is eligible for forwarding.

Repeat the original failing test after the minimum controlled change before calling recovery verified.
Key points

An Established session says little: check what is advertised and what is received. A network statement needs an exactly matching route in the routing table. With two providers, filter outbound — otherwise one provider's routes are announced to the other.

Key checks
  • show ip bgp summary — state and prefixes received.
  • show ip bgp neighbors <ip> advertised-routes — what you announce.
  • show ip bgp neighbors <ip> routes — what you accept.
  • show ip bgp <prefix> — AS path, next hop, best.
  • show ip route bgp — installed routes.
ReferenceWhat it is1 section · depth on demand

What it is

External BGP (eBGP) is a BGP session between routers in different autonomous systems. It is how separate organisations — a company and its internet providers, or two providers — exchange routes.

ReferenceWhy it matters1 section · depth on demand

Why it matters

eBGP is the boundary of a network: what is announced there decides how the outside reaches it, and what is accepted decides where its traffic leaves. A session that is up says little; the questions that matter are which prefixes are sent, which are received, and whether they are the intended ones.

ReferenceHow it works1 section · depth on demand

eBGP: session and IPv4-unicast observations

Scope: Cisco IOS / IOS XE, directly connected eBGP, global IPv4 unicast. Multihop/loopback peering, VRFs and other address families require explicit additional scope.

address-family ipv4 unicast enters BGP configuration mode; it is not a read-only observation. IPv4 activation defaults depend on configuration, including no bgp default ipv4-unicast. Inspect the running BGP configuration and negotiated family rather than assuming every neighbor requires the same default workaround.

Use show ip bgp summary for peer/session overview, show ip bgp neighbors <peer> for remote AS, session and negotiated-family information, and show ip bgp <network> <mask> for one exact prefix. A numeric State/PfxRcd value indicates an Established IPv4 session; zero prefixes can still coexist with a working session. Active is not a healthy forwarding status.

Reference: Cisco IOS XE basic BGP guide. For attribute ordering and exceptions, use [BGP Best-Path Reference](topic.php?topic=215&view=deep).

ReferenceImportant terms & boundaries6 sections · depth on demand

Key points

  • neighbor <ip> remote-as <asn> defines the peer and expected remote AS
  • Classic directly connected eBGP expects the peer to be reachable as an adjacent external neighbor unless the design deliberately changes that behavior
  • network originates only when the matching prefix/mask exists in the local RIB
  • Address-family activation determines whether a neighbor exchanges IPv4-unicast NLRI in AF-oriented configuration
  • A numeric prefix count in summary output normally indicates Established state; Idle/Active/Connect are session-establishment boundaries.

In depth

eBGP: BGP between different autonomous systems

eBGP sessions connect routers in different ASes, typically between an organisation and its ISPs, or between providers. The Catalyst 9300 BGP guide notes that external neighbours are usually directly connected, and that by default only directly connected eBGP neighbours are allowed; ebgp-multihop is needed otherwise.

R1(config)# router bgp 64500
R1(config-router)# neighbor 192.0.2.1 remote-as 64510
R1(config-router)# neighbor 192.0.2.1 description ISP-A
R1(config-router)# neighbor 192.0.2.1 password <secret>
R1(config-router)# address-family ipv4 unicast
R1(config-router-af)# network 198.51.100.0 mask 255.255.255.0
R1(config-router-af)# neighbor 192.0.2.1 activate
R1(config-router-af)# neighbor 192.0.2.1 prefix-list OUR-PREFIXES out
R1(config-router-af)# neighbor 192.0.2.1 prefix-list FROM-ISP-A in
R1(config-router-af)# neighbor 192.0.2.1 maximum-prefix 1000000 90
R1(config)# ip prefix-list OUR-PREFIXES permit 198.51.100.0/24
R1(config)# ip route 198.51.100.0 255.255.255.0 Null0
R1# show ip bgp neighbors 192.0.2.1 advertised-routes
   Network          Next Hop            Metric LocPrf Weight Path
*>  198.51.100.0/24  0.0.0.0                  0         32768 i

eBGP compared with iBGP

eBGPiBGP
PeersDifferent ASSame AS
AD (from the guide)20200
NEXT_HOPSet to self when advertisingPassed on unchanged
AS_PATHOwn AS prependedUnchanged
Loop preventionReject routes containing own ASNo re-advertising of iBGP routes to iBGP peers
ConnectivityDirectly connected by defaultThrough the IGP, usually between loopbacks

Edge hygiene

PracticeReason
Outbound prefix list with only your own prefixesPrevents route leaks
Inbound filtering of bogons, your own prefixes and too-specific routesProtects your routing
maximum-prefixShuts the session if the peer sends far too many routes
Null0 route for each advertised aggregateThe network statement needs a matching RIB entry; the Null0 route keeps it stable
remove-private-asThe guide documents it; strips private ASNs before advertising to the Internet

Multihop

If the peering uses loopbacks (for example over two parallel links), use ebgp-multihop 2 and update-source Loopback0 with static routes to the peer's loopback.

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

eBGP runs between routers in different autonomous systems, typically between an organisation and its ISPs or between data centre fabrics. It assumes directly connected peers (TTL 1), changes the NEXT_HOP to itself and prepends its AS to AS_PATH when advertising.

router bgp 65010
 neighbor 203.0.113.1 remote-as 64500
 neighbor 203.0.113.1 password <secret>
 address-family ipv4 unicast
  network 198.51.100.0 mask 255.255.255.0
  neighbor 203.0.113.1 activate
  neighbor 203.0.113.1 prefix-list OUT-OWN out
  neighbor 203.0.113.1 maximum-prefix 1000000 90

Documented example, not captured output.

Always filter what you send (only your prefixes) and what you receive, so you cannot leak routes or accept a full table you cannot handle.

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

Mechanics and state ownership

An eBGP session is defined with neighbor <ip> remote-as <asn>, where the AS number differs from the router's own. By default the neighbour must be directly connected: eBGP packets are sent with a TTL of 1. Peering between loopbacks, or through another device, requires ebgp-multihop or disable-connected-check and a route to the neighbour's address.

When a router sends a route to an eBGP neighbour it adds its own AS number to the front of the AS path and sets the next hop to its own address on the link. A router that receives a route whose AS path already contains its own AS discards it; that is BGP's loop prevention between autonomous systems.

A route received over eBGP is installed with administrative distance 20, so it wins over any IGP route for the same prefix.

What is sent is not automatic. A prefix is announced only if it is in BGP — through a network statement that exactly matches a route in the routing table, through redistribution, or because it was learned from another neighbour. That last case matters: a router with two providers will, unless filtered, pass one provider's routes to the other and offer itself as a transit path.

Concept and state model

BGP first establishes TCP transport, exchanges OPEN messages with AS/capability information and then maintains the session with KEEPALIVEs and UPDATEs. UPDATEs advertise or withdraw NLRI together with path attributes such as AS_PATH, NEXT_HOP, ORIGIN, MED and LOCAL_PREF where applicable; Cisco also exposes local Weight as a device-local selection input. BGP evaluates eligible paths and marks a best path, but best-in-BGP does not automatically mean installed-in-RIB if next-hop resolution fails or another route source wins according to routing policy. eBGP normally represents an inter-AS boundary, and next-hop handling, address-family activation and policy direction are as important as the base neighbor statement.

Operational boundaries and common misconceptions

Established means the BGP finite-state machine reached the operational session state, but it does not show any particular prefix was exchanged. A nonzero prefix count does not show the specific route you care about is present. A best path in BGP does not show it wins the system RIB, and a RIB route does not show the remote return path or application works. LOCAL_PREF is normally propagated inside an AS, MED is a hint to neighboring ASes under specific comparison rules, AS_PATH affects policy/loop prevention, and Weight is Cisco-local. Keep attribute scope and policy direction explicit.

ReferenceConfiguration & state1 section · depth on demand

Configuration model and design choices

At minimum the peers need correct local/remote AS intent, reachable transport addresses and an activated address family. Use router bgp <asn> and neighbor <ip> remote-as <asn> as the canonical relationship, then activate the appropriate address family where required by the configuration model. Originating a route with a network statement normally requires the exact prefix/mask to already exist in the local RIB; the command does not create reachability by itself. Apply inbound/outbound prefix or route policy deliberately and document attribute changes. Avoid clearing BGP as a routine response to a route-policy issue; preserve received/advertised state first when possible.

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 Routing → BGP → eBGP. Documentation verification only; this is not observed lab or production Evidence.

Basis: https://www.rfc-editor.org/rfc/rfc4271.html · confidence 94%
2026-09-13 · vendor docCisco IOS XE current

Official Cisco vendor documentation reviewed for bounded reference claims: eBGP neighbor/session and route-exchange behavior. This is documentation-based technical verification, not lab or production-runtime proof. Deployment-specific applicability and runtime outcome remain separate evidence.

Basis: https://www.cisco.com/c/en/us/td/docs/routers/ios-xe/ip-routing/b-ip-routing/m_irg-bgp4.html · confidence 94%
Useful command sets

Commands commonly referenced together

Compact reference collections only; they are not a guided troubleshooting workflow.

Cisco BGP core reference commands

Compact commands commonly used together when reading BGP session and route state.

Use as a compact reference set; hand real faults/output to ChatGPT for diagnosis.
Embedded reference data

Quick lookup tables

BGP command evidence boundaries

What the main read-only checks actually prove

CommandProvesDoes not prove
show ip bgp summarypeer FSM/prefix-count contextexact prefix is usable
show ip bgpBGP table/path attributesRIB/CEF installation
show bgp ipv4 unicastAF-specific BGP tableremote acceptance/traffic
show ip bgp neighborspeer detail/counters/capabilitiesone prefix passed policy
show ip route bgpinstalled BGP routes in RIBend-to-end forwarding

eBGP · reference boundaries

Compact technical reference for the most important state and interpretation boundaries.

BGP boundaryHealthy referenceCanonical evidence
SessionIntended peer Establishedshow ip bgp summary
NLRI/pathExpected prefix and attributes presentshow ip bgp <prefix>
RIBIntended BGP path installed if eligibleshow ip route <prefix>
FIBNext hop resolves into usable forwarding stateshow ip cef <prefix/destination>

eBGP operational reference

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

BoundaryKnown-good for eBGPSuspicious signatureNext proof
IntentMatches external BGP peering between autonomous systems, from TCP/session establishment through policy-controlled NLRI exchange and forwarding designConfiguration differs from design/peerCompare effective configuration
Control stateStable expected region/role/topology/path stateIdle/Active sessions from transport or ASN mismatch, Established peers with zero/incorrect prefixes, policy suppressing a route, a learned path losing best-path selection, or a selected BGP route with unusable next-hop recursionInspect protocol detail and adjacent state
ForwardingExpected VLAN/egress/RIB/FIB pathControl state exists but traffic path disagreesMAC/FIB/CEF/adjacency proof
ClosureOriginal test passes for explained reasonSymptom moved, was bypassed or protection disabledRegression test
Confirmation

Confirm action

Continue?