Configuring BGP Iteration Suppression in Case of Next Hop Flapping
Usage Scenario
If a large number of routes are iterated to the same next hop that flaps frequently, the system will be busy processing changes of these routes, which consumes excessive system resources and leads to high CPU usage. To address this problem, configure BGP iteration suppression in case of next hop flapping.
By default, BGP iteration suppression in case of next hop flapping is enabled. After this function is enabled, BGP calculates the penalty value that starts from 0 by comparing the flapping interval with configured intervals if next hop flapping occurs. When the penalty value exceeds 10, BGP suppresses route iteration to the corresponding next hop.
Procedure
- Run system-view
The system view is displayed.
- Run bgp as-number
The BGP view is displayed.
- Enter the corresponding address family view based on network
type to configure BGP devices on networks.
Run ipv4-family unicast
The BGP-IPv4 unicast address family view is displayed.
Run ipv4-family vpnv4 [ unicast ]
The BGP-VPNv4 address family view is displayed.
Run ipv4-family vpn-instance vpn-instance-name
The BGP-VPN instance IPv4 address family view is displayed.
Run ipv6-family [ unicast ]
The BGP-IPv6 unicast address family view is displayed.
Run ipv6-family vpnv6 [ unicast ]
The BGP-VPNv6 address family view is displayed.
Run ipv6-family vpn-instance vpn-instance-name
The BGP-VPN instance IPv6 address family view is displayed.
- Run undo nexthop recursive-lookup restrain disable
BGP iteration suppression in case of next hop flapping is enabled.
If you do not care about whether the system is busy processing route selection and advertisement and the possible high CPU usage, run the nexthop recursive-lookup restrain disable command to disable BGP iteration suppression in case of next hop flapping.
- Run quit
Return to the BGP view.
- Run nexthop recursive-lookup restrain suppress-interval add-count-time hold-interval hold-count-time clear-interval clear-count-time
The intervals for increasing, retaining, and clearing the penalty value are configured for BGP iteration suppression in case of next hop flapping.
By default, the intervals for increasing, retaining, and clearing the penalty value for BGP iteration suppression in case of next hop flapping are 60s, 120s, and 600s, respectively.
- Run commit
The configuration is committed.