Pcornel
Browse topics
Options
Recent
Favorites
Networking · Technical reference

Directly Connected Neighbor

Direct answer

A directly connected eBGP neighbor is a peer on the same subnet, which is the default for eBGP (TTL 1). Peering with loopbacks instead needs ebgp-multihop or disable-connected-check and update-source.

When to use this

Use it when an eBGP session on a point-to-point link will not come up, or when you move an eBGP peering to loopback addresses.

First 30 seconds

1. eBGP peers are expected one hop away (TTL 1).

2. Peering on loopbacks needs ebgp-multihop (or disable-connected-check) and a route to the loopback.

3. show ip bgp neighbors <ip> | include TTL|hop.

Operational verification

peer address on a connected subnet → interface up, ARP resolved → TCP 179 with TTL 1 → Established → loopback peering instead: route to the loopback + update-source + ebgp-multihop on both sides

Evidence · next step

Validate both peer endpoints, policy and return route before changing BGP attributes.

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 · Cisco IOS XE · Cisco IOS / IOS XE
Key commandshow ip route 2.2.2.2
Scope / prerequisiteUse it when an eBGP session on a point-to-point link will not come up, or when you move an eBGP peering to loopback add…
What next?3 suggested next steps
Evidence1
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: Show the neighbor address is reachable through the intended directly connected interface and source address before changing eBGP multihop behavior.

Verification chain: interface/addressing → route to peer → source address → TTL/direct-connect expectation → TCP 179 → BGP state

Stop condition: A route to the peer does not show BGP uses the expected source address or that the remote side accepts the session.

Step 2 Operational verification and known-good state Verify boundary
show ip route 2.2.2.2
show ip bgp neighbors 2.2.2.2 | include BGP state|hop|connected
show running-config | section router bgp

The route lookup shows whether the neighbour's address is connected or reached through a static or IGP route. The neighbour detail shows the state and how many hops the session allows. The configuration confirms update-source and the multihop setting.

Known-good: for a normal eBGP peering the neighbour address is directly connected; for loopback peering both routers have the route, update-source and the hop setting, and the session is Established.

Step 3 Step-by-step troubleshooting Narrow the fault

2. Walk this chain: interface/addressing → route to peer → source address → TTL/direct-connect expectation → TCP 179 → BGP state.

Boundary rule: A route to the peer does not show BGP uses the expected source address or that the remote side accepts the session.

Step 4 Verification & troubleshooting Narrow the fault

1. show ip route <peer> → is the address directly connected?

2. show ip bgp neighbors <ip> → the state, and the line saying whether the external neighbour is directly connected or how many hops away it may be.

3. For loopback peering, check three things on both routers: a route to the other loopback, update-source, and multihop or the disabled connected check.

4. ping <peer loopback> source Loopback0.

Step 5 Failure signatures and troubleshooting branches Narrow the fault
  • eBGP between loopbacks stays Idle. The neighbour is not on a connected network and neither ebgp-multihop nor disable-connected-check is configured.
  • Stuck in Active. There is no route to the neighbour's loopback, or update-source is missing so the connection arrives from the wrong address.
  • The session works but drops when one of two links fails. The static route to the loopback points over one link only.
  • eBGP through a firewall or another Layer 3 hop does not come up. The neighbour is more than one hop away; set ebgp-multihop to the real hop count.
Step 6 When the problem is really fixed Narrow the fault
  • The session is Established over the intended addresses.
  • Each router has a route to the other's peering address over every link that should carry the session.
  • With one of the parallel links shut in a test, the session stays up.
  • The hop limit is no larger than the path requires.
Step 7 Common mistakes Narrow the fault
  • Peering eBGP with loopbacks without ebgp-multihop.
  • TTL security misconfigured.
Evidence references

Evidence · 1 on this Topic

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

packet · 1
Command lookup Jump straight to Cisco syntax
Key points

eBGP packets are sent with TTL 1 and the peer address is expected on a connected subnet. Peering between loopbacks therefore needs three things on both routers: a route to the other loopback, update-source Loopback0, and ebgp-multihop 2 (or disable-connected-check when the routers are in fact directly cabled). iBGP has no such limit.

Key checks

show ip route <peer> → directly connected for a normal eBGP peering. show ip bgp neighbors <ip> | include hop|connected → how many hops the session allows. ping <peer> source <local peering address> → the link itself.

ReferenceWhat it is1 section · depth on demand

What it is

By default an eBGP neighbour is expected to be directly connected: its address must be on a subnet where the router has an interface, and BGP packets are sent with a TTL of 1 so that they cannot travel further than one hop.

ReferenceWhy it matters1 section · depth on demand

Why it matters

The default is sensible — external neighbours normally share a link, and the restriction makes it harder for a distant host to pose as a neighbour. It becomes a stumbling block the first time you peer between loopbacks, typically to keep one session alive across two parallel links: the session just stays down. Two separate checks are involved, and once you know both the fix is straightforward.

ReferenceImportant terms & boundaries4 sections · depth on demand

Key points

  • eBGP applies two checks: the neighbour's address must be on a connected network, and packets are sent with TTL 1.
  • iBGP applies neither; an iBGP neighbour can be anywhere that is reachable.
  • eBGP between loopbacks of two directly cabled routers: neighbor <ip> disable-connected-check, or the widely used neighbor <ip> ebgp-multihop 2.
  • A neighbour several hops away: ebgp-multihop <hops>.
  • Loopback peering also needs a route to the neighbour's loopback and update-source Loopback0, on both routers.
  • ttl-security hops <n> is an alternative protection that cannot be combined with ebgp-multihop.

