Skip to main content
  1. Network Articles/
  2. BGP Articles/

BGP Four-Octet AS Numbers (RFC 6793)

Table of Contents

What four-octet AS numbers are

AS numbers were originally two octets, giving only 0 to 65535. Both the OPEN message and the AS_PATH in UPDATE are defined with two-octet AS numbers in RFC 4271.

That space ran out, and RFC 6793 extended AS numbers to 32 bits (obsoleting RFC 4893). The usable range became 0 to 4294967295.

The extension did not change the BGP message formats themselves. The My Autonomous System field in OPEN is still two octets, and a four-octet AS number is carried separately as a capability. That is what lets routers limited to two octets coexist on the same network.

Notation (asplain / asdot / asdot+)

There are three ways to write a four-octet AS number.

NotationExample (4259905537)Rule
asplain4259905537The decimal value as-is
asdot+65001.1High-order and low-order 16 bits separated by ., written that way even below 65536 (0.<number>)
asdot65001.1Same as asdot+ at 65536 and above; same as asplain below that

RFC 5396 (Proposed Standard) makes asplain the standard notation.

The decimal value representation, or “asplain” is proposed as the textual notation to use for AS numbers.

IOS XR accepts both asplain and asdot as input, but operational commands always display asplain. There is no display-notation command on IOS XR equivalent to bgp asnotation dot on IOS.

Converting asplain to asdot+ is just a division by 65536.

Converting asplain to asdot+
high = asplain / 65536 (quotient)
low  = asplain % 65536 (remainder)

4259905537 / 65536 = 65001 remainder 1  ->  65001.1

Between routers that both support it

Support for four-octet AS numbers is signalled as a capability in the OPEN message.

FieldValue
Capability Code65
Capability Length4
Capability ValueThe speaker’s own four-octet AS number

The catch is that the My Autonomous System field in OPEN is still two octets. An AS number of 65536 or above does not fit there. So, the reserved number AS_TRANS (23456) goes in that field instead, and the real number is carried in capability 65.

This document reserves a two-octet AS number called “AS_TRANS”. AS_TRANS can be used to represent non-mappable four-octet AS numbers as two-octet AS numbers.

This 23456 appears even when both sides support four-octet AS numbers. It is a consequence of the field width in OPEN, not of the peer being old.

When both sides support it, AS_PATH carries four-octet AS numbers directly, four octets per entry.

Crossing a router that does not support it

If a router limited to two octets sits along the path, AS_PATH alone cannot convey the real path. RFC 6793 solves this with separate attributes that carry the real AS numbers.

TypeAttributeFlagsRole
17AS4_PATHOptional transitiveThe AS_PATH encoded with four-octet AS numbers
18AS4_AGGREGATOROptional transitiveAn AGGREGATOR holding a four-octet AS number

A supporting router advertising to a non-supporting one behaves as follows.

When communicating with an OLD BGP speaker, a NEW BGP speaker MUST send the AS path information in the AS_PATH attribute encoded with two-octet AS numbers.

  1. Send AS_PATH with two-octet encoding, substituting AS_TRANS (23456) for any AS at 65536 or above
  2. Send the real sequence of AS numbers alongside it in AS4_PATH
  3. The non-supporting router does not understand AS4_PATH, but passes it on unchanged because it is optional transitive
  4. A supporting router that receives both reconciles AS_PATH and AS4_PATH to reconstruct the real AS_PATH

The reconciliation is done by the first router able to do it. With a single non-supporting router along the path, that is the router immediately after it.

What you look atContents
AS_PATH sent to the non-supporting router23456 23456 (two-octet encoding with four-octet ASes replaced by AS_TRANS)
AS4_PATH sent alongside it4259971073 4259905537 (the real numbers)
AS_PATH reconstructed by the receiving supporting router4259971073 4259905537

Note that peering with a non-supporting router requires that router’s neighbor statement to say remote-as 23456. It does not use capability 65, so the peer’s AS number is, to it, exactly the AS_TRANS sitting in the My Autonomous System field of OPEN.

