This article explains the possible cause for Bidirectional Forwarding Directions (BFD) sessions to flap continuously on vMX routers that are running in Lite mode, and provides the solution and a couple of workarounds to resolve the issue.
Note: This issue is seen on vMX routers that are running Junos OS release prior to Junos OS 18.x.
On vMX routers that are running Junos OS versions prior to release 18.x with vFPC in Lite mode, BFD sessions that are configured for Border Gateway Protocol (BGP) or static routes are seen to be flapping constantly.
In packet captures that are taken on hypervisor, we can see that the packets are indeed sent irregularly and in spikes:
15:20:39.357889 IP 172.16.16.240.49152 > 172.16.16.241.3784: BFDv1, Control, State Up, Flags: [Control Plane Independent], length: 24
15:20:39.892924 IP 172.16.16.241.49152 > 172.16.16.240.3784: BFDv1, Control, State Up, Flags: [Control Plane Independent], length: 24
15:20:40.367751 IP 172.16.16.240.49152 > 172.16.16.241.3784: BFDv1, Control, State Up, Flags: [Control Plane Independent], length: 24
15:20:40.892873 IP 172.16.16.241.49152 > 172.16.16.240.3784: BFDv1, Control, State Up, Flags: [Control Plane Independent], length: 24
15:20:41.892912 IP 172.16.16.241.49152 > 172.16.16.240.3784: BFDv1, Control, State Up, Flags: [Control Plane Independent], length: 24
15:20:42.892920 IP 172.16.16.241.49152 > 172.16.16.240.3784: BFDv1, Control, State Up, Flags: [Control Plane Independent], length: 24
15:20:43.471083 IP 172.16.16.240.49152 > 172.16.16.241.3784: BFDv1, Control, State Up, Flags: [Control Plane Independent], length: 24
15:20:43.471085 IP 172.16.16.240.49152 > 172.16.16.241.3784: BFDv1, Control, State Up, Flags: [Control Plane Independent], length: 24
15:20:43.570355 IP 172.16.16.240.49152 > 172.16.16.241.3784: BFDv1, Control, State Up, Flags: [Control Plane Independent], length: 24
15:20:45.442934 IP 172.16.16.241.49152 > 172.16.16.240.3784: BFDv1, Control, State Down, Flags: [Control Plane Independent], length: 24
15:20:45.780508 IP 172.16.16.240.49152 > 172.16.16.241.3784: BFDv1, Control, State Up, Flags: [Control Plane Independent], length: 24
15:20:47.442939 IP 172.16.16.241.49152 > 172.16.16.240.3784: BFDv1, Control, State Down, Flags: [Control Plane Independent], length: 24
15:20:49.442948 IP 172.16.16.241.49152 > 172.16.16.240.3784: BFDv1, Control, State Down, Flags: [Control Plane Independent], length: 24
15:20:49.646820 IP 172.16.16.240.49152 > 172.16.16.241.3784: BFDv1, Control, State Init, Flags: [Control Plane Independent], length: 24
Prior to Junos OS release 18.x, when vMX routers are run in Lite mode with low packet rates, there is a possibility that the I/O ring might get full before a worker is woken up. So the BFD packets are dropped or sent out at non-regular intervals.
This issue has been resolved in Junos OS Release 18.1R1.
Meanwhile, two workarounds are possible:
OR
set routing-option ppm no-delegate-ppm