BGP Damp Peer Oscillations 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 with automatic start feature enabled. Set the Idle Hold Timer value as 20 seconds.
    iS5comm(config-router)# neighbor 12.0.0.2 remote-as 100 allow-autostart idlehold-time 20
    • Enable Automatic Stop Flag for R1.
    iS5comm(config-router)# neighbor 12.0.0.2 allow-autostop
    • Configure the Connect-retry-count as 1 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 1
    • Enable Damp Peer Oscillations Flag for R1.
    iS5comm(config-router)# neighbor 12.0.0.2 damp-peer-oscillations

  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 R2, 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 36 seconds
    Configured BGP Maximum Prefix Limit 100
    AutomaticStart ENABLED
    AutomaticStop ENABLED
    DampPeer Oscillations ENABLED
    Configured Connect Retry Count 1
    Current Connect Retry Count 0
    Peer Status : NOT DAMPED
    Idlehold time is 20 
    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 3 messages, 0 Updates
    Sent 3 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.1, Local port: 49152
    Foreign host: 12.0.0.2, Foreign port: 179
    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 till 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 simulate and verify this scenario, we need to enter manually the following commands:

  4. At R2:

    Execute the following commands:

    • 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)# 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

    • At 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 VersionAS MsgRcvd MsgSent Up/DownState/PfxRcd
    -------- --------- -------------------------------
    12.0.0.2 4      100  0      0        -Idle

    iS5comm# show ip bgp neighbor
    BGP router identifier is 12.0.0.1, local AS number 100
    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
    DampPeer Oscillations ENABLED
    Configured Connect Retry Count 1
    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.

    Now after the Idle Hold Timer expires for the peer R1, it begins to initiate the connection again with its neighbor R2.

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

    R1: 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 ASMsgRcvd MsgSent Up/DownState/PfxRcd
    -------- ---------------------- -------------------
    12.0.0.2 4      100  6      6       00:00:00:0 Established

    iS5comm# show ip bgp neighbor
    BGP neighbor is 12.0.0.2, remote AS 100, internal link
    BGP version 4, remote router ID 12.0.0.2
    BGP state = Established, up for 2 minutes 12 seconds
    Configured BGP Maximum Prefix Limit 100
    AutomaticStart ENABLED
    AutomaticStop ENABLED
    DampPeer Oscillations ENABLED
    Configured Connect Retry Count 1
    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
    Neighbors Capability:
    Route-Refresh: Advertised and received
    Address family IPv4 Unicast: Advertised and received
    Received 6 messages, 0 Updates
    Sent 6 messages, 0 Updates
    Route refresh: Received 0, sent 0.
    Minimum time between advertisement runs is 5 seconds
    Connections established 2 time(s)
    Local host: 12.0.0.1, Local port: 49152
    Foreign host: 12.0.0.2, Foreign port: 179
    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.2, local AS number 100
    BGP table version is 0
    Neighbor Version AS MsgRcvd MsgSent Up/DownState/PfxRcd
    -------------------------------- -------------------
    12.0.0.1  4     100  8      8       00:00:00:0 Established

    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 3 minutes 34 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 8 messages, 0 Updates
    Sent 8 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. If the ‘Current Connect Retry Count‘ is greater than the ‘Configured Connect Retry Count’, the peer status moves to ‘DAMPED’ state (if the Damp Peer Oscillations Flag is Enabled) and the Idle Hold Timer value is doubled internally.

    The peer remains in the DAMPED state till the Idle Hold Timer value expires. Once this Idle Hold Timer expires, the peer status changes to ‘NOT DAMPED’ and proceeds to initiate the connection.

    So after the ‘Current Connect Retry Count ‘ exceeds the ‘Configured Connect Retry Count’, for each alternative Automatic Stop and Automatic Start events, the Idle Hold Timer value is doubled internally, and it keeps on increasing.

    Whenever the Idle Hold Time value exceeds its maximum Threshold limit (32768), the peer moves to the Idle State and remains in the same, or until a manual start is issued by the administrator.

    To simulate and verify the above-mentioned scenario, enter 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)# 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
    DampPeer Oscillations ENABLED
    Configured Connect Retry Count 1
    Current Connect Retry Count 2
    Peer Status : 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 2 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.

    We can see that the peer status is changed to DAMPED. The Idle Hold Timer value is increased from 20 seconds to 40 seconds internally (not displayed in the neighbor information) and the peer remains in the Idle State till this timer expires. On the expiry of the Idle Hold Timer, the peer status is changed to NOT DAMPED and the peer begins to initiate the connection with its neighbor.

    R1: After the Idle Hold Timer expires, view the bgp summary information 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.1   4    100  10      8   00:00:00:0 Established
    iS5comm# show ip bgp neighbor
    BGP neighbor is 12.0.0.2, remote AS 100, internal link
    BGP version 4, remote router ID 12.0.0.2
    BGP state = Established, up for 5 minutes 20 seconds
    Configured BGP Maximum Prefix Limit 100
    AutomaticStart ENABLED
    AutomaticStop ENABLED
    DampPeer Oscillations ENABLED
    Configured Connect Retry Count 1
    Current Connect Retry Count 2
    Peer Status : NOT DAMPED
    Idlehold time is 20 
    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 12 messages, 0 Updates
    Sent 12 messages, 0 Updates
    Route refresh: Received 0, sent 0.
    Minimum time between advertisement runs is 5 seconds
    Connections established 3 time(s)
    Local host: 12.0.0.1, Local port: 49152
    Foreign host: 12.0.0.2, Foreign port: 179
    Last Error: Code 6, SubCode 0.