In depth

Directly connected eBGP neighbours

The Catalyst 9300 BGP guide states that by default, only directly connected neighbours are allowed for eBGP. In practice that means the eBGP peer's address must be on a subnet directly connected to the router, and eBGP packets are sent with TTL 1, so they can't cross another router.

R1(config)# interface GigabitEthernet0/0/0
R1(config-if)# ip address 192.0.2.2 255.255.255.252
R1(config)# router bgp 64500
R1(config-router)# neighbor 192.0.2.1 remote-as 64510
R1# show ip bgp neighbors 192.0.2.1 | include External|TTL|hop
  External BGP neighbor may be up to 1 hop away.
  Connection is ECN Disabled, Mininum incoming TTL 0, Outgoing TTL 1
R1# show ip route 192.0.2.1
Routing entry for 192.0.2.0/30
  Known via "connected", distance 0, metric 0 (connected, via interface)

When the peer isn't directly connected

SituationConfiguration
Peering between loopbacks over several linksneighbor … ebgp-multihop 2, neighbor … update-source Loopback0, static routes to the peer loopback
Peering through a firewall that routesebgp-multihop with the number of hops
Directly connected but peering with loopbacksneighbor … disable-connected-check
R1(config)# ip route 203.0.113.250 255.255.255.255 192.0.2.1
R1(config)# ip route 203.0.113.250 255.255.255.255 192.0.2.5
R1(config)# router bgp 64500
R1(config-router)# neighbor 203.0.113.250 remote-as 64510
R1(config-router)# neighbor 203.0.113.250 ebgp-multihop 2
R1(config-router)# neighbor 203.0.113.250 update-source Loopback0

Why directly connected is the default

BenefitReason
Fast failure detectionThe session drops with the interface
Simple next hopThe peer's address is the next hop, on a connected subnet
Some protectionTTL 1 packets can't reach the router from further away

TTL security

neighbor … ttl-security hops 1 reverses the logic: the router sends with TTL 255 and only accepts packets with TTL 254 or higher. That blocks spoofed BGP packets from remote attackers, and replaces ebgp-multihop on that session.

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

A directly connected eBGP neighbor shares a subnet with the local router. eBGP sends packets with TTL 1 by default and checks that the peer is on a connected network, so peering with loopbacks requires extra configuration.

neighbor 203.0.113.1 remote-as 64500                 ! direct, default
! loopback peering:
neighbor 10.255.0.2 remote-as 64500
neighbor 10.255.0.2 update-source Loopback0
neighbor 10.255.0.2 ebgp-multihop 2                  ! or disable-connected-check

Documented example, not captured output.

ttl-security hops 1 (GTSM) is a security alternative that drops packets not sent from a directly connected peer.

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

Peering on the link addresses ties the session to that link: if the link fails, the session and all its routes go with it, even if a second link exists. Peering between loopbacks removes the dependency. With a static route to the neighbour's loopback over each link, the one session survives the loss of either link, and traffic is shared across both because the BGP next hop resolves over two paths.

The price is that the neighbour's address is no longer on a connected network, so the default checks fail. On directly cabled routers the packet still crosses only one hop, which is why disabling the connected check is enough there. ebgp-multihop raises the TTL and switches off the connected check as well, so it works in both cases — set it no higher than the real hop count.

The source address matters just as much. Without update-source, the router connects from its link address, and the neighbour — which expects the loopback — refuses the connection.

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 4271eBGP on the link addresses, and the loopback variant

Assumptions: Lab addressing; local AS 65000; the peer mirrors the configuration.

! directly connected
router bgp 65000
 neighbor 192.0.2.2 remote-as 65010
!
! between loopbacks (static route or IGP must reach 2.2.2.2)
ip route 2.2.2.2 255.255.255.255 192.0.2.2
router bgp 65000
 neighbor 2.2.2.2 remote-as 65010
 neighbor 2.2.2.2 update-source Loopback0
 neighbor 2.2.2.2 ebgp-multihop 2

Expected output

Cisco IOS / IOS XE RFC 4271show ip route 192.0.2.2

Expected state: The peer address resolves to a connected network.

Routing entry for 192.0.2.0/30
  Known via "connected", distance 0, metric 0 (connected, via interface)
  Routing paths:
    * directly connected, via GigabitEthernet0/1
! Illustrative output, not captured Evidence.
The peer is on the connected /30 of Gi0/1, so the default TTL of 1 is enough. If this lookup returned a static or IGP route instead, the peer is more than one hop away and the session needs `ebgp-multihop`.
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 → Directly Connected Neighbor. 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

Directly Connected Neighbor operational reference

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

BoundaryKnown-good for Directly Connected NeighborSuspicious signatureNext proof
Session/inputCorrect peer, AF and prefix contextTransport, FSM or prefix eligibility disagreesPeer detail and exact prefix
Attribute/policyclassic directly connected eBGP peering, where peer addressing, connected-route ownership, source interface and default one-hop reachability must align before the BGP session can become useful matches intended policythe peer address resolving through the wrong interface, BGP sourcing from an address the far end did not configure, missing L2 adjacency, TCP SYNs to port 179 without a SYN/ACK, an eBGP session requiring multihop because the peer is not actually directly connected, or a correct underlay followed by an ASN/Open failureCompare 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?