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 دقیقه مطالعه · آخرین به‌روزرسانی ۲۱ شهریور ۱۴۰۵

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.

نوشته و پژوهش‌شده توسط دکتر شاهین صیامی

مقالات مرتبط

Hands-On Lab: Final Comprehensive CCNP Troubleshooting Challenge (BGP, DMVPN, and QoS Integration)

This hands-on lab presents a complex multi-layer failure across an integrated BGP-over-DMVPN topology combined with QoS marking, requiring systematic diagnosis of a route reflector misconfiguration, an NHRP registration failure, and an incorrectly applied QoS policy simultaneously affecting the same network.

ادامه

Hands-On Lab: Configuring BGP over DMVPN

This hands-on lab runs iBGP as the routing protocol across the same DMVPN hub-and-spoke topology used in the two previous labs, configuring the hub as a route reflector so spokes learn each other's routes without a full iBGP mesh, combining two previously separate concepts into one integrated design.

ادامه

Hands-On Lab: Configuring OSPF over DMVPN

This hands-on lab runs OSPF as the dynamic routing protocol across the same DMVPN hub-and-spoke topology, configuring the tunnel interface as an OSPF point-to-multipoint network type to correctly handle the hub-and-spoke adjacency pattern without requiring the broadcast network type's DR/BDR election.

ادامه

Hands-On Lab: Configuring EIGRP over DMVPN

This hands-on lab runs EIGRP as the dynamic routing protocol across the DMVPN hub-and-spoke topology built in earlier labs, verifying neighbor relationships form correctly across the multipoint tunnel and routes propagate without requiring per-spoke static configuration on the hub.

ادامه

Hands-On Lab: Configuring HSRP MD5 Authentication

This hands-on lab configures MD5 authentication on an HSRP group, verifying two routers with matching authentication strings form a normal active/standby relationship while a router with a mismatched string is excluded from the group entirely.

ادامه

Hands-On Lab: Configuring Cisco Umbrella-Style DNS Security via DNS Forwarding Redirection

This hands-on lab configures a router to redirect all client DNS queries toward a security-focused DNS resolver using DNS forwarding interception, approximating cloud-delivered DNS security enforcement without requiring per-client configuration changes.

ادامه