BGP

Border Gateway ProtocolApplication layer · OSI 7

How autonomous networks advertise and choose internet routes

Step 1 of 8: Connect three numbered networks. Over 75,000 networks form the internet, each identified by an AS number: your ISP (AS 64500), a transit carrier (AS 64510), and www.example.com's host (AS 64511).
0.0 s / 20.8 s
Your laptop192.168.1.10Home router192.168.1.1ISP AS 64500198.51.100.1Transit AS 64510198.51.100.129Host AS 64511203.0.113.1www.example.com203.0.113.10
HandshakeControlResponseLookupLost or refused

Overview

The internet links tens of thousands of independent networks called Autonomous Systems (). lets border routers share which IP address blocks each network can reach so packets find a path anywhere.

Border Gateway Protocol 4 (RFC 4271) runs over TCP port 179 while controlling Layer 3 forwarding tables. Border routers exchange OPEN, KEEPALIVE, and UPDATE messages carrying IP prefixes and AS_PATH attributes.

Key facts

Layer
TCP 179; controls Layer 3 routing
Peers
Configured neighbors across ASNs
Global table
Over 950,000 IPv4 routes
Path choice
Local policy, then shortest AS path
Defined in
RFC 4271, RFC 6811

Decentralized map built from peers

Origin AS 64511 advertised its block, transit AS 64510 prepended its number and passed it on, and AS 64500 routed packets there without any central authority.

Demonstrated BGP-4 port 179 peering, UPDATE propagation (`AS_PATH`), packet forwarding, route withdrawal, and RFC 6811 RPKI validation.

Protocol messages
OPEN, KEEPALIVE, UPDATE
Learned path
64510 64511
Architecture
No central routing directory
Security
RPKI validation + peer filters

Try it yourself

Inspect public BGP routing tables (looking glass)

Use `whois` against RADb or Team Cymru to inspect which AS number originates any public IP prefix.

nslookup -type=txt 10.113.0.203.origin.asn.cymru.com