eBGP Across Autonomous Systems

July 29, 2025 - Reading time: 3 minutes

Previously, we set up a simple two-router lab using both iBGP and eBGP, and we also demonstrated how to verify them. Now, we'll explore how eBGP and iBGP work together to exchange routes between different Autonomous Systems (ASes), highlighting their combined role in interconnecting more complex networks.

Topology Overview

This three-router topology connects three ASes:

       (AS 5110)       (AS 2640)        (AS 2640)
      Router0  -------- Router1 -------- Router2
   (192.168.158.49)  (192.168.158.51)  (192.168.74.14)
  • Router0 (AS 5110) connects to Router1 (AS 2640) using eBGP.
  • Router1 (AS 2640) connects to Router2 (AS 2640) using iBGP.
  • Only two static routes are used for initial reachability.


Device Setup

Router0 - Configure Interfaces

Router0# configure terminal
Router0(config)# interface fastethernet 0/0
Router0(config-if)# ip address 192.168.158.49 255.255.255.0
Router0(config-if)# no shutdown
Router0(config-if)# exit

Router0(config)# interface loopback 1
Router0(config-if)# ip address 1.1.1.1 255.255.255.255
Router0(config-if)# exit

Router0(config)# interface loopback 50
Router0(config-if)# ip address 50.50.50.1 255.255.255.0
Router0(config-if)# exit

Router0(config)# interface loopback 80
Router0(config-if)# ip address 80.80.80.1 255.255.0.0
Router0(config-if)# exit

Router0 - Configure eBGP

Router0(config)# router bgp 5110
Router0(config-router)# neighbor 192.168.158.51 remote-as 2640
Router0(config-router)# network 50.50.50.0 mask 255.255.255.0
Router0(config-router)# network 80.80.0.0 mask 255.255.0.0
Router0(config-router)# exit

Configured Router0 to run BGP in AS 5110, establish an external BGP peering with neighbor 192.168.158.51 (AS 2640), and advertise two networks—50.50.50.0/24 and 80.80.0.0/16—into the BGP domain.

Router0 - Static Route for Initial Connectivity

Router0(config)# ip route 192.168.74.0 255.255.255.0 192.168.158.5
Router0(config)# end

Router1 - Configure Interfaces

Router1# configure terminal
Router1(config)# interface fastethernet 0/0
Router1(config-if)# ip address 192.168.74.43 255.255.255.0
Router1(config-if)# no shutdown
Router1(config-if)# exit

Router1(config)# interface fastethernet 0/1
Router1(config-if)# ip address 192.168.158.51 255.255.255.0
Router1(config-if)# no shutdown
Router1(config-if)# exit

Router1(config)# interface loopback 1
Router1(config-if)# ip address 2.2.2.2 255.255.255.255
Router1(config-if)# exit

Router1 - Configure BGP (eBGP to Router0, iBGP to Router2)

Router1(config)# router bgp 2640
Router1(config-router)# neighbor 192.168.158.49 remote-as 5110
Router1(config-router)# neighbor 192.168.74.14 remote-as 2640
Router1(config-router)# exit

Router1 is running BGP in AS 2640. It peers externally with Router0 in AS 5110 at 192.168.158.49, and internally with another router in the same AS (192.168.74.14).


Router2 - Configure Interfaces

Router2# configure terminal
Router2(config)# interface fastethernet 0/0
Router2(config-if)# ip address 192.168.74.14 255.255.255.0
Router2(config-if)# no shutdown
Router2(config-if)# exit

Router2(config)# interface loopback 1
Router2(config-if)# ip address 3.3.3.3 255.255.255.255
Router2(config-if)# exit

Router2 - Configure iBGP

Router2(config)# router bgp 2640
Router2(config-router)# neighbor 192.168.74.43 remote-as 2640
Router2(config-router)# exit

Router2 is running BGP in AS 2640 and is set up for an iBGP peering with the neighbor at 192.168.74.43.

Router2 - Static Route for Initial Connectivity

Router2(config)# ip route 192.168.158.0 255.255.255.0 192.168.74.4
Router2(config)# end

Assumptions & Troubleshooting

Note:
This configuration assumes that synchronization and auto-summary are disabled.
If the BGP session is established but routes are not behaving as expected, add the following commands under the BGP configuration on each router:

Router(config-router)# no synchronization
Router(config-router)# no auto-summary
  • no synchronization – Allows BGP to advertise routes without requiring them to be in the IGP.
  • no auto-summary – Prevents automatic summarization of classful networks, ensuring subnet-specific advertisements are not lost.

BGP Verification

After configuration, verify BGP peering, advertised routes, and routing table entries.

Step 1: Verify BGP Peering

show ip bgp summary

Expected output should show neighbors as Established.

Step 2: Verify Advertised Routes

show ip bgp neighbors 192.168.158.51 advertised-routes

Check if Router0 is advertising 50.50.50.0/24 and 80.80.0.0/16.

Step 3: Verify Received Routes

show ip bgp

Router1 should learn 50.50.50.0/24 and 80.80.0.0/16 via Router0.

Step 4: Verify Routing Table

show ip route

Ensure BGP routes are installed.


Challenge

Try advertising Loopback1 from Router2 and ensure it is received by Router0 via eBGP.

Verify your configuration using:

show ip bgp
show ip route

eBGP Across Autonomous Systems | PocketCLI

Download


>