Pcornel
Browse topics
Options
Recent
Favorites
Networking · Technical reference

iBGP vs eBGP Deep Reference

Direct answer

eBGP runs between different autonomous systems, iBGP inside one. eBGP prepends its AS to the AS_PATH, sets itself as next hop and expects a directly connected peer. iBGP changes neither AS_PATH nor next hop, does not pass routes learned from one iBGP peer on to another, and its routes have administrative distance 200 instead of 20.

When to use this

Use it when a route reaches the edge router but not the routers behind it, when internal routers have the route with an unusable next hop, or when planning which routers must peer with each other.

First 30 seconds

1. eBGP: different AS, TTL 1 by default, next hop rewritten, AD 20.

2. iBGP: same AS, next hop kept, no relaying to other iBGP peers (full mesh or RR), AD 200.

3. show ip bgp neighbors <ip> | include link — internal or external link.

Operational verification

route learned over eBGP on the edge → advertised to every iBGP peer (next-hop-self) → each internal router needs its own iBGP session to the edge or a route reflector → next hop resolves through the IGP → installed with AD 200 → passed on only to eBGP peers

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 XE · IOS/IOS XE
Key commandneighbor <peer> update-source <interface>
Scope / prerequisiteUse it when a route reaches the edge router but not the routers behind it, when internal routers have the route with an…
Reference · 1
What next?3 suggested next steps
Child topics (this level)4
Catalog command links1
Evidence0
On this pageJump to a specific section
Cisco IOS / IOS XE first

Primary Commands

Configuration and operational commands for this Topic.

Operational workflow

Verification & Troubleshooting

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

5 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 10.0.0.2
show ip bgp 203.0.113.0/24
show ip route 10.0.0.2
show ip route 192.0.2.2

Compare local/remote AS and transport source with the planned identities. Resolve the next hop printed for the exact prefix, which may differ from the peer.

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

The summary shows each neighbour's AS: equal to the local AS means iBGP. The prefix detail labels each path internal or external and shows its next hop and whether it is best. The route lookup tests whether that next hop is reachable. The last command shows whether the prefix is sent on to a given neighbour.

Known-good: on every iBGP router the prefix is present, its next hop is reachable, and a path is marked best.

Step 3 Failure Signatures Narrow the fault
  • Internal link unexpectedly external: compare effective remote-as and any local-as override.
  • Session works but prefix unusable: missing external-next-hop reachability is independent of loopback reachability.
  • A→B→C chain loses A’s route at C: B is an ordinary iBGP peer, not an RR; add the missing A↔C session or design reflection.
Step 4 Failure signatures and troubleshooting branches Narrow the fault
  • A route is on the border router but not on a router two iBGP hops away. The router in between does not pass iBGP routes on; add the missing session or a route reflector.
  • The route is present but not best and not installed. Its next hop is the external neighbour's address, unknown internally; use next-hop-self on the border router.
  • The iBGP session stays Active. Loopback peering without update-source, or the loopbacks are not in the IGP.
  • The route is best in BGP but the routing table uses the IGP. iBGP's distance of 200 loses to the IGP; this is normal.
  • An eBGP session between loopbacks does not come up. eBGP expects a directly connected neighbour; it needs ebgp-multihop or disable-connected-check.
  • A session meant as iBGP behaves as eBGP. The remote-as differs from the local AS.
Step 5 When the problem is really fixed Narrow the fault
  • Every iBGP router has the prefix with a reachable next hop and a best path.
  • The sessions that should exist are Established, between the intended addresses.
  • The design is either a full mesh or uses route reflectors — with no gaps.
  • A traceroute from an internal router follows the intended exit.
Command lookup Jump straight to Cisco syntax
Drill down

Subtopics

Go one level deeper into this subject.

Key points

A route learned from an iBGP peer is never advertised to another iBGP peer — so every iBGP router needs a session to every other (full mesh) or a route reflector. iBGP leaves the next hop unchanged: use next-hop-self on the edge. Peer iBGP between loopbacks with update-source, so the session survives a link failure. LOCAL_PREF exists only on iBGP sessions.

Key checks

show ip bgp neighbors <ip> | include link → internal link or external link. show ip bgp <prefix> → internal/external on the path and its next hop. show ip route <next-hop> → can this router reach it.