Between two supporting routers, AS4_PATH must not be sent.

The new attributes, AS4_PATH and AS4_AGGREGATOR, MUST NOT be carried in an UPDATE message between NEW BGP speakers.

Private AS numbers

The ranges free for verification and internal use are set by RFC 6996 (BCP).

SpaceRange
Two-octet64512 to 65534
Four-octet4200000000 to 4294967294

Configuration on IOS XR

router bgp accepts both asplain and asdot.

BGP configuration with a four-octet AS number
router bgp 4259905537
 address-family ipv4 unicast
 !
 neighbor 10.1.2.2
  remote-as 4259971073
  address-family ipv4 unicast
ItemDetail
router bgp <AS>Accepts <1-65535> (two-octet), <1-65535>.<low> (asdot), and <65536-4294967295> (asplain)
show bgp summarylocal AS number and each neighbor’s AS number
show bgp <prefix>AS_PATH, with four-octet ASes listed inline

Verification on real devices

Verified on four routers running XRd 26.1.1.

Verification topology for BGP four-octet AS numbers
  • Each router is in its own AS and every session is eBGP. Only R3 has a two-octet AS (65003), with four-octet ASes on either side
  • The four-octet AS numbers come from the RFC 6996 private range (4200000000 to 4294967294), chosen so that the high-order half in asdot reads 65001 / 65002 / 65004
  • Each router advertises its Lo1 (192.168.<n>.0/24). The main subject is how R4 sees 192.168.1.0/24 originated by R1
RouterAS number (asplain)asdotFour-octet AS
R1425990553765001.1Supported
R2425997107365002.1Supported
R36500365003Supported (suppressed toward R2 at STEP 4)
R4426010214565004.1Supported

Overview of the STEPs

STEPOperationWhat is checkedResultMain evidence
0Initial stateWhether four-octet AS speakers peer normallyAll four are Established. R4 receives AS_PATH 65003 4259971073 4259905537R4 show bgp / R2 show bgp neighbors
1Reset the R1-R2 sessionWhat the OPEN containsMy AS is 23456 and the real number is in capability 65. AS_PATH is four octets per entry, with no AS4_PATHR1-R2 pcap
2Re-enter R1’s remote-as in asdotHow the notation is handledrunning-config keeps asdot; operational output stays asplain. The session does not dropR1 show running-config / show bgp summary
3Aggregate 192.168.0.0/16 on R1The length of AGGREGATOREight octets (four-octet AS + IP). No AS4_AGGREGATORR1-R2 pcap
4Suppress the four-octet AS capability on R3 toward R2Behaviour across a non-supporting routerAS_PATH becomes 23456 23456 with the real numbers in AS4_PATH. AGGREGATOR shrinks to six octets and AS4_AGGREGATOR appearsR2-R3 pcap / R3 show bgp
5Revert STEP 2 to 4 (final state)RestorationBoth the display and the attributes return to their original formR4 show bgp

STEP 0: initial state

R1 is 4259905537, R2 is 4259971073 and R4 is 4260102145 — all above 65535. show bgp summary displays them in asplain.

R1 show bgp summary (STEP 0)
RP/0/RP0/CPU0:R1#show bgp summary
Thu Sep 10 13:14:05.054 UTC
BGP router identifier 10.0.0.1, local AS number 4259905537
BGP generic scan interval 60 secs
Non-stop routing is enabled
BGP table state: Active
Table ID: 0xe0000000   RD version: 6
BGP main routing table version 6
BGP NSR Initial initsync version 3 (Reached)
BGP NSR/ISSU Sync-Group versions 0/0
BGP scan interval 60 secs

BGP is operating in STANDALONE mode.


Process    RcvTblVer     bRIB/RIB     LabelVer    ImportVer    SendTblVer   StandbyVer
Speaker            6             6             6             6             6             0

Neighbor        Spk    AS MsgRcvd MsgSent       TblVer  InQ OutQ  Up/Down  St/PfxRcd
10.1.2.2          0 4259971073       9       7            6    0    0 00:03:36          3

