Skip to main content
adebeer_FTNT
Staff
Staff
Jul 29, 2010 10:17 AM UTC

Technical Tip: BGP four-byte AS Path (RFC 4893) support in FortiOS

  • Apr 24, 2026 2:49 PM UTC
  • 0 replies
  • 5406 views
  • Translate All

Description

 
This article describes how BGP four-byte AS Path (RFC 4893) has been supported since FortiOS 4.0MR2.
 
Scope
 
FortiGate.


Solution

For more information about BGP 4-byte AS Path Support please refer to the Fortinet Technical Guides available in the Fortinet Document Library:
  • What's new in FortiOS 4.0MR2
  • Dynamic Routing (FortiOS 5.2)
A BGP router defined with a local 4-octect ASN and peering with another (old) router capable of only 2-octect ASN (that is: not supporting RFC-4893) will send an 'Open' message containing the 'My AS' field with the dedicated value "23456" (see RFC).

The impact this will have on the 'old' BGP speaker is that this 'old' BGP speaker believes it is peering with Autonomous System ‘23456’ (a two-byte AS) instead of the real 4-octet AS.  

 

This behavior is the standard interoperability rule defined in RFC 6793 (under Section 5 - 'Transition' and 'Backward Compatibility') to allow modern 4-byte BGP speakers to talk to very old routers that only understand the original 2-byte AS field (pre-RFC 4893/6793). FortiOS implements it fully and automatically as of FortiOS 4.0 MR2 and above.

 

These new 4-byte AS numbers (ranging from 65536 to 4294967295) can be written in three ways:

 

  1. Asplain: 
    • All ASNs are written in decimal.
    • Example: 655900, 213141, 429496, 429496729, 429496729.
  2. Asdot:
    • ASNs less than 65536 are represented by Asdot using the asplain notation.
    • Example: 200, 3000, 35986, 65412.
  3. Asdot+:
    • ASNs above 65536 are represented by Asdot+: high order 16-bit value in decimal>.<low order 16-bit value in decimal>.

  

The ASNs from 1 to 65535 can be written as follows 0.200, 0.3000, 0.35986, 0.65412, 0.65535

 

The ASNs above 65536 can be written as follows:

 

  • Formula to calculate Asdot+:
    • High order bit value = asplain / 65536.
    • Low order bit value = asplain - (high order bit value * 65536).
    • Asdot+ = high order 16-bit value in decimal>.<low order 16-bit value in decimal.


Example: Converting Asplain 429496729 to Asdot+:

  • High order bit value = 429496729 / 65536 = 6553.
  • Low order bit value  = 429496729 - ( 6553 * 65536) = 39321.
  • Asdot+ = 6553.39321.

Some online tools are available for converting Asplain to Asdot+.

 

Asdot and Asdot+ are supported in FortiOS 7.2.1 and above.

More information is available in RFC 5396.  

Risk and Resilience in the Age of AI. An OT Thought Leadership Summit for Houston's Critical Infrastructure Leaders. Date: Thursday, December 3, 2026. Time: 8:30 am - 1:30 pm (CT). Location: The Westin Houston, Memorial City | 945 Gessner Road, Houston, TX 77024