07-17-2023 03:15 AM
Hello, everyone!
I am studying BGP at the moment and I have a question about the 4-Byte and 2-Byte ASN compatibility. I understand that we can use the 23456 ASN which is reserved specifically for this purpose, however I have a question.
Consider this example. R1 and R3 don't support the 4-Byte ASNs. So if R2 advertises something to them, they will see "23456" in the AS Path field instead of the 4-byte AS number?
And if we added a fourth router which actually supports 4-Byte ASNs.
Would it also see 23456 in the AS Path field?
Thank you in advance for your help.
Kind regards,
David
07-17-2023 03:49 AM - edited 07-17-2023 03:51 AM
Hello @Mitrixsen,
When a router that supports 4-Byte ASNs advertises routes to routers that do not support 4-Byte ASNs, it uses a special AS_TRANS value in the AS Path field. This AS_TRANS value indicates that a 4-byte AS number is present, but it cannot be represented fully due to the limitation of the receiving routers.
So, in your first scenario, R1 and R3 would see the actual 4-byte AS number in the AS Path field when receiving routes from R2. The AS_TRANS value is used internally in BGP to indicate the presence of a 4-byte AS number.
If you add a fourth router that supports 4-Byte ASNs, it would also see the actual 4-byte AS number in the AS Path field when receiving routes from R2.
https://datatracker.ietf.org/doc/html/rfc6793:
This document reserves a two-octet AS number called "AS_TRANS". AS_TRANS can be used to represent non-mappable four-octet AS numbers as two-octet AS numbers in AS path information that is encoded with two-octet AS numbers. (In this context, four-octet AS numbers that are not mapped from two-octet AS numbers are referred to as "non-mappable".) We denote this special AS number as AS_TRANS for ease of description in the rest of this specification. This AS number is also placed in the "My Autonomous System" field of the OPEN message originated by a NEW BGP speaker, if and only if the speaker does not have a (globally unique) two-octet AS number.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide