BGP 4-Byte ASN

BGP 4-Byte autonomous system numbers (ASN) feature supports configuration of 4-byte ASN to BGP routers. This has been added as a separate capability which is enabled by default.

The figure shown below depicts the topology setup used for this configuration.

Figure 1. BGP Configuration and Testing Topology


  1. To enable BGP in Router R1:

    Execute the following commands:

    • Enter the Global Configuration Mode.
    iS5comm# configure terminal
    • Enter the Autonomous System (AS) number in R1.
    iS5comm(config)# as-num 100
    • Configure the router-id in R1.
    iS5comm(config)# router-id 12.0.0.1
    • Enable BGP in R1 (assigning a 4-byte ASN).
    iS5comm(config)# router bgp 100.1
    • Configure R2 (with as-num 100.2) as external peer in R1.
    iS5comm(config-router)# neighbor 12.0.0.2 remote-as 100.2

  2. To enable BGP in Router R2:

    Execute the following commands:

    • Enter the Global Configuration Mode.
    iS5comm# configure terminal
    • Enter the Autonomous System (AS) number in R2.
    iS5comm(config)# as-num 100
    • Configure the router-id in R2.
    iS5comm(config)# router-id 12.0.0.2
    • Enable BGP in R2 (assigning a 4 byte ASN).
    iS5comm(config)# router bgp 100.2
    • Configure R2 (with as-num 100.1) as external peer in R1.
    iS5comm(config-router)# neighbor 12.0.0.1 remote-as 100.1

  3. Verify that the BGP session between the internal peers R1 and R2 is established, using the following show commands in R1 and R2.

    Type the following:

    • R1: View the BGP summary information using ‘show ip bgp summary’
    iS5comm# show ip bgp summary
    Context Name : default
    -------------
    BGP router identifier is 12.0.0.1, local AS number 6553601
    Forwarding State is enabled
    BGP table version is 0
    Neighbor   Version    AS    MsgRcvd  MsgSent   Up/Down    State/PfxRcd
    ---------  -------   ---    -------  -------   -------    ------------
    12.0.0.2      4    6553602     2        2     00:00:00:3  Established
    R2: View the bgp summary information using ‘show ip bgp summary’

    iS5comm# show ip bgp summary
    Context Name : default
    -------------
    BGP router identifier is 12.0.0.2, local AS number 6553602
    Forwarding State is enabled
    
    
     BGP table version is 0
    Neighbor   Version    AS    MsgRcvd  MsgSent   Up/Down    State/PfxRcd
    ---------  -------   ---    -------  -------   -------    ------------
    12.0.0.1      4    6553601    11       11      00:00:5:5  Established
    Note:

    The display notation of ASN (in show commands) is in asplain format (i.e. represented by its decimal value e.g. 6553601) by default. It can be changed to Asdot format (i.e. the 4-byte ASN are represented by their decimal value e.g. 100.1)

  4. Enabling Asdot notation in Router R1.

    Type the following:

    iS5comm# configure terminal
    iS5comm(config)# router bgp 100.1
    iS5comm(config)# bgp asnotation dot
    iS5comm(config)# end

  5. Enabling Asdot notation in Router R2.

    Type the following:

    iS5comm# configure terminal
    iS5comm(config)# router bgp 100.2
    iS5comm(config)# bgp asnotation dot
    iS5comm(config)# end

    • R1: View the bgp summary information using ‘show ip bgp summary’
    iS5comm# show ip bgp summary
    Context Name : default
    -------------
    Forwarding State is enabled
    BGP table version is 0
    Neighbor   Version    AS    MsgRcvd  MsgSent   Up/Down    State/PfxRcd
    ---------  -------   ---    -------  -------   -------    ------------
     12.0.0.2      4      100.2    2       2       00:00:00:3  Established

    • R2: View the bgp summary information using ‘show ip bgp summary’
    iS5comm# show ip bgp summary
    Context Name : default
     -------------
    BGP router identifier is 12.0.0.2, local AS number 100.2
    Forwarding State is enabled
    BGP table version is 0
    Neighbor   Version    AS    MsgRcvd  MsgSent   Up/Down    State/PfxRcd
    ---------  -------   ---    -------  -------   -------    ------------
    12.0.0.1      4       100.1    11       11      00:00:5:5  Established
  6. Disabling Asdot notation in Router R1.

    Type the following:

    iS5comm# configure terminal
    iS5comm(config)# router bgp 100.1
    iS5comm(config)# no bgp asnotation dot 
    iS5comm(config)# exit

  7. Disabling Asdot notation in Router R2.

    Type the following:

    iS5comm# configure terminal
    iS5comm(config)# router bgp 100.2
    iS5comm(config)# no bgp asnotation dot 
    iS5comm(config)# exit

    • R1: View the bgp summary information using ‘show ip bgp summary’
    iS5comm# show ip bgp summary
    Context Name : default
    -------------
    BGP router identifier is 12.0.0.1, local AS number 6553601Forwarding State is enabled
    BGP table version is 0
    Neighbor   Version    AS    MsgRcvd  MsgSent   Up/Down    State/PfxRcd
    ---------  -------   ---    -------  -------   -------    -----------
    12.0.0.2      4     6553602    2        2      00:00:00:3  Established

    • R2: View the bgp summary information using ‘show ip bgp summary’
    iS5comm# show ip bgp summary
    Context Name : default
    -------------
    BGP router identifier is 12.0.0.2, local AS number 6553602Forwarding State is enabled
    BGP table version is 0
    Neighbor   Version    AS    MsgRcvd  MsgSent   Up/Down    State/PfxRcd
    ---------  -------   ---    -------  -------   -------    -----------
    12.0.0.1      4     655361    11        11      00:00:5:5  Established
    Note:

    The 4-byte AS Number capability can be disabled only when BGP Global Admin Status is down.

  8. Disabling 4-byte ASN capability in Router R1.

    Type the following:

    iS5comm# configure terminal
    iS5comm(config)# do shutdown ip bgp
    iS5comm(config)# no ip bgp four-byte-asn
    iS5comm(config)# no shutdown ip bgp
    iS5comm(config)# end

  9. Establishing BGP session between R1 and R2.

    Type the following:

    • Configuring Local AS and Peer Remote AS at R1.
    iS5comm# configure terminal
    iS5comm(config)# router-id 12.0.0.1
    iS5comm(config)# router bgp 100
    • Configure the peer remote AS as AS_TRANS (23456), if and only if, the peer is 4-byte ASN enabled router and its AS number is greater than 65535. If the peer's AS number is less than or equal to 65535, the same should be configured as peer remote AS.
    iS5comm(config-router)# neighbor 12.0.0.2 remote-as 23456
    iS5comm(config-router)# end
    • Configuring local AS and peer remote AS at R2.
    iS5comm# configure terminal
    iS5comm(config)# router-id 12.0.0.2
    iS5comm(config)# router bgp 100.2
    iS5comm(config-router)# neighbor 12.0.0.1 remote-as 100
    iS5comm(config-router)# end
  10. Verify that 4-byte ASN capability is not advertised/received in R1.

    Type the following:

    iS5comm# show ip bgp neighbor
    BGP neighbor is 12.0.0.2, remote AS 23456, external link
    BGP version 4, remote router ID 12.0.0.2
    Network Address: None
    BGP state = Established, up for 7 seconds, un-authenticated session
    Configured BGP Maximum Prefix Limit 5000
    AutomaticStart DISABLED
    AutomaticStop DISABLED
    DampPeer Oscillations DISABLED
    DelayOpen DISABLED
    Configured Connect Retry Count 5
    Current Connect Retry Count 0
    Default-originate : DISABLED
    Peer Passive : DISABLED
    Peer Status : NOT DAMPED
    GateWay Address : NONE
    Rcvd update before 0 secs, hold time is 90, keepalive interval is 30 secs
    Neighbors Capability:
    Route-Refresh: Advertised and received
    Address family IPv4 Unicast: Advertised and received
    AF-dependant capabilities:
    Outbound Route Filter (ORF) type : (64) Address Prefix based ORF
    Send-mode : not supported
    Receive-mode : not supported
    Received 2 messages, 0 Updates
    Sent 2 messages, 0 Updates
    Route refresh: Received 0, sent 0.
    Minimum time between advertisement runs is 30 seconds
    Connections established 1 time(s)
    Local host: 12.0.0.1, Local port: 179
    Foreign host: 12.0.0.2, Foreign port: 63916
    Last Error: Code 0, SubCode 0.
    Update Source 12.0.0.1
    Next-Hop is automatic
    MultiHop Status - disabled
    Send-Community is standard,extended
  11. Verify that 4-byte ASN capability is not advertised/received in R2.

    Type the following:

    iS5comm# show ip bgp neighbor
    BGP neighbor is 12.0.0.1, remote AS 100, external link
    BGP version 4, remote router ID 12.0.0.1
    Network Address: None
    BGP state = Established, up for 1 minute 10 seconds, un-authenticated session
    Configured BGP Maximum Prefix Limit 5000
    AutomaticStart DISABLED
    AutomaticStop DISABLED
    DampPeer Oscillations DISABLED
    DelayOpen DISABLED
    Configured Connect Retry Count 5
    Current Connect Retry Count 0
    Default-originate : DISABLED
    Peer Passive : DISABLED
    Peer Status : NOT DAMPED
    GateWay Address : NONE
    Rcvd update before 0 secs, hold time is 90, keepalive interval is 30 secs
    Neighbors Capability:
    Route-Refresh: Advertised and received
    Address family IPv4 Unicast: Advertised and received
    AF-dependant capabilities:
    Outbound Route Filter (ORF) type : (64) Address Prefix based ORF
    Send-mode : not supported
    Receive-mode : not supported
    Received 4 messages, 0 Updates
    Sent 4 messages, 0 Updates
    Route refresh: Received 0, sent 0.
    Minimum time between advertisement runs is 30 seconds
    Connections established 1 time(s)
    Local host: 12.0.0.2, Local port: 63916
    Foreign host: 12.0.0.1, Foreign port: 179
    Last Error: Code 0, SubCode 0.
    Update Source 12.0.0.2
    Next-Hop is automatic
    MultiHop Status - disabled
    Send-Community is standard,extended