Guides
Last updated
June 29, 2026

Public vs Private ASN (2-Byte vs 4-Byte)

Nicolas Rios
Nicolas Rios

Table of Contents:

Get your free
IP Geolocation
 API key now
stars rating
4.8 from 1,863 votes
See why the best developers build on Abstract
START FOR FREE
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
No credit card required

Not every ASN is meant for the public internet. Some are globally unique and routable, while others are reserved for private, internal use. Here is the difference between public and private ASNs, the exact ranges, and how 2-byte and 4-byte ASNs fit in.

Public vs private ASN: what is the difference?

A public ASN is globally unique and used to route traffic across the public internet through BGP. A private ASN is reserved for internal use and never appears in the global routing table. Private ASNs let an organization run BGP inside its own network without consuming a globally unique number.

If you connect to the public internet and announce your own routes, you need a public ASN. If you only use BGP internally, a private ASN is enough. For the full definition, see what an ASN is.

Private ASN ranges (RFC 6996)

RFC 6996 reserves two ranges for private use:

  • 64512 to 65534: private 2-byte (16-bit) ASNs.
  • 4200000000 to 4294967294: private 4-byte (32-bit) ASNs.

These numbers are safe to use inside a private network because they will never be assigned to anyone on the public internet, which avoids collisions.

2-byte vs 4-byte ASNs

The original 2-byte (16-bit) format runs from 0 to 65,535, about 65,000 numbers. To meet demand, the 4-byte (32-bit) format was added (RFC 6793), running from 0 to 4,294,967,295. Both are written the same way, as AS followed by the number, and each has its own private range.

Reserved ASNs

A few ASNs are reserved and should not be used in routing: AS0 is reserved, AS23456 is the AS_TRANS placeholder used for 2-byte and 4-byte compatibility, and AS65535 and AS4294967295 are reserved at the top of each range.

Enter an IP address to start
Need inspiration? Try
73.162.0.1
LOCATE
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
Checking
5
Results for
ip address
Country:
TEST
Region:
TEST
City:
TEST
Coordinates:
TEST
Zip code:
TEST
Connection:
TEST
Get free credits, more data, and faster results

When do you need a public ASN?

You need a public ASN when you run a multi-homed network, meaning you connect to more than one provider and want to control your own routing and keep your IP space if you switch providers. You request one from your regional internet registry (ARIN, RIPE NCC, APNIC, LACNIC, or AFRINIC) or through an upstream provider. A single-homed network usually does not need one.

How to check an ASN

To see the ASN behind any IP address, and whether it belongs to an ISP, hosting provider, or data center, use the ASN Lookup tool. For programmatic checks and risk flags, Abstract's IP Intelligence API returns the ASN, its type, and signals such as is_hosting and is_proxy for any IP.

Frequently Asked Questions

What is the difference between a public and private ASN?

A public ASN is globally unique and routes traffic on the public internet. A private ASN is for internal use only and never appears in the global routing table.

What is the private ASN range?

RFC 6996 reserves 64512 to 65534 for 2-byte private ASNs and 4200000000 to 4294967294 for 4-byte private ASNs.

What is the difference between a 2-byte and a 4-byte ASN?

A 2-byte ASN is a 16-bit number from 0 to 65,535. A 4-byte ASN is a 32-bit number from 0 to 4,294,967,295, introduced because the 2-byte pool was running low.

What is a 4-byte ASN?

A 4-byte ASN is a 32-bit Autonomous System Number ranging from 0 to 4,294,967,295. It is written as AS followed by the number, the same as a 2-byte ASN.

Do I need a public or private ASN?

Use a public ASN if you announce routes on the public internet, usually for a multi-homed network. Use a private ASN if you only run BGP inside your own network.

What is AS23456?

AS23456, called AS_TRANS, is a reserved placeholder that older 2-byte-only routers display in place of a 4-byte ASN they cannot represent.

Nicolas Rios
Nicolas Rios

CEO at Abstract API

Get your free
IP Geolocation
key now
See why the best developers build on Abstract
get started for free

Related Articles

Get your free
IP Geolocation
key now
stars rating
4.8 from 1,863 votes
See why the best developers build on Abstract
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
No credit card required