FortiGate
FortiGate Next Generation Firewall utilizes purpose-built security processors and threat intelligence security services from FortiGuard labs to deliver top-rated protection and high performance, including encrypted traffic.
asoni
Staff
Staff
Article Id 352981
Description This article describes how to run BGP debugs for a specific neighbor when multiple BGP neighbors are configured.
Scope FortiOS v7.2.x and above.
Solution

When multiple BGP neighbors are configured and it is required to focus only on a specific neighbor, the following filter command can be used along with other BGP debug commands:

 

diagnose ip router bgp all enable
diagnose ip router bgp level info

diagnose debug console timestamp enable

diagnose ip router bgp set-filter neighbor a.b.c.d  <-- Replace a.b.c.d with neighbor address.
diagnose debug enable

 

Note:

Starting from v7.2.0+, it is possible to collect BGP debugs for a specific neighbor by using the filter command

'diag ip router bgp set-filter neighbor <neighbor address>'. Follow this KB article for more details: Technical Tip: Capture BGP debugs for a specific neighbor

 

In the following example, FortiGate is configured with two BGP neighbors - i.e, 192.168.1.190 and 192.168.1.191.

 

BGP summary.JPG

 

When running debug commands without a filter, debug output for both neighbors will be shown:

 

BGP debug without filter.JPG

 

When running debug commands with a filter, it is possible to only capture output / filter BGP debug for a specified neighbor, i.e, 192.168.1.191:

 

BGP debug with filter.JPG

 

To show the current filter, run:

 

   diagnose ip router bgp show

 

Screenshot 2025-01-11 143850.png

 

To reset the BGP filter:

 

   diagnose ip router bgp set-filter reset

 

To disable BGP debugs: 

 

diagnose ip router bgp all disable

diagnose ip router bgp level none

diagnose debug reset

diagnose debug disable