TTR Networks

Intermediate · BGP Fundamentals · section 2 of 9

Autonomous systems and ASNs

✓ Lab-tested 17 October 2026 on FRR 10.2.1

An autonomous system (AS) is a set of routers under a single technical administration with a single, clearly defined routing policy toward the outside world. Each AS is identified by an autonomous system number (ASN).

Originally ASNs were 16-bit (0–65535). The pool ran out, so RFC 6793 extended them to 32 bits. Modern BGP speakers negotiate 4-byte ASN support in the OPEN message.

RangePurpose
0Reserved (RPKI "never originate")
1 – 64495Public 16-bit ASNs, assigned by RIRs
64496 – 64511Documentation and examples (RFC 5398)
64512 – 65534Private 16-bit ASNs (RFC 6996)
65535Reserved
65536 – 65551Documentation (32-bit)
4200000000 – 4294967294Private 32-bit ASNs

Public ASNs are assigned by a Regional Internet Registry (ARIN, RIPE NCC, APNIC, LACNIC, AFRINIC). You need one when you are multi-homed to more than one provider with your own routing policy. A single-homed customer can usually use a private ASN, which the provider strips before advertising to the internet.

eBGP and iBGP

The same protocol behaves differently depending on who it is talking to:

  • eBGP — between routers in different ASes. The local ASN is prepended to the AS_PATH and NEXT_HOP is normally rewritten to the sender. Peers are usually directly connected (TTL 1).
  • iBGP — between routers in the same AS. AS_PATH is left unchanged, NEXT_HOP is preserved by default, and peers are usually loopback-to-loopback, relying on the IGP for reachability.

This course uses the documentation ranges — ASNs 64496–64511 and the prefixes 192.0.2.0/24, 198.51.100.0/24 and 203.0.113.0/24 — so no example collides with a real network.

Check your understanding

You are building a lab and need ASNs that will never clash with a real network on the internet. Which range should you use?

  • 1 – 64495
  • 64512 – 65534
  • 65535
  • 0