ccie blog

BGP 4 Byte AS Numbers

We use to just have 2 byte AS numbers, ranging from 0-65535 (with 64512-65535 reserved for private use) available for distribution. However, since the growth of the internet, 4 byte AS numbers are now being issued out to consumers. The increased size, gives us a total of range of 0 – 4294967295 useable AS’s.

There are now three naming conventions for defining an AS:

  • ASPLAIN = 65540
  • ASDOT+ = 1.4
  • ASDOT = explained later



This is the format everyone is use to.

  • 2 byte numbers range from 0 – 65535
  • 4 byte only AS numbers range from 65536 – 4294967295
  • 4 byte AS numbers range from 0 – 4294967295


Let’s take a look at an example. Below is an ASPLAIN number, then underneath, is the ASDOT+ representation of it.

  • ASPLAIN number = 65540
  • ASDOT+ representation = 1.4

How did I work that out?

First understand that 1.4 = high-order-bit low-order-bit

To work out the high-order bit, you do the following:

ASPLAIN / 65536 = X.remainder (where X is the integer and the only thing that matters)

To work out the low order bit, you do the following:

ASPLAIN – (X * 65536)

As such if we do this on the ASPLAIN number above (65540), it would look like this:

High order bit: 65540/65536 = 1.remainder (remainder is irrelevant)

Low order bit: 65540-(1*65536) = 4

Put them together =1.4


In case you are wonder what 65536 is: Since the 4-byte only range starts from 65536, this would convert to 1.0 in ASDOT+ representation since its just 1 number higher than the maximum regular ASPLAIN range (65535).  This number is used as a constant in the formula.



ASDOT uses same naming convention as ASDOT+, however, it is used on numbers within the ASPLAIN range (0-65535). This obviously causes the number before the dot to always be 0. For example, 65534 = 0.65534.

Leave a comment

Your comment