Four-byte AS Numbers
Configure four-byte ASNs, convert their notation and understand older-peer interoperability.
Two capable routers
Both routers use private four-byte ASNs and ordinary eBGP. BGP is still version 4; the wider ASN is a negotiated capability, not a new BGP version.
| Link | First endpoint | Second endpoint |
|---|---|---|
| R1–R2 | GigabitEthernet1 192.0.2.1/30 | GigabitEthernet1 192.0.2.2/30 |
Complete baseline configurations
R1
hostname R1
ip cef
interface Loopback0
ip address 10.255.0.1 255.255.255.255
exit
interface Loopback10
ip address 198.51.100.1 255.255.255.255
exit
interface GigabitEthernet1
ip address 192.0.2.1 255.255.255.252
no shutdown
exit
router bgp 4200000001
bgp router-id 10.255.0.1
no bgp default ipv4-unicast
neighbor 192.0.2.2 remote-as 4200000002
address-family ipv4 unicast
no auto-summary
neighbor 192.0.2.2 activate
network 198.51.100.1 mask 255.255.255.255
exit-address-family
endR2
hostname R2
ip cef
interface Loopback0
ip address 10.255.0.2 255.255.255.255
exit
interface GigabitEthernet1
ip address 192.0.2.2 255.255.255.252
no shutdown
exit
router bgp 4200000002
bgp router-id 10.255.0.2
no bgp default ipv4-unicast
neighbor 192.0.2.1 remote-as 4200000001
address-family ipv4 unicast
no auto-summary
neighbor 192.0.2.1 activate
exit-address-family
endR2# show ip bgp summary
BGP router identifier 10.255.0.2, local AS number 4200000002
Neighbor V AS State/PfxRcd
192.0.2.1 4 4200000001 1Convert asplain and asdot
Asplain is one decimal integer. Asdot writes high.low, with value = high × 65536 + low. For 4200000001, high is 64086 and low is 59905. Changing notation changes display and some pattern/configuration expectations; it does not renumber the AS.
router bgp 4200000001
bgp asnotation dotR1# show ip bgp summary
BGP router identifier 10.255.0.1, local AS number 64086.59905
Neighbor V AS State/PfxRcd
192.0.2.2 4 64086.59906 0Understand AS_TRANS and AS4_PATH
A router limited to two-byte ASNs cannot encode a large ASN in the old field. A capable peer uses AS_TRANS 23456 where needed toward that peer, and AS4_PATH helps capable routers reconstruct four-byte path information across an old segment. AS4_AGGREGATOR serves a related compatibility purpose for the aggregator attribute.
| Peer combination | Behavior |
|---|---|
| Both support four-byte ASNs | Negotiate capability and exchange four-byte path values. |
| New peer facing old two-byte-only peer | Use compatibility encoding with AS_TRANS where required. |
| Old peer’s configured remote AS | 23456 when the actual new peer AS cannot fit its supported field. |
AS_TRANS is not a private ASN to allocate to your network. A modern implementation should not be forced into an unsupported legacy mode merely to reproduce this historical case.
Verify path identity as well as display
R2# show ip bgp
Network Next Hop Metric LocPrf Weight Path
*> 198.51.100.1/32 192.0.2.1 0 0 4200000001 iThis row uses asplain on R2. Check negotiated four-byte capability and the reconstructed path when investigating interoperation. Expressions written against decimal tokens may need adjustment after choosing asdot because the dot is special in regular expressions.
Restore decimal display
router bgp 4200000001
no bgp asnotation dotThe baseline ASN remains 4200000001 throughout. Restore the saved two-router baseline if other compatibility experiments changed the peers. Reserved/private status is a separate question from ASN width.
Key Takeaways
- Four-byte capability does not change the BGP protocol version.
- Asplain and asdot can represent the same ASN.
- Asdot conversion uses a multiplier of 65536.
- AS_TRANS 23456 supports older-peer compatibility.
- Private versus public assignment is independent of width.
Protocol and command references
Four-octet AS support · ASN notation · Router-symbol attribution.