In 2021, a company vanished from the internet for six hours. Its servers were fine, it just told the world it no longer existed, and the world believed it.
That’s BGP, short for Border Gateway Protocol (PATH-VECTOR protocol defined by RFC 4271) that runs over TCP port 170, between the ~75,000 networks that make up the internet.
There’s no map. Each network announces what it can reach; the announcement propagates AS-by-AS, stamping an AS_PATH that prevents loops. And it doesn’t pick the shortest path, it picks the one policy prefers. A network will route over a longer path if a cheaper business deal says to. Routing the internet is a money-and-trust problem in a networking costume.
Moreover, BGP is the inter-AS protocol. It runs BETWEEN autonomous systems. eBGP runs between routers in different ASes; iBGP carries those routes inside an AS. (OSPF/IS-IS are the IGPs that run within an AS, different job.)
Below 👇 is a simulation of it failing and rerouting, with the BGP decision code running beside it, in sync. The C file shown in the video is a faithful model of the best-path DECISION process, not a full daemon (no TCP/179 session state machine, UPDATE wire-format parsing, or RIB/FIB).
#Networking #BGP #Routing #InternetInfrastructure #NetworkEngineering