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.
iBGP vs eBGP Deep Reference
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.
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
Operational reference
Fast context before you go deeper.
neighbor <peer> update-source <interface>Primary Commands
Configuration and operational commands for this Topic.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
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-selfon 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-multihopordisable-connected-check. - A session meant as iBGP behaves as eBGP. The
remote-asdiffers from the local AS.
Step 5 When the problem is really fixed Narrow the fault
Subtopics
Go one level deeper into this subject.
Same-AS loopback peering, update-source, TCP 179 and IPv4 unicast address-family activation.
Subtopic iBGP Full Mesh and Route PropagationWhy ordinary iBGP does not relay iBGP-learned routes; full-mesh scaling and route-reflection tradeoffs.
Subtopic Next-Hop-SelfMaking an eBGP next hop usable inside an AS, recursive resolution and the reflected-route all exception.
Subtopic BGP Route Reflector Deep ReferenceBGP Route Reflector Deep Reference is an operational deep-reference Topic for route-reflector client and non-client propagation, reflection loop prevention with ORIGINATOR_ID and CLUSTER_LIST, best-path dependence and the path-hiding boundary introduced when clients rely on an RR instead of a full mesh. Supplements its older compact reference sections with explicit state ownership, verification, failure signatures and closure proof.
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.
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
Official Sources
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
| Behaviour | eBGP | iBGP |
|---|---|---|
| Peers | Different AS | Same AS |
| TTL of BGP packets | 1 by default (directly connected) | 255 (any reachable address, often loopbacks) |
| AS_PATH | Own AS prepended when sending | Unchanged |
| NEXT_HOP | Set to the sending router | Unchanged by default (next-hop-self to change it) |
| LOCAL_PREF | Not sent | Sent |
| Re-advertising learned routes | To all peers | Not to other iBGP peers (split horizon) |
| Administrative distance (Cisco) | 20 | 200 |
| Loop prevention | Own AS in AS_PATH | Split horizon; ORIGINATOR_ID and CLUSTER_LIST with route reflectors |
Full-mesh sizes
| iBGP routers | Sessions needed |
|---|---|
| 4 | 6 |
| 10 | 45 |
| 50 | 1,225 |
Beyond a handful of routers, route reflectors are the normal solution.
Common iBGP problems
| Symptom | Cause |
|---|---|
| Routes received, but not installed | NEXT_HOP (the eBGP neighbour address) not reachable through the IGP |
| Some routers lack routes | Missing sessions in the full mesh, and no route reflector |
| Session flaps when a link fails | Peering on interface addresses instead of loopbacks |
| eBGP multihop peers won't come up | ebgp-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
| eBGP | iBGP | |
|---|---|---|
| Neighbour's AS | Different | Same |
| AS_PATH | Own AS added when sending | Unchanged |
| NEXT_HOP | Set to the sender's own address | Unchanged |
| Passing routes on | To all neighbours | Routes learned from iBGP are not sent to other iBGP neighbours |
| Administrative distance | 20 | 200 |
| Neighbour placement | Directly connected (TTL 1) | Anywhere in the AS, usually loopback to loopback |
| LOCAL_PREF | Not sent | Sent |
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
Configuration & expected output
Concrete examples are shown only when the stored reference contains an actual configuration or output shape for this Topic.
Configuration example
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-selfExpected output
show ip bgp neighbors | include BGP neighborExpected 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.Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
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%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.
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.
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.
| Boundary | Known-good for iBGP vs eBGP Deep Reference | Suspicious signature | Next proof |
|---|---|---|---|
| Input/session | Correct peer, source, AF and route context | Session/source/input state disagrees | Exact peer/source/prefix detail |
| Policy/protocol | the 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 design | iBGP 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 expectations | Compare policy/attributes/propagation |
| Route/forwarding | Expected result reaches RIB/FIB | Control-plane state exists but installed path disagrees | RIB/FIB/CEF + next-hop proof |
| Closure | Original workload passes for explained reason | Symptom moved, was bypassed or state was forced | Regression/failover test |
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.
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.