Technical Tip: Configure 4 bytes ASN in BGP
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
