Hands-On Lab: Configuring eBGP Between Two Autonomous Systems

This hands-on lab configures a basic eBGP peering session between two routers in different autonomous systems, advertises a network into BGP, and verifies the resulting route appears correctly in the neighboring router's routing table.

eBGP ConfigurationBGP Neighbor EstablishmentNetwork Advertisement

~3 min read · Updated Sep 12, 2026

Lab Objective

Establish an eBGP session between two routers in separate autonomous systems, advertise a local network from each router into BGP, and verify each router learns the other's advertised network.

Lab Purpose

eBGP is the protocol connecting separate organizations, and even a CCNA-level engineer benefits from understanding basic eBGP peering, since many enterprise networks maintain at least one eBGP session toward an ISP. This lab builds the foundational skill of establishing a session and confirming routes are actually exchanged.

Lab Topology

R1 (AS 65010) ---- Serial0/0/0 ---- Serial0/0/0 ---- R2 (AS 65020)

R1: 172.30.1.1/30, Loopback0: 192.168.100.0/24
R2: 172.30.1.2/30, Loopback0: 192.168.200.0/24

Task 1: Configure Basic Interface Addressing

Configure the serial link addresses and a loopback interface on each router representing that router's local network to be advertised.

Task 2: Configure BGP and the eBGP Neighbor

Enable BGP on each router with its assigned AS number, and configure a neighbor relationship pointing to the other router's serial address and remote AS number.

Task 3: Advertise Each Router's Local Network

Use the network command within BGP configuration mode to advertise each router's loopback network.

Task 4: Verify the BGP Neighbor Relationship

Confirm the neighbor state reaches Established.

Task 5: Verify Route Exchange

Confirm each router's IP routing table contains the other router's advertised network, learned via BGP.

Solution and Verification

R1(config)# interface serial0/0/0
R1(config-if)# ip address 172.30.1.1 255.255.255.252
R1(config-if)# no shutdown
R1(config-if)# exit
R1(config)# interface loopback0
R1(config-if)# ip address 192.168.100.1 255.255.255.0
R1(config-if)# exit
R1(config)# router bgp 65010
R1(config-router)# neighbor 172.30.1.2 remote-as 65020
R1(config-router)# network 192.168.100.0 mask 255.255.255.0

R2(config)# interface serial0/0/0
R2(config-if)# ip address 172.30.1.2 255.255.255.252
R2(config-if)# no shutdown
R2(config-if)# exit
R2(config)# interface loopback0
R2(config-if)# ip address 192.168.200.1 255.255.255.0
R2(config-if)# exit
R2(config)# router bgp 65020
R2(config-router)# neighbor 172.30.1.1 remote-as 65010
R2(config-router)# network 192.168.200.0 mask 255.255.255.0

R1# show ip bgp summary

Neighbor        V    AS  MsgRcvd MsgSent   State
172.30.1.2      4  65020       8       9   Established

R1# show ip route bgp

B    192.168.200.0/24 [20/0] via 172.30.1.2

R2# show ip route bgp

B    192.168.100.0/24 [20/0] via 172.30.1.1

Key Takeaway

Unlike an IGP's network command, which simply enables the protocol on matching interfaces, BGP's network command specifically advertises that exact prefix into BGP only if a matching entry already exists in the local routing table — an easy detail to overlook when a network is not actually being advertised as expected.

Written & researched by Dr. Shahin Siami

Related Articles

Hands-On Lab: Configuring VTP Clients and Servers on Catalyst Switches

This hands-on lab configures VLAN Trunking Protocol between a server switch and a client switch, demonstrating how VLANs created on the server automatically propagate to the client without manual configuration on every device.

Continue

Hands-On Lab: Configuring Standard VLANs on Catalyst Switches

This hands-on lab covers creating standard-range VLANs, assigning access ports to them, and verifying that devices in different VLANs are properly isolated from each other at Layer 2.

Continue

Hands-On Lab: Verifying IP Parameters on macOS (GUI)

This hands-on lab covers checking a Mac's current IP configuration using the System Settings network panel, viewing detailed TCP/IP information, and renewing a DHCP lease directly from the graphical interface.

Continue

Hands-On Lab: Verifying IP Parameters on Linux (GUI and CLI)

This hands-on lab covers checking a Linux machine's current IP configuration using both the GUI network settings panel and command-line tools, and demonstrates renewing a DHCP lease using standard Linux networking utilities.

Continue

Hands-On Lab: Verifying IP Parameters on Windows (GUI and CLI)

This hands-on lab covers checking a Windows PC's current IP configuration using both the graphical Network Connections interface and the command-line ipconfig utility, including releasing and renewing a DHCP-assigned address.

Continue

Hands-On Lab: Power over Ethernet (PoE) Basics

This hands-on lab covers verifying PoE capability on a switch port, checking how much power is being drawn by a connected device such as an IP phone or access point, and configuring power priority to protect critical devices during a power budget shortage.

Continue