Skip to main content
mprabakhar
Staff
Staff
April 28, 2021

Technical Tip: Configure 4 bytes ASN in BGP

  • April 28, 2021
  • 0 replies
  • 8741 views

Description


This article describes how to add Four-octet ASN in BGP configuration. For additional reading, see Dynamic routing terminology.

 

Scope

 

FortiGate.


Solution

 

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

  • asplain: Decimal only (e.g., 4294967295) - this is the format required in FortiOS configuration.
  • asdot: Dotted notation (e.g., 65535.65535) - often seen in show outputs or other vendors (e.g., Cisco).
  • asdot+: Extended dotted (e.g., 0.65535 for legacy 2-byte).


Adding the dotted notation will fail, as shown below.

 

config router bgp
set as
as            <----- Enter an integer value from <0> to <4294967295>.

FGT (bgp) # set as 65001.65001
invalid integer value: .65001
value parse error before '65001.65001'
Command fail. Return code -1


To add 4 bytes of AS numbers, the dotted notation has to be converted to decimal notation to be added to the config.

For example: '65001.65001' is converted to ASN: 4259970537.

 

config router bgp
    set as 4259970537
        config neighbor

            edit "202.1.1.2"

                set remote-as 4259970537

            next

        end

Thought Leadership Security Summit. Outpace New Threats with AI - enhanced defense. Tuesday, Septmeber 15, 8:30 AM - 2:30 PM PT. The Golf Club at Newcastle, WA.
Virtual event | September 2026. SASE summit. The age of autonomous trust. Register here!