R4’s BGP table has 192.168.1.0/24 from R1 with AS_PATH 65003 4259971073 4259905537. Four-octet and two-octet AS numbers sit side by side in the same AS_PATH.

R4 show bgp (STEP 0)
RP/0/RP0/CPU0:R4#show bgp
Thu Sep 10 13:17:20.326 UTC
<snip>
Status codes: s suppressed, d damped, h history, * valid, > best
              i - internal, r RIB-failure, S stale, N Nexthop-discard
Origin codes: i - IGP, e - EGP, ? - incomplete
   Network            Next Hop            Metric LocPrf Weight Path
*> 192.168.1.0/24     10.3.4.3                               0 65003 4259971073 4259905537 i
*> 192.168.2.0/24     10.3.4.3                               0 65003 4259971073 i
*> 192.168.3.0/24     10.3.4.3                 0             0 65003 i
*> 192.168.4.0/24     0.0.0.0                  0         32768 i

Processed 4 prefixes, 4 paths

The negotiated capabilities are visible in show bgp neighbors.

R2 show bgp neighbors (STEP 0, session with R1)
RP/0/RP0/CPU0:R2#show bgp neighbors
Thu Sep 10 13:15:09.432 UTC
<snip>
BGP neighbor is 10.1.2.1
 Remote AS 4259905537, local AS 4259971073, external link
 Description: eBGP to R1 (AS 4259905537)
 Remote router ID 10.0.0.1
  BGP state = Established, up for 00:04:41
<snip>
  Neighbor capabilities:
    Route refresh: advertised (old + new) and received (old + new)
    4-byte AS: advertised and received
    Address family IPv4 Unicast: advertised and received

STEP 1: looking inside the OPEN

Resetting the R1-R2 session on R1 makes it start again from OPEN.

R1
clear bgp 10.1.2.2

Here is the OPEN R1 sent. My AS is 23456 (AS_TRANS) and the real AS number 4259905537 is in capability 65. R2 also supports four-octet AS numbers, but 23456 appears regardless, because the OPEN field is two octets.

No.20 OPEN (R1 to R2), tshark -V
Border Gateway Protocol - OPEN Message
    Marker: ffffffffffffffffffffffffffffffff
    Length: 75
    Type: OPEN Message (1)
<snip>
    My AS: 23456 (AS_TRANS)
    Hold Time: 180
    BGP Identifier: 10.0.0.1
    Optional Parameters Length: 46
    Optional Parameters
        Optional Parameter: Capability
            Parameter Type: Capability (2)
            Parameter Length: 6
            Capability: Multiprotocol extensions capability
                Type: Multiprotocol extensions capability (1)
                Length: 4
                AFI: IPv4 (1)
                Reserved: 00
                SAFI: Unicast (1)
        Optional Parameter: Capability
            Parameter Type: Capability (2)
            Parameter Length: 2
            Capability: Route Refresh Capability (Cisco)
                Type: Route Refresh Capability (Cisco) (128)
                Length: 0
        Optional Parameter: Capability
            Parameter Type: Capability (2)
            Parameter Length: 2
            Capability: Route refresh capability
                Type: Route refresh capability (2)
                Length: 0
        Optional Parameter: Capability
            Parameter Type: Capability (2)
            Parameter Length: 6
            Capability: Support for 4-octet AS number capability
                Type: Support for 4-octet AS number capability (65)
                Length: 4
                AS Number: 4259905537
Download the pcap containing the packet in the tshark output above (No.20 OPEN)

Now the AS_PATH in the UPDATE that follows. One AS with Length 6 — a two-octet segment header plus a four-octet AS number, so it is four-octet encoding. tshark labels it AS4:. Since both sides support it, no AS4_PATH is attached.

No.24 UPDATE (R1 to R2), tshark -V
Border Gateway Protocol - UPDATE Message
    Marker: ffffffffffffffffffffffffffffffff
    Length: 60
    Type: UPDATE Message (2)
