Course contents

Module 2: Configuring BGPLesson 2.3 (3 of 6 in this module)6 of 43 in the BGP course

eBGP multihop and loopback peering

The remote loopback answers ping, but eBGP still refuses to connect. What else does the router check? Let's separate the route, the TCP source and the eBGP neighbour rules.

Advanced · 13 min read

You'll learn to configure a loopback eBGP session, explain the separate connected check and TTL limit, and choose between single-hop disable-connected-check and multihop.

Why change a session that already works?

Our directly connected eBGP session uses R1 Gi0/0 192.0.2.2/30 and ISP A Gi0/0 192.0.2.1/30. R1 is company AS 64500; ISP A is AS 64501. That design is simple and often suitable. A different design may peer using loopback interfaces, which are software interfaces with stable addresses. This can help when several physical paths connect the same two routers.

Direct peering against loopback peering
Direct peering against loopback peeringPeering on the link address stops when that one link fails. Peering on loopbacks survives while any path remains.Link address peeringSession depends on oneinterface and one cableDefault TTL of 1 worksLoopback peeringSession survives whileany path to the loopbackexists; needs multihopvs

On small screens, swipe sideways or focus the diagram and use the arrow keys.

Loopbacks need extra routes and a TTL allowance, which is why they are not the default for eBGP.

In this isolated Cisco IOS XE 17.x-style exercise, we move the provider session to R1 Loopback0 10.255.0.1/32 and ISP A Loopback0 10.255.1.1/32. R1 may already have its loopback from the iBGP lesson. The company prefix remains 198.51.100.0/24 and the provider example remains 203.0.113.0/24. We change the session endpoints, not the destination prefixes.

Why change a session that already works?
Why change a session that already works?Item; R1, AS 64500; ISP A, AS 64501. Physical provider link: Gi0/0: 192.0.2.2/30 Gi0/0: 192.0.2.1/30 New session endpoint: Loopback0: 10.255.0.1/32 Loopback0: 10.255.1.1/32 Route to remote endpoint: 10.255.1.1/32 via 192.0.2.1 10.255.0.1/32 via 192.0.2.2 BGP router ID: 1.1.1.1 2.2.2.2ItemR1, AS 64500ISP A, AS 64501Physical provider linkGi0/0: 192.0.2.2/30Gi0/0: 192.0.2.1/30New session endpointLoopback0: 10.255.0.1/32Loopback0: 10.255.1.1/32Route to remoteendpoint10.255.1.1/32 via 192.0.2.110.255.0.1/32 via 192.0.2.2BGP router ID1.1.1.12.2.2.2

On small screens, swipe sideways or focus the diagram and use the arrow keys.

Read each row across: the left box names the item, the others describe it.

The /32 mask identifies one endpoint address. The router IDs identify the BGP processes and are not the addresses to use in these neighbour statements. All public-looking addresses and AS numbers remain documentation values; the 10.x addresses are private lab addresses.

Gi0/0 .2.1 Gi0/0Physical link: 192.0.2.0/30R1 · AS 64500Loopback0: 10.255.0.1/32ISP A · AS 64501Loopback0: 10.255.1.1/32

Device key: R1 · AS 64500, ISP A · AS 64501 (router)

Lines show the example’s network connections. The coloured path and envelope follow the current step; its text identifies the sender, receiver and traffic type.

Reading the addresses

IP labels identify interfaces or destinations. Subnet labels identify networks; /n is the prefix length. A router ID (RID) identifies a routing process and need not be a reachable interface.

An IP address alone is not a URL. A web URL includes a scheme such as https://; an address on a router or printer does not imply a website.

  • R1 · AS 64500: Loopback0: 10.255.0.1/32
  • ISP A · AS 64501: Loopback0: 10.255.1.1/32
  1. 1. Reach the remote endpoint R1's host route sends packets for ISP A's loopback to 192.0.2.1.
  2. 2. Provide the return path ISP A needs a route back to R1's loopback, not just to its physical interface.
  3. 3. Build eBGP with the new addresses update-source selects the local loopback; the eBGP settings permit these non-connected neighbour addresses.
The physical cable is unchanged. BGP's TCP endpoints move to the loopbacks, and IP routing carries the session between them.

Three checks must succeed independently

Why a loopback eBGP session needs a larger TTL
Why a loopback eBGP session needs a larger TTLR1 in AS 64500 peers with R2 in AS 64501 using loopbacks 10.1.1.1 and 10.2.2.2. The packets cross an intermediate provider router, so the hop count falls by one in transit. A normal eBGP packet starts with TTL 1 and is discarded at the middle router. With ebgp-multihop 2 the packet starts with TTL 2 and arrives with TTL 1.R1Lo0 10.1.1.1Provider routerR2Lo0 10.2.2.2Default: TTL 1 leaves R1reaches the middle router as 0ebgp-multihop 2: TTL 2 leaves R1reaches R2 as 1, acceptedBoth routers also need a route to the other loopback, and update-source Loopback0.

