BGP Automatic Stop feature – Internal Peers

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

Figure 1. BGP Configuration and Testing Topology


Use the following commands to configure BGP routing.

  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.
    iS5comm(config)# router bgp 100
    • Configure R2 (with as-num 100) as internal peer in R1, enabling the autostart feature, and setting the value of idle hold timer as 20 seconds. The peer will now wait for 30 seconds before initiating the connection.
    iS5comm(config-router)# neighbor 12.0.0.2 remote-as 100 allow-autostart idlehold-time 20
    • Enable Automatic Stop flag in R1.
    iS5comm(config-router)# neighbor 12.0.0.2 allow-autostop
    • Connect-retry-count as 2 for R1. It denotes the Maximum number of times the BGP Peer can issue a TCP-Connect with its neighboring peers.
    iS5comm(config-router)# neighbor 12.0.0.2 connect-retry-count 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.
    iS5comm(config)# router bgp 100
    • Configure R1 (with as-num 100) as internal peer in R2.
    iS5comm(config-router)# neighbor 12.0.0.1 remote-as 100

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

    Type the following:

    • R1: View the bgp summary information.
    iS5comm# show ip bgp summary
    BGP router identifier is 12.0.0.1, local AS number 100
    BGP table version is 0
    Neighbor Version AS MsgRcvdMsgSent Up/DownState/PfxRcd
     -------------------------------- ----------------
    12.0.0.2  4     100  3      3        00:00:00:0 Established

    iS5comm# show ip bgp neighbor
    BGP neighbor is 12.0.0.2, remote AS 100, external link
    BGP version 4, remote router ID 12.0.0.2
    BGP state = Established, up for 1 minute 27 seconds
    Configured BGP Maximum Prefix Limit 100
    AutomaticStart ENABLED
    DelayOpen ENABLED
    Configured Connect Retry Count 2
    Current Connect Retry Count 0
    Peer Status : NOT DAMPED
    Idlehold time is 20 DelayOpen interval is 50 secs
    Rcvd update before 0 secs, hold time is 90, keepalive interval is 30 secs
    Received 0 messages, 0 Updates
    Sent 4 messages, 0 Updates
    Route refresh: Received 0, sent 0.
    Minimum time between advertisement runs is 5 seconds
    Connections established 0 time(s)
    Local host: 12.0.0.1, Local port: 49152
    Foreign host: 12.0.0.2, Foreign port: 179
    Last Error: Code 0, SubCode 0.

    • R2: View the BGP summary information.
    iS5comm# show ip bgp summary
    BGP router identifier is 12.0.0.2, local AS number 100
    BGP table version is 0
    Neighbor Version ASMsgRcvd MsgSent Up/DownState/PfxRcd
     -------- ------- ---- -------------- ----------------
    12.0.0.1  4     100  6      3        6300:00:00:0 Established

    • View the peer details for the neighbor.
    iS5comm# show ip bgp neighbor
    BGP neighbor is 12.0.0.1, remote AS 100, internal link
    BGP version 4, remote router ID 12.0.0.1
    BGP state = Established, up for 31 minutes 38 seconds
    Configured BGP Maximum Prefix Limit 100
    AutomaticStart ENABLED
    DelayOpen ENABLED
    Configured Connect Retry Count 5
    Current Connect Retry Count 0
    Peer Status : NOT DAMPED
    Idlehold time is 20 DelayOpen interval is 60 secs
    Rcvd update before 0 secs, hold time is 90, keepalive interval is 30 secs
    Received 63 messages, 0 Updates
    Sent 63 messages, 0 Updates
    Route refresh: Received 0, sent 0.
    Minimum time between advertisement runs is 5 seconds
    Connections established 1 time(s)
    Local host: 12.0.0.2, Local port: 179
    Foreign host: 12.0.0.1, Foreign port: 49152
    Last Error: Code 0, SubCode 0.

    Whenever a CEASE message is received from a peer, Automatic Stop event takes place. In response to this event, the Current Connect Retry Count is incremented, and the peer moves to its Idle State. It remains in the Idle State until the Idle Hold timer expires. After the timer expires, the peer begins to initiate the connection with its neighboring peer. Whenever a CEASE message is received, the Error Code becomes 6.

    To generate and check this scenario, we need to manually issue the following commands:

    At R2,

    • Enter the Global Configuration Mode.
    iS5comm# configure terminal
    • Enable BGP in R2.
    iS5comm(config)# router bgp 100
    • Shutdown the neighbor R1 from R2.
    iS5comm(config-router)# no neighbor 12.0.0.1 remote-as 100
    • Configure the neighbor R1 from R2.
    iS5comm(config)# neighbor 12.0.0.1 remote-as 100

    R1: View the bgp summary information immediately at R1 using ‘show ip bgp summary’

    iS5comm# show ip bgp summary
    BGP router identifier is 12.0.0.1, local AS number 100
    BGP table version is 0
    Neighbor Version AS MsgRcvd MsgSent Up/DownState/PfxRcd
    -------------------------------- -------------------
    12.0.0.2  4     100  0      0        - Idle
    iS5comm# show ip bgp neighbor
    BGP neighbor is 12.0.0.2, remote AS 100, internal link
    BGP version 0, remote router ID 0.0.0.0
    BGP state = Idle
    Configured BGP Maximum Prefix Limit 100
    AutomaticStart ENABLED
    AutomaticStop ENABLED
    Configured Connect Retry Count 2
    Current Connect Retry Count 1
    Peer Status : NOT DAMPED
    Idlehold time is 20 Rcvd update before 0 secs, hold time is 90, keepalive interval is 30 secs
    Received 0 messages, 0 Updates
    Sent 0 messages, 0 Updates
    Route refresh: Received 0, sent 0.
    Minimum time between advertisement runs is 5 seconds
    Connections established 1 time(s)
    Local host: 0.0.0.0, Local port: 0
    Foreign host: 12.0.0.2, Foreign port: 0
    Last Error: Code 6, SubCode 0.

    R2: View the bgp summary information using ‘show ip bgp summary’

    iS5comm# show ip bgp summary
    BGP router identifier is 12.0.0.1, local AS number 100
    BGP table version is 0
    Neighbor Version AS MsgRcvd MsgSent Up/DownState/PfxRcd
    -------------------------------- -------------------
    12.0.0.1  4     100  119   119      00:00:00:0 Established
    iS5comm# show ip bgp neighbor
    BGP neighbor is 12.0.0.1, remote AS 100, internal link
    BGP version 0, remote router ID 12.0.0.1
    BGP state = Established, up for 1 hour 1 minute 16 seconds
    Configured BGP Maximum Prefix Limit 100
    Configured Connect Retry Count 5
    Current Connect Retry Count 0
    Peer Status : NOT DAMPED
    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
    Received 120 messages, 0 Updates
    Sent 120 messages, 0 Updates
    Route refresh: Received 0, sent 0.
    Minimum time between advertisement runs is 5 seconds
    Connections established 1 time(s)
    Local host: 12.0.0.2, Local port: 179
    Foreign host: 12.0.0.1, Foreign port: 49152
    Last Error: Code 0, SubCode 0