<snip>
        Path Attribute - AS_PATH: 4259905537 
            Flags: 0x40, Transitive, Well-known, Complete
            Type Code: AS_PATH (2)
            Length: 6
            AS Path segment: 4259905537
                Segment type: AS_SEQUENCE (2)
                Segment length (number of ASN): 1
                AS4: 4259905537

The raw route R2 received carries the four-octet AS as well.

R2 show bgp neighbors 10.1.2.1 received routes (STEP 1)
RP/0/RP0/CPU0:R2#show bgp neighbors 10.1.2.1 received routes
Thu Sep 10 13:21:36.034 UTC
BGP router identifier 10.0.0.2, local AS number 4259971073
BGP generic scan interval 60 secs
Non-stop routing is enabled
BGP table state: Active
Table ID: 0xe0000000   RD version: 8
BGP main routing table version 8
BGP NSR Initial initsync version 4 (Reached)
BGP NSR/ISSU Sync-Group versions 0/0
BGP scan interval 60 secs

Status codes: s suppressed, d damped, h history, * valid, > best
              i - internal, r RIB-failure, S stale, N Nexthop-discard
Origin codes: i - IGP, e - EGP, ? - incomplete
   Network            Next Hop            Metric LocPrf Weight Path
*> 192.168.1.0/24     10.1.2.1                 0             0 4259905537 i

Processed 1 prefixes, 1 paths

STEP 2: entered in asdot, displayed in asplain

R1’s neighbor statement is re-entered with the same AS number in asdot (65002.1).

R1
router bgp 4259905537
 neighbor 10.1.2.2
  remote-as 65002.1

The running-config keeps it in asdot, exactly as typed.

R1 show running-config (STEP 2)
router bgp 4259905537
 bgp router-id 10.0.0.1
 address-family ipv4 unicast
  network 192.168.1.0/24
 !
 neighbor 10.1.2.2
  remote-as 65002.1
  description eBGP to R2 (AS 4259971073)
  address-family ipv4 unicast
   send-community-ebgp
   route-policy FROM-R2 in
   route-policy TO-R2 out
   soft-reconfiguration inbound always
  !
 !
!

The AS numbers in show bgp summary, meanwhile, stay asplain. The value is unchanged, so the session does not drop.

R1 show bgp summary (STEP 2)
RP/0/RP0/CPU0:R1#show bgp summary
Thu Sep 10 13:24:46.652 UTC
BGP router identifier 10.0.0.1, local AS number 4259905537
BGP generic scan interval 60 secs
Non-stop routing is enabled
BGP table state: Active
Table ID: 0xe0000000   RD version: 12
BGP main routing table version 12
BGP NSR Initial initsync version 3 (Reached)
BGP NSR/ISSU Sync-Group versions 0/0
BGP scan interval 60 secs

BGP is operating in STANDALONE mode.


Process    RcvTblVer     bRIB/RIB     LabelVer    ImportVer    SendTblVer   StandbyVer
Speaker           12            12            12            12            12             0

Neighbor        Spk    AS MsgRcvd MsgSent       TblVer  InQ OutQ  Up/Down  St/PfxRcd
10.1.2.2          0 4259971073      24      22           12    0    0 00:05:44          3

STEP 3: aggregation makes AGGREGATOR eight octets

R1 aggregates to 192.168.0.0/16.

R1
router bgp 4259905537
 address-family ipv4 unicast
  aggregate-address 192.168.0.0/16 summary-only

R1 now advertises only the aggregate to R2 (summary-only suppresses the more specifics).

R1 show bgp neighbors 10.1.2.2 advertised-routes (STEP 3)
RP/0/RP0/CPU0:R1#show bgp neighbors 10.1.2.2 advertised-routes
Thu Sep 10 13:29:31.291 UTC
Network            Next Hop        From            AS Path
192.168.0.0/16     10.1.2.1        Local Aggregate 4259905537i

Processed 1 prefixes, 1 paths

192.168.0.0/16 duly appears in R2’s table.

