OSPF neighbor relationship flapping suppression works by delaying OSPF neighbor relationship reestablishment or setting the link cost to the maximum value.
If an interface carrying OSPF services alternates between Up and Down, OSPF neighbor relationship flapping occurs on the interface. During the flapping, OSPF frequently sends Hello packets to reestablish the neighbor relationship, synchronizes LSDBs, and recalculates routes. In this process, a large number of packets are exchanged, adversely affecting neighbor relationship stability, OSPF services, and other OSPF-dependent services, such as LDP and BGP. OSPF neighbor relationship flapping suppression can address this problem by delaying OSPF neighbor relationship reestablishment or preventing service traffic from passing through flapping links.
Before configuring OSPF neighbor relationship flapping suppression, complete the following tasks:
system-view
The system view is displayed.
By default, OSPF neighbor relationship flapping suppression is enabled globally. To disable this function globally, run the suppress-flapping peer disable command.
interface interface-type interface-number
The interface view is displayed.
By default, OSPF neighbor relationship flapping suppression is enabled on all interfaces in the same OSPF process. To disable the function from one of the interfaces, run the ospf suppress-flapping peer disable command.
ospf suppress-flapping peer hold-down interval
The Hold-down mode is configured, and its duration is set.
Flapping suppression works in either Hold-down or Hold-max-cost mode.
Flapping suppression can also work first in Hold-down mode and then in Hold-max-cost mode.
By default, the Hold-max-cost mode takes effect.
To set duration for the Hold-max-cost mode or disable this mode, run the ospf suppress-flapping peer hold-max-cost disable command.
ospf suppress-flapping peer { detecting-interval detecting-interval | threshold threshold | resume-interval resume-interval } *
Detection parameters are configured for OSPF neighbor relationship flapping suppression.
Each OSPF interface on which OSPF neighbor relationship flapping suppression is enabled starts a flapping counter. If the interval between two successive neighbor status changes from Full to a non-Full state is shorter than detecting-interval, a valid flapping_event is recorded, and the flapping_count increases by 1. When the flapping_count reaches or exceeds threshold, flapping suppression takes effect. If the interval between two successive neighbor status changes from Full to a non-Full state is longer than resume-interval, the flapping_count is reset.
By default, the detection interval of OSPF neighbor relationship flapping suppression is 60s, the suppression threshold is 10, and the interval for exiting from suppression is 120s. Using the default detection parameters is recommended.
quit
The system view is displayed.
quit
The user view is displayed.
reset ospf process-id suppress-flapping peer [ interface-type interface-number ] [ notify-peer ]
Interfaces are forced to exit from OSPF neighbor relationship flapping suppression.
Interfaces exit from flapping suppression in the following scenarios:
Run the display ospf [ process-id ] interface interface-type interface-number verbose command to check the status of OSPF neighbor relationship flapping suppression.
<sysname> display ospf interface GigabitEthernet 0/0/0 verbose
OSPF Process 1 with Router ID 1.1.1.2
Interfaces
Interface: 10.0.0.2 (GigabitEthernet 0/0/0)
Cost: 1 State: DR Type: Broadcast MTU: 1500
Priority: 1
Designated Router: 10.0.0.2
Backup Designated Router: 10.0.0.1
Timers: Hello 10 , Dead 40 , Poll 120 , Retransmit 5 , Transmit Delay 1
IO Statistics
Type Input Output
Hello 161367 10436
DB Description 18 18
Link-State Req 5 6
Link-State Update 203780 210
Link-State Ack 90411 276
ALLSPF GROUP
ALLDR GROUP
OpaqueId: 1 PrevState: BDR
Effective cost: 1, enabled by OSPF Protocol.
Link quality adjust cost: No, link quality: 0x0(GOOD).
Support PST: YES Support Remote LFA: YES
Suppress flapping peer: enable(flapping-count: 0, threshold: 20)
Suppress flapping peer in the command output indicates the current suppression mode (Hold-down), time when the flapping suppression started, and the remaining time of the flapping suppression.