BGP Public and Private AS

 Just like a Public IP Address, ASN (Autonomous System Number) also needs to be unique in the internet. The main reason for this is that EBGP split-horizon (EBGP loop prevention mechanism). EBGP split horizon means, when even the same AS number is seen for any prefix, it will be not accept that prefix in it BGP table.

Consider the below topology:

From the Above topology, R1 and R3 belongs to the same AS. When R1 sends an update to R2, R2 will receive and it will forward it to R3. But R3 will see its own AS number and it will be dropped by R3.

Initially AS number was started with 16 bit number that needs to be purchased from IANA by providing the proper reason.

  • 0: reserved.
  • 1-64,495: Public AS numbers.
  • 64,496 – 64,511 – reserved to use in documentation.
  • 64,512 – 65,534 – Private AS numbers.
  • 65,535 – reserved.
Most of the Public AS numbers are already allocated. You can see the remaining AS number count from the Current Status of the 16 bit AS Number Pool
The 1-64.495 public AS range is pretty small so there are similar issues to the IPv4 public IP addresses, there aren’t enough numbers. Now 32-bit AS number also introduced which have sufficient AS number space as compared to 16-bit AS.

Now, you know the reason why we need to use the unique PUBLIC AS number. 

Let's consider the below topology:

R1 is in Private AS (AS_65000). In the BGP table of R2, we can see the AS_65000 information. But, once it advertises something to R3, private AS number will not be seen in the BGP table of R3(AS_3).

Private AS number will be used in:
  • Customer End Routers
  • BGP Confederation
That's it about BGP Public and Private AS numbers. Will see in action in the next article.

Post a Comment