R2 show bgp (STEP 3)
RP/0/RP0/CPU0:R2#show bgp
Thu Sep 10 13:30:33.175 UTC
<snip>
Status codes: s suppressed, d damped, h history, * valid, > best
              i - internal, r RIB-failure, S stale, N Nexthop-discard
Origin codes: i - IGP, e - EGP, ? - incomplete
   Network            Next Hop            Metric LocPrf Weight Path
*> 192.168.0.0/16     10.1.2.1                               0 4259905537 i
*> 192.168.2.0/24     0.0.0.0                  0         32768 i
*> 192.168.3.0/24     10.2.3.3                 0             0 65003 i
*> 192.168.4.0/24     10.2.3.3                               0 65003 4260102145 i

Processed 4 prefixes, 4 paths

The AGGREGATOR in that UPDATE has Length 8 — four octets of AS number plus four of IP address — and no AS4_AGGREGATOR.

UPDATE for the aggregate (R1 to R2), tshark -V
Border Gateway Protocol - UPDATE Message
    Marker: ffffffffffffffffffffffffffffffff
    Length: 66
    Type: UPDATE Message (2)
<snip>
        Path Attribute - ATOMIC_AGGREGATE
            Flags: 0x40, Transitive, Well-known, Complete
            Type Code: ATOMIC_AGGREGATE (6)
            Length: 0
        Path Attribute - AGGREGATOR: AS: 4259905537 origin: 10.0.0.1
            Flags: 0xc0, Optional, Transitive, Complete
            Type Code: AGGREGATOR (7)
            Length: 8
            Aggregator AS: 4259905537
            Aggregator origin: 10.0.0.1
Download the pcap containing the packet in the tshark output above

STEP 4: forcing the path across a non-supporting router

The four-octet AS capability is suppressed on R3’s neighbor statement for R2, so that R3 looks like a non-supporting router to R2.

R3
router bgp 65003
 neighbor 10.2.3.2
  capability suppress 4-byte-as

That alone does not bring the session up. R3 answers R2’s OPEN with Bad Peer AS.

No.12 NOTIFICATION (R3 to R2), tshark -V
Border Gateway Protocol - NOTIFICATION Message
    Marker: ffffffffffffffffffffffffffffffff
    Length: 23
    Type: NOTIFICATION Message (3)
    Major error Code: OPEN Message Error (2)
    Minor error Code (Open Message): Bad Peer AS (2)
    Bad Peer AS: 0

The reason is in the OPEN R2 sent. My AS is 23456 and the real number 4259971073 is in capability 65, but to an R3 that does not use the capability, the peer’s AS number is 23456. R3 is configured with remote-as 4259971073, so they do not match.

No.9 OPEN (R2 to R3), tshark -V
Border Gateway Protocol - OPEN Message
    Marker: ffffffffffffffffffffffffffffffff
    Length: 75
    Type: OPEN Message (1)
<snip>
    My AS: 23456 (AS_TRANS)
    Hold Time: 180
    BGP Identifier: 10.0.0.2
    Optional Parameters Length: 46
    Optional Parameters
        Optional Parameter: Capability
            Parameter Type: Capability (2)
            Parameter Length: 6
            Capability: Multiprotocol extensions capability
                Type: Multiprotocol extensions capability (1)
                Length: 4
                AFI: IPv4 (1)
                Reserved: 00
                SAFI: Unicast (1)
        Optional Parameter: Capability
            Parameter Type: Capability (2)
            Parameter Length: 2
            Capability: Route Refresh Capability (Cisco)
                Type: Route Refresh Capability (Cisco) (128)
                Length: 0
        Optional Parameter: Capability
            Parameter Type: Capability (2)
            Parameter Length: 2
            Capability: Route refresh capability
                Type: Route refresh capability (2)
                Length: 0
        Optional Parameter: Capability
            Parameter Type: Capability (2)
            Parameter Length: 6
            Capability: Support for 4-octet AS number capability
                Type: Support for 4-octet AS number capability (65)
                Length: 4
                AS Number: 4259971073
