Created on
‎08-02-2024
09:26 AM
Edited on
‎07-30-2025
02:15 AM
By
Anthony_E
Description | This article describes a list of debug commands for which the output should be captured when trying to solve routing issues. | ||||||||||||||||
Scope | FortiGate. | ||||||||||||||||
Solution |
Daemon(s):
Administrative Distances: Routing protocol: Default administrative distance. Direct physical connection 1.
General Debugs:
Static Routing:
get router info routing-table details x.x.x.x <----- Routing entry for x.x.x.x. Known via 'connected' or OSPF, etc.
Identify the source Interface for a particular IP Address:
get router info routing-table details 8.8.8.8 <----- Subnet. Routing table for VRF=0
The default static routing is configured for port1 and to the internet:
config router static show set dst 0.0.0.0 0.0.0.0
OSFP Routing:
get router info routing all <----- See all the directly connected routes, OSPF routes, BGP routes, etc. get router info ospf interface <- To view OSPF interface details get router info ospf status <- To view OSPF process status.
BGP Routing:
get router info bgp summary <- Verify BGP peering status, number of prefixes received/sent, and peering uptime. get router info routing-table bgp <- Get BGP active routing-table information (BGP routes in use by the unit. execute router clear bgp ip IP_ADDRS <- To clear the specific route to the IP address. execute router clear bgp as AS_Number <-To remove all routes for a specific AS number.
Troubleshooting:
Debugging OSPF LSAs:
Run these debug commands to check the LSA, as well as information on Hello/Dead Timers.
diagnose debug disable diagnose debug reset diagnose ip router ospf all enable
OSPF Sniffer:
A sniffer that can be used to troubleshoot OSPF issues.
diagnose sniffer packet any "proto 89" 3
Debugging BGP Hello/Dead Timers and more:
Run these debug commands to check information on Hello/DeadTimers and more.
diagnose debug disable diagnose debug reset
diagnose ip router bgp all enable
From v7.2.x onwards, filtering specific neighbors or VRF is possible :
diagnose ip router bgp set-filter vrf <vrf_id>
To reset or show the filter :
diagnose ip router bgp show
BGP Sniffer:
BGP uses port number 179. Run the sniffer on port 179 to analyze BGP Traffic:
diagnose sniffer packet any "port 179" 3
To check the routing entry in Zebos (kernel): Sometimes, it is also important to examine the ZebOS configuration if FortiOS is not parsing the routing configuration correctly into ZebOS.
diagnose ip router command show-vrf <vdom> <zebos command> |
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.