Chapter 1: BGP Transit AS
Table of Contents
Objective
This lab focuses on configuring BGP to establish transit AS connectivity between different autonomous systems. The goal is to ensure connectivity between AS 1 and AS 3 through AS 2 while implementing both eBGP and iBGP sessions.
Key Features Implemented
- IP Address Configuration
- eBGP Peering Between ASes
- IGP Configuration Within AS 2
- iBGP Peering Within AS 2
- Injecting Routes into BGP
- Verification of End-to-End Connectivity
Topology
The lab uses a multi-AS BGP topology as depicted in the diagram below. AS 2 acts as a transit AS for AS 1 and AS 3.
Configuration Tasks
- Assign IP Addresses:
- Configure the IP addresses on all routers as shown in the topology.
- Configure eBGP Between AS 1 and AS 2:
- Establish eBGP neighbor relationship between R5 (AS 1) and R1 (AS 2).
- Configure eBGP Between AS 2 and AS 3:
- Establish eBGP neighbor relationship between R4 (AS 2) and R6 (AS 3).
- Configure IGP Within AS 2:
- Implement OSPF (Area 0) within AS 2 (R1, R2, R3, R4). OSPF process IDs are 1 for R1, 2 for R2, 3 for R3, and 4 for R4.
- Configure iBGP Within AS 2:
- Establish a full mesh of iBGP peerings between all routers in AS 2 (R1, R2, R3, R4) using their Loopback0 addresses (
1.1.1.1
,2.2.2.2
,3.3.3.3
,4.4.4.4
).
- Establish a full mesh of iBGP peerings between all routers in AS 2 (R1, R2, R3, R4) using their Loopback0 addresses (
- Advertise Networks into BGP:
- On R5 (AS 1), inject the
195.1.1.0/24
network (Loopback1) into BGP. - On R6 (AS 3), inject the
196.1.1.0/24
network (Loopback1) into BGP.
- On R5 (AS 1), inject the
- Ensure Connectivity Between AS 1 and AS 3:
- Verify that AS 1 (R5) and AS 3 (R6) can reach each other's advertised Loopback1 networks (
ping 196.1.1.1
from R5,ping 195.1.1.1
from R6).
- Verify that AS 1 (R5) and AS 3 (R6) can reach each other's advertised Loopback1 networks (
Base Configurations
Ready to get started? Here, you'll find the initial configurations for each device to begin this lab.
hostname R1
interface Loopback0
ip address 1.1.1.1 255.255.255.255
interface Ethernet0/0
ip address 12.1.1.1 255.255.255.252
no shutdown
interface Ethernet0/1
ip address 13.1.1.1 255.255.255.252
no shutdown
interface Ethernet0/2
ip address 15.1.1.1 255.255.255.252
no shutdown
hostname R2
interface Loopback0
ip address 2.2.2.2 255.255.255.255
interface Ethernet0/0
ip address 12.1.1.2 255.255.255.252
no shutdown
interface Ethernet0/1
ip address 24.1.1.1 255.255.255.252
no shutdown
hostname R3
interface Loopback0
ip address 3.3.3.3 255.255.255.255
interface Ethernet0/0
ip address 13.1.1.2 255.255.255.252
no shutdown
interface Ethernet0/1
ip address 34.1.1.1 255.255.255.252
no shutdown
hostname R4
interface Loopback0
ip address 4.4.4.4 255.255.255.255
interface Ethernet0/0
ip address 24.1.1.2 255.255.255.252
no shutdown
interface Ethernet0/1
ip address 34.1.1.2 255.255.255.252
no shutdown
interface Ethernet0/2
ip address 46.1.1.1 255.255.255.252
no shutdown
hostname R5
interface Loopback1
ip address 195.1.1.1 255.255.255.0
interface Ethernet0/0
ip address 15.1.1.2 255.255.255.252
no shutdown
hostname R6
interface Loopback1
ip address 196.1.1.1 255.255.255.0
interface Ethernet0/0
ip address 46.1.1.2 255.255.255.252
no shutdown
Verification Commands
show ip bgp summary
- Check BGP Peering Status.
show ip bgp
- Verify Route Advertisements.
show ip route bgp
- Check BGP routes in the routing tables.
ping 196.1.1.1 source loopback1
(From R5 to R6's Loopback1)ping 195.1.1.1 source loopback1
(From R6 to R5's Loopback1)- Reachability checks across ASes.
Expected Outcomes
- Successful BGP neighbor relationships (eBGP and iBGP).
- Routes are learned across ASes (AS 1 learns AS 3 routes, AS 3 learns AS 1 routes, AS 2 learns both).
- Connectivity between AS 1 (network
195.1.1.0/24
) and AS 3 (network196.1.1.0/24
). - Full reachability within AS 2 through the IGP (OSPF).
Final Configurations
Want to take a look for yourself? Here, you will find the final configurations of each device required for this lab.
hostname R1
interface Loopback0
ip address 1.1.1.1 255.255.255.255
ip ospf 1 area 0
interface Ethernet0/0
ip address 12.1.1.1 255.255.255.252
ip ospf 1 area 0
no shutdown
interface Ethernet0/1
ip address 13.1.1.1 255.255.255.252
ip ospf 1 area 0
no shutdown
interface Ethernet0/2
ip address 15.1.1.1 255.255.255.252
no shutdown
router ospf 1
router bgp 2
neighbor 2.2.2.2 remote-as 2
neighbor 2.2.2.2 update-source Loopback0
neighbor 2.2.2.2 next-hop-self
neighbor 3.3.3.3 remote-as 2
neighbor 3.3.3.3 update-source Loopback0
neighbor 3.3.3.3 next-hop-self
neighbor 4.4.4.4 remote-as 2
neighbor 4.4.4.4 update-source Loopback0
neighbor 4.4.4.4 next-hop-self
neighbor 15.1.1.2 remote-as 1
hostname R2
interface Loopback0
ip address 2.2.2.2 255.255.255.255
ip ospf 2 area 0
interface Ethernet0/0
ip address 12.1.1.2 255.255.255.252
ip ospf 2 area 0
no shutdown
interface Ethernet0/1
ip address 24.1.1.1 255.255.255.252
ip ospf 2 area 0
no shutdown
router ospf 2
router bgp 2
neighbor 1.1.1.1 remote-as 2
neighbor 1.1.1.1 update-source Loopback0
neighbor 1.1.1.1 next-hop-self
neighbor 3.3.3.3 remote-as 2
neighbor 3.3.3.3 update-source Loopback0
neighbor 3.3.3.3 next-hop-self
neighbor 4.4.4.4 remote-as 2
neighbor 4.4.4.4 update-source Loopback0
neighbor 4.4.4.4 next-hop-self
hostname R3
interface Loopback0
ip address 3.3.3.3 255.255.255.255
ip ospf 3 area 0
interface Ethernet0/0
ip address 13.1.1.2 255.255.255.252
ip ospf 3 area 0
no shutdown
interface Ethernet0/1
ip address 34.1.1.1 255.255.255.252
ip ospf 3 area 0
no shutdown
router ospf 3
router bgp 2
neighbor 1.1.1.1 remote-as 2
neighbor 1.1.1.1 update-source Loopback0
neighbor 1.1.1.1 next-hop-self
neighbor 2.2.2.2 remote-as 2
neighbor 2.2.2.2 update-source Loopback0
neighbor 2.2.2.2 next-hop-self
neighbor 4.4.4.4 remote-as 2
neighbor 4.4.4.4 update-source Loopback0
neighbor 4.4.4.4 next-hop-self
hostname R4
interface Loopback0
ip address 4.4.4.4 255.255.255.255
ip ospf 4 area 0
interface Ethernet0/0
ip address 24.1.1.2 255.255.255.252
ip ospf 4 area 0
no shutdown
interface Ethernet0/1
ip address 34.1.1.2 255.255.255.252
ip ospf 4 area 0
no shutdown
interface Ethernet0/2
ip address 46.1.1.1 255.255.255.252
no shutdown
router ospf 4
router bgp 2
neighbor 1.1.1.1 remote-as 2
neighbor 1.1.1.1 update-source Loopback0
neighbor 1.1.1.1 next-hop-self
neighbor 2.2.2.2 remote-as 2
neighbor 2.2.2.2 update-source Loopback0
neighbor 2.2.2.2 next-hop-self
neighbor 3.3.3.3 remote-as 2
neighbor 3.3.3.3 update-source Loopback0
neighbor 3.3.3.3 next-hop-self
neighbor 46.1.1.2 remote-as 3
hostname R5
interface Loopback1
ip address 195.1.1.1 255.255.255.0
interface Ethernet0/0
ip address 15.1.1.2 255.255.255.252
no shutdown
router bgp 1
network 195.1.1.0
neighbor 15.1.1.1 remote-as 2
hostname R6
interface Loopback1
ip address 196.1.1.1 255.255.255.0
interface Ethernet0/0
ip address 46.1.1.2 255.255.255.252
no shutdown
router bgp 3
network 196.1.1.0
neighbor 46.1.1.1 remote-as 2