Download the pcap containing the packets in the tshark output above (No.9 OPEN, No.12 NOTIFICATION)

Correcting R3’s neighbor statement to remote-as 23456 brings it up.

R3
router bgp 65003
 neighbor 10.2.3.2
  remote-as 23456

show bgp neighbors then reports Capability 4-byte-as suppress is configured.

R3 show bgp neighbors (STEP 4, session with R2)
RP/0/RP0/CPU0:R3#show bgp neighbors
Thu Sep 10 13:39:48.625 UTC
<snip>
BGP neighbor is 10.2.3.2
 Remote AS 23456, local AS 65003, external link
 Description: eBGP to R2 (AS 4259971073)
 Remote router ID 10.0.0.2
  BGP state = Established, up for 00:04:14
  Previous State: Idle
  Last Received Message: KeepAlive
  NSR State: None
  Last read 00:00:12, Last read before reset 00:07:12
  Hold time is 180, keepalive interval is 60 seconds
  Configured hold time: 180, keepalive: 60, min acceptable hold time: 3
  Last write 00:00:12, attempted 19, written 19
  Second last write 00:01:12, attempted 19, written 19
  Last write before reset 00:06:50, attempted 19, written 19
  Second last write before reset 00:07:50, attempted 19, written 19
  Last write pulse rcvd  Sep 10 13:39:36.831 last full not set pulse count 69
  Last write pulse rcvd before reset 00:06:50
  Last insert into reset queue: Sep 10 13:35:00.278, removed at Sep 10 13:35:00.278
  Socket not armed for io, armed for read, armed for write
  Last write thread event before reset 00:06:50, second last 00:06:50
  Last KA expiry before reset 00:06:50, second last 00:07:50
  Last KA error before reset 00:00:00, KA not sent 00:00:00
  Last KA start before reset 00:06:50, second last 00:07:50
  Precedence: internet
  Non-stop routing is enabled
  Enforcing first AS is enabled
  Multi-protocol capability received
  Neighbor capabilities:
    Route refresh: advertised (old + new) and received (old + new)
    Address family IPv4 Unicast: advertised and received
  Capability 4-byte-as suppress is configured

Here is the UPDATE R2 sends to R3. AS_PATH is 23456 23456 in two-octet encoding (Length 6), with the real numbers in AS4_PATH (type 17). AGGREGATOR also shrinks to six octets, and AS4_AGGREGATOR (type 18) carries the real number.

UPDATE for the aggregate (R2 to R3, R3 acting as non-supporting), tshark -V
Border Gateway Protocol - UPDATE Message
    Marker: ffffffffffffffffffffffffffffffff
    Length: 88
    Type: UPDATE Message (2)
<snip>
        Path Attribute - AS_PATH: 23456 23456 
            Flags: 0x40, Transitive, Well-known, Complete
            Type Code: AS_PATH (2)
            Length: 6
            AS Path segment: 23456 23456
                Segment type: AS_SEQUENCE (2)
                Segment length (number of ASN): 2
                AS2: 23456 (AS_TRANS)
                AS2: 23456 (AS_TRANS)
        Path Attribute - AS4_PATH: 4259971073 4259905537 
            Flags: 0xc0, Optional, Transitive, Complete
            Type Code: AS4_PATH (17)
            Length: 10
            AS Path segment: 4259971073 4259905537
                Segment type: AS_SEQUENCE (2)
                Segment length (number of ASN): 2
                AS4: 4259971073
                AS4: 4259905537
        Path Attribute - ATOMIC_AGGREGATE
            Flags: 0x40, Transitive, Well-known, Complete
            Type Code: ATOMIC_AGGREGATE (6)
            Length: 0
        Path Attribute - AGGREGATOR: AS: 23456 origin: 10.0.0.1
            Flags: 0xc0, Optional, Transitive, Complete
            Type Code: AGGREGATOR (7)
            Length: 6
            Aggregator AS: 23456
            Aggregator origin: 10.0.0.1
Download the pcap containing the packet in the tshark output above

R3’s own show bgp displays the AS_PATH with the real numbers, because it reconciles AS_PATH with AS4_PATH.