ReferenceWhat it is2 sections · depth on demand

Direct Answer

iBGP uses same-AS BGP sessions to distribute external reachability and internal BGP policy. Ordinary iBGP does not advertise an iBGP-learned route to another iBGP peer; full mesh, route reflection or confederations address that distribution constraint.

Mechanics & mental model

eBGP is a BGP session between routers in different autonomous systems; iBGP is one between routers in the same AS. The protocol is the same, but several default behaviours differ, because eBGP carries routes between organisations and iBGP distributes them inside one.

ReferenceWhy it matters1 section · depth on demand

Why it matters operationally

Most iBGP problems come from expecting it to behave like eBGP. A route learned over iBGP is not passed on to other iBGP neighbours, and its next hop is not changed — so a route can be present on one router and missing or unusable on the next, with every session Established.

ReferenceHow it works1 section · depth on demand

Technical Mechanics

Same-AS peers do not prepend the local AS during internal propagation, so AS_PATH cannot detect a cycle wholly within the AS. The ordinary relay restriction prevents such information loops. It does not prevent eBGP-learned or locally originated eligible routes from being advertised to iBGP peers. Policy and best-path selection still apply.

Peering loopbacks decouple session identity from a physical link, but requires underlay routing in both directions. Transport reachability to the peer loopback is different from resolution of the advertised NEXT_HOP. An edge commonly preserves an external next hop on an iBGP advertisement; next-hop-self can make that route usable internally. A working session therefore does not imply usable received routes.

Use the child Topics for Neighbor Relationships, Full Mesh, Next-Hop-Self and Route Reflectors; existing eBGP Topics retain their canonical URLs.

ReferenceImportant terms & boundaries4 sections · depth on demand

Proof Boundaries

Neither same-AS configuration nor a successful source ping proves NLRI exchange. Neighbor routes are accepted-path views; pre-policy received-routes generally needs inbound soft reconfiguration and extra memory. Do not treat that view as a capture of every UPDATE.

In depth

iBGP and eBGP compared

BGP behaves differently depending on whether the peer is inside the same AS (iBGP) or in another AS (eBGP). Most of the differences exist to prevent loops inside an AS. RFC 4456 explains the key iBGP rule: routes learned from one iBGP peer aren't advertised to other iBGP peers. All iBGP speakers in an AS therefore need a full mesh, n×(n−1)/2 sessions for n routers, unless route reflection or confederations are used.

Differences in behaviour

BehavioureBGPiBGP
PeersDifferent ASSame AS
TTL of BGP packets1 by default (directly connected)255 (any reachable address, often loopbacks)
AS_PATHOwn AS prepended when sendingUnchanged
NEXT_HOPSet to the sending routerUnchanged by default (next-hop-self to change it)
LOCAL_PREFNot sentSent
Re-advertising learned routesTo all peersNot to other iBGP peers (split horizon)
Administrative distance (Cisco)20200
Loop preventionOwn AS in AS_PATHSplit horizon; ORIGINATOR_ID and CLUSTER_LIST with route reflectors

Full-mesh sizes

iBGP routersSessions needed
46
1045
501,225

Beyond a handful of routers, route reflectors are the normal solution.

Common iBGP problems

SymptomCause
Routes received, but not installedNEXT_HOP (the eBGP neighbour address) not reachable through the IGP
Some routers lack routesMissing sessions in the full mesh, and no route reflector
Session flaps when a link failsPeering on interface addresses instead of loopbacks
eBGP multihop peers won't come upebgp-multihop or ttl-security missing
R1(config)# router bgp 65010
R1(config-router)# neighbor 10.255.0.2 remote-as 65010
R1(config-router)# neighbor 10.255.0.2 update-source Loopback0
R1(config-router)# address-family ipv4 unicast
R1(config-router-af)# neighbor 10.255.0.2 next-hop-self
R1(config-router)# neighbor 203.0.113.1 remote-as 64500
R2# show bgp ipv4 unicast 192.0.2.0/24 | include from|Origin|internal|external
    10.255.0.1 (metric 11) from 10.255.0.1 (10.255.0.1)
      Origin IGP, metric 0, localpref 200, valid, internal, best
R2# show ip route 192.0.2.0 | include distance
  Known via "bgp 65010", distance 200, metric 0

