The Unique ID Card
Before two networks can exchange routing information, they need a way to identify each other unambiguously. Every Autonomous System that participates in global routing is assigned a unique Autonomous System Number (ASN). These numbers are managed by IANA (Internet Assigned Numbers Authority) and delegated to Regional Internet Registries (RIRs) — organizations like ARIN (North America), RIPE NCC (Europe), and APNIC (Asia-Pacific) — the same bodies that allocate IP address blocks.
Public ASNs are globally unique identifiers used for routing on the public internet. If you want to peer with other ISPs or announce your IP address blocks to the world, you need a public ASN. Well-known examples:
- AS15169 — Google
- AS16509 — Amazon (AWS)
- AS32934 — Meta (Facebook)
- AS2914 — NTT Communications (a major transit provider)
Originally ASNs were 16-bit numbers (range: 1–65535), but the internet grew so large that 4-byte (32-bit) ASNs were introduced, extending the range to over 4 billion possible values.
Private ASNs occupy the reserved range 64512–65535 (16-bit) and 4200000000–4294967295 (32-bit). Just like RFC 1918 private IP addresses (10.x.x.x, 192.168.x.x), private ASNs can be used freely inside an organization's internal network but must be stripped before route advertisements reach the public internet. A large enterprise might run BGP internally between its own data centers using private ASNs to manage traffic engineering without consuming public ASN space.
The distinction matters operationally: if a private ASN leaks into a public BGP advertisement, other networks will see it and may reject the route or experience routing anomalies. Filtering private ASNs at the edge of your network is a standard best practice.
Interviewers sometimes ask: "What's the difference between a public and private ASN, and when would you use each?" The clean answer: public ASNs are for peering on the global internet; private ASNs are for internal BGP (iBGP) use within an organization, such as between data centers or between a customer and their ISP on a private link. Private ASNs must be stripped at the eBGP boundary before being advertised publicly.
Key Point: Public ASNs enable global internet routing; private ASNs are for internal network use only and must never leak to the public internet.