

I’ll show you how this works in the configuration. When a “new” router talks to an “old” router (one that only supports 2-byte AS numbers), it can use a reserved AS number (23456) called AS_TRANS instead of its 4-byte AS number. Once you understand how the conversion is done, you can use the APNIC asplain to asdot calculator to convert this automatically and make your life a bit easier.īGP speakers that support 4-byte AS numbers advertise this via BGP capability negotiation and there is backward compatibility. Remainder (low order bit value) = asplain - (integer * 65536) In other words, this is the formula: integer (high order bit value) = asplain / 65536 Then, you take the asplain number and deduct (65536 * the integer) to get your low order bit value. This is the integer that we use for the high order bit value. If you want to convert an asplain AS number to an asdot+ AS number, you take the asplain number and see how many times you can divide it by 65536. These numbers are easier to read but harder to calculate than the asplain numbers, it’s also a bit trickier to create regular expressions.

For example:įor AS numbers above 65535, we use the next high order bit value and start counting again at 0. All older AS numbers can fit in the second part where the first part is set to 0. It’s easy to make a configuration mistake or misread a number in the BGP table.Īsdot represents AS numbers less than 65536 using the asplain notation and AS numbers above 65536 with the asdot+ notation.Īsdot+ breaks the AS number in two 16-bit parts, a high-order value, and a low-order value, separated by a dot. These numbers are simple to understand but prone to errors. There are three ways to write down these new 4-byte AS numbers:Īsplain is the most simple to understand, these are just regular decimal numbers. Similar to IPv4, we started running out of AS numbers so IANA increased the AS numbers by introducing 4-byte AS numbers in the range of 65536 to 4294967295. 1024 of those (64512-65534) are reserved for private AS numbers. Before January 2009, we only had 2 byte AS numbers in the range of 1-65535.
