BGP 4-Byte AS Number

Thanks Laz now convinced.

1 Like

Hi,

There is an error on Rene’s example:

#AS 5434995
5434995 / 65536 = 82
5434995 - (82 * 65536) = 61043
asdot = 82.6104

It should be 82.61043.

Thank you @obertigiovannicesare, just fixed this typo.

Rene

I could not understand the as-dot here , can you please help me ??

Hello Narad

A 4 byte AS number is represented by 32 bits. For AS numbers less than 65536, these numbers are simply represented as numbers ranging from 1 to 655356. For larger numbers, ASdot represents them as two 16 bit numbers separated by a dot. So for example:

  • An AS number of 00000000 00000000 00000000 11111111 is
  1. 256 in decimal
  2. 256 in Asdot
  3. 0.256 in Asdot+
  • An AS number of 00000000 00000000 11111111 11111111 is
  1. 65535 in decimal
  2. 65535 in Asdot
  3. 0.65535 in Asdot+
  • An AS number of 00000000 00000001 11111111 11111111 is
  1. 131071 in decimal
  2. 1.65535 in Asdot
  3. 1.65535 in Asdot+

So if the two leftmost octets are zeros, then Asdot is the same as decimal. If however there is even a single “1” in any of the two leftmost octets, Asdot will revert to Asdot+.

I hope this has been helpful!

Laz

Hi Team
Would you explain how AS_TRANS calculated, i just didnt see any formula how exactly is created! you pick 23456 for remote as on R1, randomly chosen or whats the base here ? Thanks

Hello Nahro

The AS_TRANS number is defined as 23456 by the IANA and is always the same. The RFC4893 states that:

…this document introduces a reserved 2-octet AS number – AS_TRANS. The AS number 23456 has been assigned by the IANA for AS_TRANS.

I hope this has been helpful!

Laz

1 Like

Thanks Sir Laz
This is why we love Network Lessons, geting reply for all questions

1 Like

Rene/Laz,

With regards to the 4-byte ASNs, what would be appropriate workaround while using communities since standard is limited to 2-bytes. Cisco’s extcommunity attribute doesn’t seem to fit the bill for using route oriented declarations. Would you then be limited to using standard reserved ASNs eg. 65535 for iBGP purposes only? Thanks.

Hello William

It seems that the IETF has provided for such cases by defining a new type of BGP extended community that carries a 4-octet AS. This is defined in RFC5668. However, the set community route-map command can still only accommodate 2-byte ASNs. (Take a look at this Cisco community thread which sheds some light on that).

Cisco’s extended communities have been designed to accommodate 8 octets, which is what is needed for use of communities with a 4-byte ASN, however, these are used most often for MPLS VPN to share the RTs, and can be seen being used in these lessons:

Currently, there doesn’t seem to be a workaround for 4-byte ASNs, however, can you tell us a little bit more about what you want to achieve? It may help in devising a solution to the problem.
Is there a particular scenario that you have in mind? Let us know so that we can help you further.

I hope this has been helpful!

Laz