BGP Fundamentals
From "what is BGP and why does it exist" to confidently configuring eBGP/iBGP, controlling path selection, and applying basic routing policy - hands-on with FRR.
0% complete · saved in this browser
BGP Foundations
6 / 6 ready- Why BGP Exists
How the internet stitches independently run networks together, and why that job needs a protocol built for policy and scale rather than shortest path.
lessonbeginner12 min - Autonomous Systems & ASNs
What an autonomous system is, how AS numbers are allocated, and the difference between public and private 16- and 32-bit ASNs.
lessonbeginner12 min - Path-Vector Routing: How BGP Sees the Internet
Why BGP is a path-vector protocol - carrying the whole AS_PATH for loop prevention, policy, and internet-scale routing.
lessonbeginner14 min - BGP Sessions & Messages: TCP/179, the Four Messages, and the State Machine
How two BGP routers form a session over TCP/179, the four message types they exchange, and the finite state machine that takes them to Established.
lessonbeginner15 min - Set Up Your Lab Environment
Install Docker and Containerlab so you can run the hands-on labs on your own machine.
lessonbeginner10 min - Reading a Live BGP Session
Explore a pre-built, already-Established eBGP session: read its state, FSM, timers, capabilities, and the BGP table - no configuration required.
lab · guidedbeginner20 min
eBGP Fundamentals
5 / 5 ready- eBGP vs iBGP: One Protocol, Two Rule Sets
The same BGP behaves differently depending on whether its two peers sit in different autonomous systems or the same one, and that single fact drives AS_PATH handling, next-hop, loop prevention, and where you peer.
lessonbeginner12 min - Getting Prefixes Into BGP: network vs redistribute
BGP advertises nothing on its own; learn the two ways to originate your prefixes into the BGP table and when to reach for each.
lessonbeginner12 min - Your First eBGP Peering
Bring up an eBGP session between two routers in different autonomous systems.
lab · guidedbeginner25 min - Advertising Routes Over eBGP
Originate each router's loopback into BGP with a network statement and watch the prefix cross the eBGP session.
lab · guidedbeginner25 min - Capstone: Three Autonomous Systems
Build eBGP across three ASes from a blank slate so every AS reaches every other through a transit AS in the middle.
lab · challengeintermediate35 min
iBGP Fundamentals
6 / 6 ready- Why iBGP Exists
An AS has many routers, but only the edges learn external routes over eBGP. iBGP carries those prefixes across the whole AS, with a split-horizon rule standing in for AS_PATH loop prevention.
lessonbeginner13 min - The iBGP Full Mesh (and Why It Doesn't Scale)
Why every iBGP speaker must peer with every other one, the n(n-1)/2 session explosion that follows, and a first glimpse of how route reflectors and confederations escape it.
lessonbeginner12 min - Peering on Loopbacks (and Why You Need an IGP)
Why iBGP sessions ride on loopback addresses instead of physical interfaces, how to source them correctly, and why an IGP underlay is the thing that makes loopback peering possible.
lessonbeginner13 min - iBGP Over Loopbacks
Bring up an iBGP session between two routers in one AS, peering on loopbacks over an OSPF underlay.
lab · guidedbeginner25 min - Fixing the iBGP Next-Hop
Diagnose an external prefix that arrives over iBGP but stays INVALID, then fix it with next-hop-self.
lab · guidedintermediate30 min - Capstone: Build a Transit AS
Build a complete transit AS from a blank slate: an OSPF underlay, a full iBGP mesh on loopbacks, next-hop-self on the edges, and two eBGP edges, so an external prefix crosses the AS end to end.
lab · challengeintermediate45 min
Path Attributes & Best-Path Selection
9 / 9 ready- BGP Path Attributes: the Four Categories
How BGP attaches metadata to every prefix in an UPDATE, and the four attribute categories that decide whether a value crosses an AS boundary or stays home.
lessonintermediate13 min - AS_PATH and NEXT_HOP in Best-Path
How AS_PATH drives loop prevention and path length, and why a reachable NEXT_HOP is a precondition for any route to become best.
lessonintermediate12 min - LOCAL_PREF and MED: Steering Traffic
Use LOCAL_PREF to steer your AS's outbound traffic and MED to hint a neighbor AS about your preferred inbound entry point.
lessonintermediate14 min - Weight and Origin: the Local Lever and the Tie-Breaker
Weight is a Cisco/FRR local-only knob that wins first on one router; ORIGIN is a well-known mandatory attribute that breaks ties near the bottom.
lessonintermediate11 min - The BGP Best-Path Algorithm, Top to Bottom
Walk BGP's ordered tie-breakers from WEIGHT down to lowest neighbor IP to see exactly how a router picks one best path per prefix.
lessonintermediate15 min - Steer Outbound Traffic with LOCAL_PREF
Raise LOCAL_PREF on routes from a preferred upstream to steer your AS's outbound traffic onto it.
lab · guidedintermediate25 min - Steer Inbound Traffic with AS_PATH Prepending
Make one of two upstreams the preferred inbound path by prepending your own ASN on the advertisement you send the other.
lab · guidedintermediate28 min - MED and the Tie-Breaker Ladder
Use MED across two parallel links to tell a neighbor AS which entry path to prefer, then walk the lower tie-breakers.
lab · guidedintermediate25 min - Capstone: Engineer a Dual-Homed Edge
From a blank-slate edge router, engineer both outbound (LOCAL_PREF) and inbound (AS_PATH prepend) traffic so a dual-homed AS prefers one upstream over the other.
lab · challengeadvanced40 min
Route Filtering & Policy
6 / 6 ready- Prefix Lists: Filtering by Network
Write the policy that decides which prefixes BGP accepts and announces, using ip prefix-list with le/ge range matching.
lessonintermediate13 min - Route Maps: the Policy Swiss Army Knife
Learn how route-map clauses match, set, and permit or deny BGP routes, and why the trailing permit clause is the difference between policy and a silent blackhole.
lessonintermediate14 min - BGP Communities: Tags That Travel
Use BGP communities to color routes with policy intent and act on that color elsewhere in your AS or at your upstream.
lessonintermediate14 min - Filter Inbound Routes with a Prefix List
Accept only a customer's real allocations by applying an inbound prefix-list on an eBGP session.
lab · guidedintermediate25 min - Tag Routes with Communities and no-export
Tag advertised prefixes with BGP communities and watch a downstream AS act on the tags, including no-export blocking propagation.
lab · guidedintermediate30 min - Capstone: Build an ISP Edge Policy
From a blank slate, build the inbound policy for a small ISP: filter a customer's bogon leak, tag accepted routes with a community, and raise their LOCAL_PREF so they win.
lab · challengeadvanced40 min
Path FAQ
What do I need to run the BGP labs?
Docker and Containerlab. Each lab downloads as a Containerlab topology plus the FRR router configs, and deploys with a single containerlab command. The first lab links a one-time environment-setup guide.
Do the labs use real BGP?
Yes. Every lab boots genuine FRRouting routers (frrouting/frr) running production BGP, and you drive them with the same vtysh CLI used in the field, not a simulator.
Does this cover both eBGP and iBGP?
Both, in dedicated modules. The path moves from eBGP fundamentals to iBGP (full mesh, loopback peering over an IGP, next-hop-self), then path attributes and best-path selection, and finally route filtering and policy.
How long is the BGP Fundamentals path?
5 modules covering 32 hands-on lessons and labs, roughly 649 minutes of content. It is self-paced, so you can work through a module at a time.
Will this help with CCNP or other certs?
It is hands-on BGP practice that complements cert study such as CCNP or JNCIA. It is not a certification course, but the real configuration and troubleshooting skills transfer directly to the exams and to the job.