Technical Tip: Capture BGP debugs for a specific neighbor
| 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 debug console timestamp enable diagnose ip router bgp set-filter neighbor a.b.c.d <-- Replace a.b.c.d with neighbor address.
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.
When running debug commands without a filter, debug output for both neighbors will be shown:
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:
To show the current filter, run:
diagnose ip router bgp show
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 |