On small screens, swipe sideways or focus the diagram and use the arrow keys.

Directly connected eBGP peers send with TTL 1, which is enough for one hop. A loopback is not on the link, so at least one router sits between the peers and the TTL must be raised to the number of hops.
  1. IP reachability: each router needs a route to the remote loopback and a return route to its own loopback.
  2. Source matching: the TCP source must match the neighbour address configured on the other router. Use update-source for the local loopback.
  3. eBGP connected check and TTL: conventional IOS eBGP expects a neighbour on a directly connected subnet and normally sends with TTL 1. Loopback peer addresses are not on that connected /30, even though the routers share a cable.

TTL (time to live) limits the routers a session IP packet can cross. A forwarding router reduces it, and a packet whose TTL expires is discarded. It is separate from BGP's AS_PATH, which lists autonomous systems in an announcement. Raising a session TTL does not prepend AS numbers or change user-packet TTLs.

Three independent checks
Three independent checksTCP to the loopback, the TTL and the source address must all work.Loopback eBGP works ifRouting both waysEach side has a route tothe other loopbackTTL allowanceebgp-multihop lets thepackets cross extra hopsSource addressupdate-source makes thepackets use the loopback

On small screens, swipe sideways or focus the diagram and use the arrow keys.

Test each one separately before changing the neighbour command.

Reachability, source address, connected-neighbour checking and TTL are separate requirements. A successful ping checks only part of the session setup.

Build endpoint routes before changing BGP

Continue with the working first eBGP lab. Keep the existing physical /30, company LAN, ISP example Loopback10 and exact COMPANY-ONLY and ISPA-ONLY prefix lists. The following commands start in global configuration mode. The explicit host routes provide session reachability independently of BGP.

Prepare the transport first
Prepare the transport firstRoutes to each loopback come before the BGP change.1 Routesto both loopbacks2 Pingfrom loopback to loopback3 BGP changeonly after the ping works

On small screens, swipe sideways or focus the diagram and use the arrow keys.

Prove the loopbacks can ping each other before touching the neighbour command.
interface Loopback0 ip address 10.255.0.1 255.255.255.255 exit ip route 10.255.1.1 255.255.255.255 192.0.2.1

R1: create or retain its loopback and route only the ISP session endpoint through the directly connected provider.

interface Loopback0 ip address 10.255.1.1 255.255.255.255 exit ip route 10.255.0.1 255.255.255.255 192.0.2.2

ISP A: provide its loopback and the return host route to R1. It retains Loopback10 for the separate 203.0.113.0/24 example destination.

On R1, test ping 10.255.1.1 source Loopback0. On ISP A, test ping 10.255.0.1 source Loopback0. If either fails, inspect the host routes, link and any packet filters. Do not expect the future BGP session to learn the routes needed to establish itself.

Move the neighbour to the loopback

ebgp-multihop 2 permits this external loopback neighbour and sets an outgoing TTL of 2. This is sufficient for our adjacent-router example. It is not a general recommendation to use 2 for every topology: a session crossing additional transit routers needs a deliberately chosen adequate value.

Four commands move the session
Four commands move the sessionThe neighbour address, the source, the hop limit and the old session change together.neighbor <loopback>remote-as <AS>update-sourceLoopback0ebgp-multihop2Remove oldneighbor on the link

On small screens, swipe sideways or focus the diagram and use the arrow keys.

Change both routers in a planned window because the session drops while they disagree.

Remove the old physical-address peer on both routers and add the new one. That resets the provider session and temporarily removes its ordinary learned paths. In this isolated lab we expect that interruption. An existing internal R1–R2 peer can remain configured; these commands do not remove it.

router bgp 64500 no neighbor 192.0.2.1 neighbor 10.255.1.1 remote-as 64501 neighbor 10.255.1.1 update-source Loopback0 neighbor 10.255.1.1 ebgp-multihop 2 address-family ipv4 unicast neighbor 10.255.1.1 activate neighbor 10.255.1.1 prefix-list ISPA-ONLY in neighbor 10.255.1.1 prefix-list COMPANY-ONLY out exit-address-family

R1: replace the external peer, retain explicit route filters and source the session from 10.255.0.1. The existing company network statement remains in the address family.

router bgp 64501 no neighbor 192.0.2.2 neighbor 10.255.0.1 remote-as 64500 neighbor 10.255.0.1 update-source Loopback0 neighbor 10.255.0.1 ebgp-multihop 2 address-family ipv4 unicast neighbor 10.255.0.1 activate neighbor 10.255.0.1 prefix-list COMPANY-ONLY in neighbor 10.255.0.1 prefix-list ISPA-ONLY out exit-address-family

