Your First eBGP Peering
Bring up an eBGP session between two routers in different autonomous systems.
Download the lab (topology + configs), unzip it, then from that folder run containerlab deploy -t topology.clab.yml.
Your First eBGP Peering
Two routers. Two different companies. Two different autonomous systems. Right now they share a cable but have no idea how to talk BGP to each other. Your job: introduce them.
By the end of this lab you'll have brought up a working eBGP session between r1 (AS 65001) and r2 (AS 65002), the single most fundamental skill in all of BGP.
Topology
The interface addressing is already configured for you. The BGP session is not; that's the part you'll build.
Deploy the lab
Download the lab and unzip it (the download includes the topology and the router configs). From inside the unzipped folder, run:
containerlab deploy -t topology.clab.ymlThat boots both routers. Drop into r1's FRR shell:
docker exec -it clab-bgp-ebgp-peering-r1 vtyshStep 1: Look before you leap
On r1, confirm the link is up and check BGP (there won't be any yet):
You should see eth1 with 10.0.12.1/24, and BGP reporting that it isn't running. Good, that's the starting line.
Step 2: Configure eBGP on r1
Enter configuration mode and start a BGP process in AS 65001, then point it at r2's interface address, telling it r2 lives in AS 65002:
Because the neighbor's AS (65002) is different from our own (65001), this is an eBGP session.
The
no bgp ebgp-requires-policyline turns off FRR's default RFC 8212 enforcement, which otherwise refuses to exchange routes on an eBGP session that has no routing policy (you'd see(Policy)inshow ip bgp summary). It keeps these fundamentals labs simple; you'll learn real policy in the Route Filtering module.
Step 3: Configure eBGP on r2
A BGP session takes two. Open r2 in another terminal:
docker exec -it clab-bgp-ebgp-peering-r2 vtyshMirror the configuration: r2 is in AS 65002 and its neighbor r1 is in AS 65001:
Step 4: Verify
Back on r1, watch the session come up:
Within a few seconds the neighbor 10.0.12.2 should move to Established (in the summary it shows as a state, or an uptime once it's up). You can also inspect the session in detail:
✅ Objective: the eBGP session from r1 to 10.0.12.2 is Established.
Notice that no routes are being exchanged yet: the session is up, but neither router is advertising any prefixes. Putting routes into BGP is the next lab,
bgp-advertising-routes.
Troubleshooting
- Stuck in
ActiveorConnect? The far end isn't configured yet, or the two ends disagree on AS numbers. The remote-as on each side must match the other router's actual AS. Idle? Check the neighbor IP: you must peer with the interface address (10.0.12.2), not the loopback, in this lab.- Can't even ping
10.0.12.2? Re-check the link in the topology and thateth1has its address (show interface brief).
Tear down
containerlab destroy -t topology.clab.ymlWhat you learned
- An eBGP session is one between neighbors in different autonomous systems.
- BGP is configured under
router bgp <ASN>, and a neighbor is defined withneighbor <ip> remote-as <their-ASN>. - A session reaching
Establishedmeans the TCP/179 connection and BGP OPEN negotiation succeeded, but that alone exchanges no routes.
Next: advertise real prefixes across this session in bgp-advertising-routes, then prove you can do it all from scratch in the bgp-ebgp-capstone challenge.
Objectives
0/1 verifiedRun each command against your running lab, confirm what you see, and tick it off. Self-assessed for now; a hosted auto-grader will check these for you later.
The eBGP session from r1 to r2 (10.0.12.2) reaches the Established state.
$ docker exec -it clab-bgp-ebgp-peering-r1 vtysh -c 'show ip bgp summary'