NetworkNinjas
Learning path · in-progress

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.

32 live units14 labs · 18 lessons~649 minfrrouting/frr
Your progress0 / 32 units

0% complete · saved in this browser

01

BGP Foundations

6 / 6 ready
  1. 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.

  2. 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.

  3. 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.

  4. 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.

  5. Set Up Your Lab Environment

    Install Docker and Containerlab so you can run the hands-on labs on your own machine.

  6. 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.

02

eBGP Fundamentals

5 / 5 ready
  1. 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.

  2. 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.

  3. Your First eBGP Peering

    Bring up an eBGP session between two routers in different autonomous systems.

  4. Advertising Routes Over eBGP

    Originate each router's loopback into BGP with a network statement and watch the prefix cross the eBGP session.

  5. 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.

03

iBGP Fundamentals

6 / 6 ready
  1. 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.

  2. 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.

  3. 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.

  4. iBGP Over Loopbacks

    Bring up an iBGP session between two routers in one AS, peering on loopbacks over an OSPF underlay.

  5. Fixing the iBGP Next-Hop

    Diagnose an external prefix that arrives over iBGP but stays INVALID, then fix it with next-hop-self.

  6. 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.

04

Path Attributes & Best-Path Selection

9 / 9 ready
  1. 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.

  2. 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.

  3. 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.

  4. 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.

  5. 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.

  6. Steer Outbound Traffic with LOCAL_PREF

    Raise LOCAL_PREF on routes from a preferred upstream to steer your AS's outbound traffic onto it.

  7. 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.

  8. 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.

  9. 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.

05

Route Filtering & Policy

6 / 6 ready
  1. 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.

  2. 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.

  3. 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.

  4. Filter Inbound Routes with a Prefix List

    Accept only a customer's real allocations by applying an inbound prefix-list on an eBGP session.

  5. 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.

  6. 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.

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.