R3 show bgp (STEP 4)
RP/0/RP0/CPU0:R3#show bgp
Thu Sep 10 13:39:47.743 UTC
<snip>
Status codes: s suppressed, d damped, h history, * valid, > best
              i - internal, r RIB-failure, S stale, N Nexthop-discard
Origin codes: i - IGP, e - EGP, ? - incomplete
   Network            Next Hop            Metric LocPrf Weight Path
*> 192.168.0.0/16     10.2.3.2                               0 4259971073 4259905537 i
*> 192.168.2.0/24     10.2.3.2                 0             0 4259971073 i
*> 192.168.3.0/24     0.0.0.0                  0         32768 i
*> 192.168.4.0/24     10.3.4.4                 0             0 4260102145 i

Processed 4 prefixes, 4 paths

As a result, the UPDATE R3 sends on to R4 carries only a four-octet AS_PATH, with no AS4_PATH.

UPDATE for the aggregate (R3 to R4), tshark -V
Border Gateway Protocol - UPDATE Message
    Marker: ffffffffffffffffffffffffffffffff
    Length: 74
    Type: UPDATE Message (2)
<snip>
        Path Attribute - AS_PATH: 65003 4259971073 4259905537 
            Flags: 0x40, Transitive, Well-known, Complete
            Type Code: AS_PATH (2)
            Length: 14
            AS Path segment: 65003 4259971073 4259905537
                Segment type: AS_SEQUENCE (2)
                Segment length (number of ASN): 3
                AS4: 65003
                AS4: 4259971073
                AS4: 4259905537
Download the pcap containing the packet in the tshark output above

The AS_PATH R4 sees is unchanged from before the suppression.

R4 show bgp (STEP 4)
RP/0/RP0/CPU0:R4#show bgp
Thu Sep 10 13:40:53.981 UTC
<snip>
Status codes: s suppressed, d damped, h history, * valid, > best
              i - internal, r RIB-failure, S stale, N Nexthop-discard
Origin codes: i - IGP, e - EGP, ? - incomplete
   Network            Next Hop            Metric LocPrf Weight Path
*> 192.168.0.0/16     10.3.4.3                               0 65003 4259971073 4259905537 i
*> 192.168.2.0/24     10.3.4.3                               0 65003 4259971073 i
*> 192.168.3.0/24     10.3.4.3                 0             0 65003 i
*> 192.168.4.0/24     0.0.0.0                  0         32768 i

Processed 4 prefixes, 4 paths

What capability suppress 4-byte-as on IOS XR suppresses is only the advertisement of capability 65 to that neighbor. The router still understands a received AS4_PATH and reconstructs from it, so it does not pass AS4_PATH straight through the way a genuinely old implementation would. With a genuinely old implementation, R3 would put 65003 23456 23456 in AS_PATH, pass AS4_PATH along untouched, and R4 would be the one reconstructing.

STEP 5: reverting (final state)

The capability suppression and remote-as on R3, and the asdot notation and aggregation on R1, are all put back. The peer AS number seen from R3 returns to 4259971073.

R3 show bgp summary (final state)
RP/0/RP0/CPU0:R3#show bgp summary
Thu Sep 10 13:44:22.297 UTC
BGP router identifier 10.0.0.3, local AS number 65003
BGP generic scan interval 60 secs
Non-stop routing is enabled
BGP table state: Active
Table ID: 0xe0000000   RD version: 18
BGP main routing table version 18
BGP NSR Initial initsync version 5 (Reached)
BGP NSR/ISSU Sync-Group versions 0/0
BGP scan interval 60 secs

BGP is operating in STANDALONE mode.


Process    RcvTblVer     bRIB/RIB     LabelVer    ImportVer    SendTblVer   StandbyVer
Speaker           18            18            18            18            18             0

Neighbor        Spk    AS MsgRcvd MsgSent       TblVer  InQ OutQ  Up/Down  St/PfxRcd
10.2.3.2          0 4259971073      49      47           18    0    0 00:02:31          2
10.3.4.4          0 4260102145      35      44           18    0    0 00:31:54          1

