Customer reported experiencing frequent OSPF neighbor flapping on a router that is directly connected to a switch.
No interface flaps were observed on either the MX or EX side; however, we could observe the neighbor going down with below message
Feb 3 17:06:07 labroot rpd[2849]: RPD_OSPF_NBRDOWN: OSPF neighbor 172.29.104.50 (realm ospf-v2 irb.5 area 0.0.0.0) state changed from Full to Down due to InActiveTimer (event reason: neighbor was inactive and declared dead)
Feb 5 22:03:30 labroot vrrpd[2850]: VRRPD_NEW_BACKUP: Interface irb.73 (local address 172.29.104.226) became VRRP backup for group 73
Feb 5 22:03:30 labroot vrrpd[2850]: VRRPD_NEW_BACKUP: Interface irb.72 (local address 172.29.104.194) became VRRP backup for group 72
Feb 5 22:03:31labroot rpd[2849]: RPD_OSPF_NBRDOWN: OSPF neighbor 172.29.104.50 (realm ospf-v2 irb.5 area 0.0.0.0) state changed from Full to Down due to InActiveTimer (event reason: neighbor was inactive and declared dead)
ospf {
area 0.0.0.0 {
interface ae0.0 {
interface-type p2p;
hello-interval 1;
dead-interval 4;
}
interface irb.5 {
when checked the OSPF configuration we could observe that the Hello interval is set to 1 second and the Dead interval is set to 4 seconds. In comparison, the default Juniper OSPF settings are 10 seconds Hello and 40 seconds Dead interval. These lower values make the OSPF process highly sensitive to packet loss or network latency, as even a single lost Hello packet can cause the neighbor to be declared down within 4 seconds, leading to frequent OSPF state changes.
After adjusting the hello and dead intervals accordingly issue fix and can enable BFD for the OSPF protocol, which can help stabilize the OSPF session