Created on 06-06-2018 09:37 AM Edited on 09-25-2024 02:05 AM By Jean-Philippe_P
Description
Solution
The BFD timer variables are only available when BFD is enabled. They can be configured at global or interface level:
Example configured on two Fortigates running firmware version 5.4:
Fortigate_A.
config sys settings
set bfd-desired-min-tx 1000
set bfd-required-min-rx 50000
set bfd-detect-mult 2
Fortigate_B.
config sys settings
set bfd-desired-min-tx 10000
set bfd-required-min-rx 50000
set bfd-detect-mult 2
Both bfd-desired-min-tx values satisfies bfd-required-min-rx of 50000ms.
Enable debugging:
diagnose ip router bfd all en
diagnose ip router bfd level info
diagnose debug enable
As of FortiOS 6.0, debugging is enabled by running the commands:
diagnose debug app bfdd -1
diagnose debug enable
Example of debug output:
2018-01-30 11:14:19 id=20301 logdesc="Routing log" msg="NSM: Session[10.151.1.44:10.151.1.75,port2,28]: Sending BFD packet"
2018-01-30 11:14:38 id=20301 logdesc="Routing log" msg="NSM: Session[10.151.1.44:10.151.1.75,port2,28]: Inactivity timer expired"
2018-01-30 11:14:38 id=20301 logdesc="Routing log" msg="NSM: Session[10.151.1.44:10.151.1.75,port2,28]: state UP -> DOWN local_diag=0x01"
2018-01-30 11:14:38 id=20301 logdesc="Routing log" msg="NSM: BFD session[10.151.1.44:10.151.1.75,port2,28]: state UP -> DOWN local_diag=0x01"
2018-01-30 11:14:38 id=20301 logdesc="Routing log" msg="NSM: Session[10.151.1.44:10.151.1.75,port2,28]: bfd_session_send_packet_now"
2018-01-30 11:14:38 id=20301 logdesc="Routing log" msg="NSM: BFD: Sending notification to protocol-id 4 client-type 8"
2018-01-30 11:14:38 id=20301 logdesc="Routing log" msg="NSM: BFD register message"
2018-01-30 11:14:38 id=20301 logdesc="Routing log" msg="NSM: Source Address: 10.151.1.44"
2018-01-30 11:14:38 id=20301 logdesc="Routing log" msg="NSM: Destination Address: 10.151.1.75"
2018-01-30 11:14:38 id=20301 logdesc="Routing log" msg="NSM: Interface index: 4"
2018-01-30 11:14:38 id=20301 logdesc="Routing log" msg="NSM: Flags: Delete"
2018-01-30 11:14:38 id=20301 logdesc="Routing log" msg="NSM: Client: OSPF"
Sample of FortiGate router log:
To sniff BFD packets:
diagnose sniffer packet any "udp port 3784" 6 0 a
Sample BFD packets seen with packet decoder:
The Fortinet Security Fabric brings together the concepts of convergence and consolidation to provide comprehensive cybersecurity protection for all users, devices, and applications and across all network edges.
Copyright 2025 Fortinet, Inc. All Rights Reserved.