မာတိကာ သို့ သွားရန်

Phase 1 — BGP Fundamentals & Policies

Labs 01–04 validated on Arista cEOS 4.32.0F.

Every other protocol in this curriculum decides what the shortest path is. BGP decides what you're willing to accept and advertise — a policy protocol wearing a routing protocol's clothes.

That difference explains almost everything about it. BGP is slower to converge and harder to reason about than OSPF, and in exchange it scales to the whole internet and lets you express business relationships in configuration.


Labs

[!IMPORTANT] Sequential Lab Dependency: Lab 01 and Lab 02 share the same 3-router topology (labs/bgp-lab/). Lab 02 builds directly on top of Lab 01's working BGP fabric. Complete Lab 01 first (or run ./run.sh --all inside labs/bgp-lab/) before starting Lab 02.

Lab You build Status
01 Two ASes, eBGP + iBGP, and the next-hop trap ✅ Validated
02 Swap the IGP to IS-IS under a live BGP deployment ✅ Validated
03 Route reflectors — breaking the iBGP full mesh ✅ Validated
04 Multihomed edge — two upstreams, hosts, switch, VRRP, policy ✅ Validated
05 Path selection and policy — local-pref, MED, communities 📋 Planned

The concepts

Short primers on what labs alone don't teach — the state machine, attributes, the best-path algorithm, policy tooling, and route reflection.

Start with the concepts → · Interview questions →


Prerequisites


Why BGP is different

IGP (OSPF, IS-IS) BGP
Optimises for shortest path policy, then path
Scope one organisation between organisations
Metric cost, from bandwidth a stack of attributes you control
Convergence seconds slower, deliberately
Scale thousands of routes ~1,000,000 internet routes
Trust all routers cooperate peers may be adversarial

That last row drives the rest. An IGP assumes every participant is honest and correct. BGP assumes the peer is a different company with different interests — so nothing is accepted implicitly, and everything is filterable.


The one idea to carry in

eBGP and iBGP are the same protocol with different rules, and the differences follow from one fact: eBGP crosses a trust boundary, iBGP doesn't.

eBGP iBGP
Between different ASes same AS
Peers on interface addresses loopbacks
Default TTL 1 (assumes directly connected) normal
AS path prepends on advertise unchanged
Re-advertises to anyone never to another iBGP peer
Next hop set to self unchanged ← Lab 01's trap

The last row causes more first-deployment failures than everything else combined, which is why Lab 01 walks into it deliberately rather than warning you around it.


Where this leads

Next How it uses BGP
Phase 3 · MPLS & L3VPN L3VPN is MP-BGP with VPNv4 routes and extra headers
Phase 4 · EVPN EVPN is a BGP address family; the fabric is iBGP with route reflectors
Phase 2 · Internet Edge multi-homing, RPKI and peering are all BGP policy