PacketLab
BGP · Advanced BGP Features

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.

Lab topologyPhysical links
.1 / .2R1AS 4200000001R2AS 4200000002
Solid lines are physical links. Endpoint labels are the last octets of 192.0.2.x/30, first router then second router in the address table. Loopback0 is 10.255.0.N/32 on RN. Logical BGP peers are listed in the configurations.
LinkFirst endpointSecond endpoint
R1–R2GigabitEthernet1 192.0.2.1/30GigabitEthernet1 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
end

R2

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
end

Open plain-text configurations

Outputs are illustrative, not recorded router results. Each lab starts from its own baseline. Configuration and feature support vary by image and release; platform-specific examples identify their prerequisites.
R2# 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  1

Convert 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 dot
R1# 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  0

Understand 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 combinationBehavior
Both support four-byte ASNsNegotiate capability and exchange four-byte path values.
New peer facing old two-byte-only peerUse compatibility encoding with AS_TRANS where required.
Old peer’s configured remote AS23456 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 i

This 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 dot

The 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.

Four-byte AS Numbers Quiz

Six questions · four options each · select one answer per question. Submit all answers to see your score and explanations.

1. What BGP version do these routers use?
2. What is asdot 1.10 in asplain?
3. Does changing asnotation renumber the AS?
4. Which compatibility value is AS_TRANS?
5. What does AS4_PATH help preserve?
6. Can a four-byte ASN still be private?
Protocol and command references

Four-octet AS support · ASN notation · Router-symbol attribution.