With next-hop-self on R1, R2 sees R1's loopback (10.255.0.1) as the next hop, which the IGP can reach. Without it, the next hop would be the ISP's address, 203.0.113.1, which R2 may not know.

Documented example, not captured output.

Mechanics and state ownership

eBGPiBGP
Neighbour's ASDifferentSame
AS_PATHOwn AS added when sendingUnchanged
NEXT_HOPSet to the sender's own addressUnchanged
Passing routes onTo all neighboursRoutes learned from iBGP are not sent to other iBGP neighbours
Administrative distance20200
Neighbour placementDirectly connected (TTL 1)Anywhere in the AS, usually loopback to loopback
LOCAL_PREFNot sentSent

The rule about not passing iBGP routes on exists because the AS path does not change inside an AS and therefore cannot reveal a loop there. The consequence is that every iBGP router must hear each route directly from the router that brought it into the AS: either all iBGP routers peer with each other (full mesh), or route reflectors are used.

The unchanged next hop means a route from an external neighbour arrives at the other iBGP routers with the external neighbour's address as next hop. Unless that address is known in the IGP, the route is unusable. The usual answer is neighbor <ip> next-hop-self on the border router.

iBGP sessions normally run between loopbacks, which needs neighbor <ip> update-source Loopback0 on both sides and an IGP that carries the loopbacks.

ReferenceConfiguration & state1 section · depth on demand

Configuration — Cisco IOS / IOS XE

IPv4 unicast example; configure reciprocal loopback neighbor and an underlay route first. These are configuration commands.

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 RFC 4271iBGP between loopbacks on an edge router

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

router bgp 65000
 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 next-hop-self

Expected output

Cisco IOS / IOS XE RFC 4271show ip bgp neighbors | include BGP neighbor

Expected state: Each neighbour is marked internal or external.

BGP neighbor is 10.0.0.2,  remote AS 65000, internal link
BGP neighbor is 192.0.2.2,  remote AS 65010, external link
! Illustrative output, not captured Evidence.
The link type follows from the AS numbers: same AS as the local router gives an internal (iBGP) link, a different AS an external (eBGP) link — and with it the different rules for next hop, AS_PATH and re-advertisement.
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 → iBGP vs eBGP Deep 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
ibgpebgpibgp vs ebgpbgp internal externalbgp split horizoninternal BGP
Embedded reference data

Quick lookup tables

iBGP vs eBGP Deep Reference operational reference

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

BoundaryKnown-good for iBGP vs eBGP Deep ReferenceSuspicious signatureNext proof
Input/sessionCorrect peer, source, AF and route contextSession/source/input state disagreesExact peer/source/prefix detail
Policy/protocolthe different propagation and path-handling rules of iBGP and eBGP, including ASN relationship, next-hop behavior, AS_PATH handling, iBGP full-mesh pressure and the rule that ordinary iBGP-learned routes are not simply re-advertised to another iBGP peer matches intended designiBGP speakers lack a full-mesh or route-reflector path, an iBGP-learned route is expected to propagate directly to another iBGP peer, NEXT_HOP is preserved but unreachable internally, the wrong update-source creates a peer-identity mismatch, or an eBGP/iBGP classification error leads to incorrect policy expectationsCompare policy/attributes/propagation
Route/forwardingExpected result reaches RIB/FIBControl-plane state exists but installed path disagreesRIB/FIB/CEF + next-hop proof
ClosureOriginal workload passes for explained reasonSymptom moved, was bypassed or state was forcedRegression/failover test
Embedded quick reference

Operational notes

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

iBGP vs eBGP — Fast Check

Session and propagation boundary checklist

1. Determine same-AS vs different-AS.

2. Verify TCP/179 session.

3. Inspect prefix attributes.

4. Verify next-hop reachability.

5. Remember iBGP-to-iBGP advertisement rule.

6. Check policy.

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.

BGP neighbor is 10.0.0.2, remote AS 65000, internal link
  BGP state = Established
  Local host: 10.0.0.1, Local port: 179
  Foreign host: 10.0.0.2, Foreign port: 49152

The link is internal because the local AS is also 65000. TCP port 179 is the listening service; one endpoint may use an ephemeral port. Source address should match the remote neighbor definition.

Confirmation

Confirm action

Continue?