ISP A: replace the matching customer peer and retain its original provider network statement. Both new endpoints must agree before the session can establish.

When is disable-connected-check enough?

For adjacent routers on a single shared link, IOS also supports neighbor ... disable-connected-check. It permits the non-connected loopback neighbour without raising TTL from its normal value of 1. Both routers still need loopback routes and matching update-source settings.

Two ways to allow a loopback session
Two ways to allow a loopback sessionebgp-multihop raises the TTL. disable-connected-check keeps the TTL of 1 and allows a loopback on a directly connected link.ebgp-multihopRaises the TTLWorks over several hopsdisable-connected-checkTTL stays 1Only for a loopback onehop awayor

On small screens, swipe sideways or focus the diagram and use the arrow keys.

Choose by whether the loopback is one hop away or farther.

As an alternative exercise, replace the multihop line on each side with its peer-specific disable-connected-check line. Do not add this as a supposed cure for an actual multi-router path: the TTL would still need to reach the remote endpoint.

router bgp 64500 no neighbor 10.255.1.1 ebgp-multihop neighbor 10.255.1.1 disable-connected-check

R1 alternative for this physically adjacent peer only. On ISP A, make the matching replacement for neighbour 10.255.0.1. Use this alternative or the earlier multihop configuration, not a mixture presented as a single requirement.

The trade-off is scope. Multihop allows a broader routed relationship than a directly connected session. Keep the intended TTL small enough for the known path, restrict TCP 179 to authorised endpoints and consider supported TTL-security designs separately. A high TTL is not authentication, and this lesson does not configure TTL security or BGP authentication.

Verify the endpoint before the advertised prefix

Illustrative Cisco IOS XE output written for this lesson, not a router capture
R1#show ip bgp neighbors 10.255.1.1
BGP neighbor is 10.255.1.1, remote AS 64501, external link
  BGP state = Established, up for 00:03:10
  ...
  Local host: 10.255.0.1, Local port: 49152
  Foreign host: 10.255.1.1, Foreign port: 179
This example has R1 initiating the connection. Local host proves the loopback is the source; foreign host proves the loopback is the neighbour. The temporary local port varies, and either router may initiate. The word external means different AS numbers, not a particular cable type.

Then check show ip bgp summary, show ip bgp 203.0.113.0 255.255.255.0 and show ip route 203.0.113.1. The next-hop field of an advertised prefix is a forwarding attribute; read the actual output rather than assuming it must equal the foreign-host TCP address. If R2 still receives provider routes through R1, retain the iBGP next-hop-self setting so R2 uses a reachable internal next hop.

Verify in this order
Verify in this orderCheck the session, then the route.1 Pingloopback to loopback2 SessionEstablished?3 Prefixreceived and best?

On small screens, swipe sideways or focus the diagram and use the arrow keys.

If the endpoint is wrong, no prefix check can pass.

A short troubleshooting lab

  1. Record the established peer address and local host. Confirm the original 192.0.2.1 neighbour is gone and the new 10.255.1.1 neighbour is present.
  2. On R1, remove the host route with no ip route 10.255.1.1 255.255.255.255 192.0.2.1. With no other route to that /32 in this lab, the peer becomes unreachable. Raising multihop TTL cannot repair it.
  3. Restore the host route, verify the source-loopback ping, then confirm the session and provider prefix recover. If only the session fails, compare remote-as, update-source, connected-check or multihop settings and TCP filters on both sides.

Technical references: Cisco's iBGP/eBGP loopback peering examples and Cisco command reference for ebgp-multihop, disable-connected-check and update-source. Example commands and output are documentation-based; no running-router result is claimed.

Check your loopback peering decisions

Predict · scenario 1

The peer is two transit routers away. Does disable-connected-check alone make the default session TTL sufficient?

Predict · scenario 2

R1 can ping the ISP loopback from Gi0/0, but a source-Loopback0 ping fails. What should you inspect?

Predict · scenario 3

The host route to 10.255.1.1 disappears. Which change repairs the missing reachability in this lab?

FAQ

Does a loopback add an extra router hop?
No. A loopback is an address on the destination router, not a separate transit router. On adjacent routers, the session can use TTL 1 with the appropriate connected-check exception. The lab uses ebgp-multihop 2 as another supported loopback-peering method.
Does ebgp-multihop install a route to the peer?
No. It permits a non-directly-connected external neighbour and sets the session packet TTL. Static or dynamic routing must independently provide paths to both session endpoints. A high TTL cannot repair a missing route.
Does loopback peering protect a single physical link?
Not by itself. Its benefit is that the session endpoint is independent of one physical address. If routing can use another working link, the session may survive that path change. This one-link lab loses connectivity when its only cable fails.