R4’s table is back to the same four routes as STEP 0.

R4 show bgp (final state)
RP/0/RP0/CPU0:R4#show bgp
Thu Sep 10 13:45:27.397 UTC
<snip>
Status codes: s suppressed, d damped, h history, * valid, > best
              i - internal, r RIB-failure, S stale, N Nexthop-discard
Origin codes: i - IGP, e - EGP, ? - incomplete
   Network            Next Hop            Metric LocPrf Weight Path
*> 192.168.1.0/24     10.3.4.3                               0 65003 4259971073 4259905537 i
*> 192.168.2.0/24     10.3.4.3                               0 65003 4259971073 i
*> 192.168.3.0/24     10.3.4.3                 0             0 65003 i
*> 192.168.4.0/24     0.0.0.0                  0         32768 i

Processed 4 prefixes, 4 paths

Summary of the verification

  • AS_TRANS (23456) appears in OPEN regardless of whether the peer supports four-octet AS numbers; capability 65 carries the real number (STEP 1)
  • Between supporting routers, AS_PATH uses four-octet encoding and no AS4_PATH is attached (STEP 1 and 3)
  • AGGREGATOR is eight octets between supporting routers, and six octets plus AS4_AGGREGATOR toward a non-supporting one (STEP 3 and 4)
  • The non-supporting router’s neighbor statement must say remote-as 23456, or the session fails with Bad Peer AS (STEP 4)
  • IOS XR accepts asdot input and keeps it in running-config, but operational output is always asplain (STEP 2)

Verification configs and show output

At every STEP the following three kinds of output were collected from all four routers, kept in separate files per router. The verification config is the ..._run.txt file (the final state is the STEP 5 one).

FileContents
..._show.txtshow version / show interface description / show route / show route bgp / show bgp summary / show bgp / show bgp <prefix> (four prefixes) / show bgp neighbors / show bgp update-group / advertised-routes, routes and received routes per peer / show rpl route-policy
..._log.txtshow logging limited to that STEP. A marker was written with logmsg at the start of each STEP and its timestamp passed to show logging start and end
..._run.txtshow running-config at that STEP (that is, the verification config for the STEP)

STEP 0: initial state

Routershow outputsyslogrunning-config
R1showlogrun
R2showlogrun
R3showlogrun
R4showlogrun

STEP 1: reset the R1-R2 session

Routershow outputsyslogrunning-config
R1showlogrun
R2showlogrun
R3showlogrun
R4showlogrun

STEP 2: re-enter R1’s remote-as in asdot

Routershow outputsyslogrunning-config
R1showlogrun
R2showlogrun
R3showlogrun
R4showlogrun

STEP 3: aggregate 192.168.0.0/16 on R1

Routershow outputsyslogrunning-config
R1showlogrun
R2showlogrun
R3showlogrun
R4showlogrun

STEP 4: suppress the four-octet AS capability on R3 toward R2

Routershow outputsyslogrunning-config
R1showlogrun
R2showlogrun
R3showlogrun
R4showlogrun

STEP 5: revert STEP 2 to 4 (final state)

Routershow outputsyslogrunning-config
R1showlogrun
R2showlogrun
R3showlogrun
R4showlogrun

References

DocumentTitleSummary
RFC 6793BGP Support for Four-Octet Autonomous System (AS) Number SpaceFour-octet AS numbers: capability 65, AS_TRANS, AS4_PATH (17) and AS4_AGGREGATOR (18). Obsoletes RFC 4893
RFC 5396Textual Representation of Autonomous System (AS) NumbersDefines asplain / asdot / asdot+ and makes asplain the standard notation
RFC 6996Autonomous System (AS) Reservation for Private UsePrivate AS number ranges; four-octet is 4200000000 to 4294967294
RFC 4271A Border Gateway Protocol 4 (BGP-4)The original specification, defining My Autonomous System in OPEN and AS_PATH as two octets

Related articles