Hands-On Lab: Configuring BGP Multihop and eBGP Authentication

This hands-on lab configures an eBGP session between two loopback addresses requiring multiple router hops, using ebgp-multihop to establish it, then adds MD5 authentication to secure the resulting session.

eBGP Multihop ConfigurationLoopback-Based PeeringBGP MD5 Authentication

~3 min read · Updated Sep 26, 2026

Lab Objective

Configure an eBGP session between two routers' loopback addresses rather than their directly connected interfaces, enabling ebgp-multihop to allow the session across more than one router hop, then add MD5 authentication and verify a mismatched password prevents the session from establishing.

Lab Purpose

Every eBGP session covered earlier in this series used directly connected interface addresses, which by default limits eBGP to a TTL of 1 — appropriate for a direct link but insufficient when peering needs to occur between loopback addresses reachable only via an intermediate hop. Authentication, meanwhile, protects any BGP session — eBGP or iBGP — from a spoofed peer attempting to inject false routing information.

Lab Topology

R1 (AS 65110) ---- intermediate hop ---- R2 (AS 65120)

R1 Loopback0: 1.1.1.1/32
R2 Loopback0: 2.2.2.2/32
(reachable via static routes or an IGP,
already configured, requiring 2 hops)

Task 1: Attempt Standard eBGP Peering Between Loopbacks

Configure a neighbor statement using the loopback addresses without ebgp-multihop, and observe the session fail to establish.

Task 2: Enable eBGP Multihop

Configure ebgp-multihop on both routers with a TTL value sufficient for the actual hop count.

Task 3: Configure the Update-Source

Configure each router to source its BGP packets from its own loopback interface, required for loopback-based peering to work correctly.

Task 4: Verify the Session Establishes

Confirm the eBGP neighbor relationship reaches Established state.

Task 5: Add MD5 Authentication and Verify a Mismatch Fails

Configure matching MD5 passwords on both routers, confirm the session remains stable, then deliberately mismatch one side's password and observe the session fail.

Solution and Verification

R1(config)# router bgp 65110
R1(config-router)# neighbor 2.2.2.2 remote-as 65120

R1# show ip bgp summary

Neighbor    V   AS   MsgRcvd  MsgSent  State/PfxRcd
2.2.2.2     4   65120   0       0        Idle
-- Stuck in Idle -- standard eBGP defaults
-- to a TTL of 1, which is insufficient to
-- reach a loopback two hops away

R1(config)# router bgp 65110
R1(config-router)# neighbor 2.2.2.2 ebgp-multihop 3
R1(config-router)# neighbor 2.2.2.2 update-source loopback0

R2(config)# router bgp 65120
R2(config-router)# neighbor 1.1.1.1 ebgp-multihop 3
R2(config-router)# neighbor 1.1.1.1 update-source loopback0

R1# show ip bgp summary

Neighbor    V   AS   MsgRcvd  MsgSent  State/PfxRcd
2.2.2.2     4   65120   8       7        0
-- Established (numeric PfxRcd), confirming
-- the multihop session now works correctly

R1(config)# router bgp 65110
R1(config-router)# neighbor 2.2.2.2 password BgpSecure2026

R2(config)# router bgp 65120
R2(config-router)# neighbor 1.1.1.1 password BgpSecure2026

R1# show ip bgp summary

Neighbor    V   AS   MsgRcvd  MsgSent  State/PfxRcd
2.2.2.2     4   65120   9       8        0
-- Still Established, matching passwords
-- caused no disruption

R2(config)# router bgp 65120
R2(config-router)# neighbor 1.1.1.1 password WrongPassword999

R1# show ip bgp summary

Neighbor    V   AS   MsgRcvd  MsgSent  State/PfxRcd
2.2.2.2     4   65120   0       0        Idle
-- The session drops entirely once passwords
-- mismatch -- TCP itself refuses the
-- connection since the MD5 signature on
-- incoming segments no longer validates

Key Takeaway

eBGP's default TTL of 1 is a deliberate security-adjacent default assuming direct connectivity, and ebgp-multihop combined with update-source is the standard pairing required whenever that assumption does not hold, such as loopback-based peering — MD5 authentication operates at the TCP layer underneath BGP itself, which is why a password mismatch prevents the underlying TCP session from forming at all rather than merely being rejected after BGP's own message exchange begins.

Written & researched by Dr. Shahin Siami

Related Articles

Hands-On Lab: Configuring EIGRP Stub Routing

This hands-on lab configures a branch router as an EIGRP stub, verifying it advertises only its own connected and summary routes while the hub router correctly avoids querying the stub during a topology change elsewhere in the network.

Continue

Hands-On Lab: Configuring EIGRP Named Mode

This hands-on lab reconfigures a classic EIGRP setup into EIGRP named mode, organizing address-family and interface-specific configuration into a more structured hierarchy, and verifies functional equivalence with the classic configuration style used throughout earlier EIGRP labs in this series.

Continue

Hands-On Lab: Configuring ERSPAN Across a Routed Network

This hands-on lab configures Encapsulated RSPAN (ERSPAN) to mirror traffic across a Layer 3-routed network rather than a single Layer 2 trunk, extending the RSPAN concept from the previous lab beyond the boundaries of a single VLAN or switched domain.

Continue

Hands-On Lab: Configuring RSPAN Across Switches

This hands-on lab configures Remote SPAN (RSPAN) using a dedicated RSPAN VLAN carried across a trunk, allowing traffic mirrored on one switch to be monitored by a capture device connected to an entirely different switch, extending the local SPAN concept covered in an earlier lab across the network.

Continue

Hands-On Lab: Configuring In-Service Software Upgrade (ISSU) on a Stack

This hands-on lab performs an In-Service Software Upgrade across a StackWise stack, upgrading each member's IOS image one at a time while the stack continues forwarding traffic throughout, verifying zero downtime compared to the disruptive reload approach used in earlier IOS upgrade labs.

Continue

Hands-On Lab: Configuring Cisco Catalyst StackWise Traditional Stacking

This hands-on lab configures traditional Catalyst stacking (StackWise) across three switches using stack cables, contrasting its single-tier, chassis-proximity requirement against the StackWise Virtual pair covered in the previous lab, which allows switches to be located much farther apart.

Continue