Information Technology Grimoire

Version .0.0.1

IT Notes from various projects because I forget, and hopefully they help you too.

Fortinet Network Troubleshooting

Fortinet NIC Details

CommandDescriptionGood vs Bad Result
get system interfaceLists interfaces and their statuses, useful for verifying BGP source interfaces.Good: Expected interfaces are up. Bad: BGP source interface is down.
get hardware nic <interface-name>Provides detailed information about a specific interface, such as packet statistics.Good: Interface is up with normal traffic. Bad: High error rates or down status.

General Fortinet Routing

CommandDescription
get router info routing-table allDisplays the entire routing table.
get router info routing-table detailsShows detailed information about routes in the routing table.
get router info routing-table databaseProvides information from the routing table database.
diag ip route listShows the current IP routing table with more details.

Network Troubleshooting Commands

CommandDescriptionDangerous
diag sniffer packet any 'host <IP> and port <PORT>' 4Captures and displays packet flow from/to the specified IP and port.Safe
diag debug flow show function-name enableEnables detailed flow debugging with function names.Safe
diag debug flow trace start 100Starts a debug flow trace for the next 100 packets.Safe
diag debug flow filter addr <IP>Sets a filter for debugging flows to/from a specific IP address.Safe
diag debug enableEnables debug messages.Safe
diag debug disableDisables debug messages.Safe
get system interfaceLists all interfaces with their statuses and IP addresses.Safe
diag hardware deviceinfo nic <interface-name>Shows detailed information about a specific network interface.Safe
exec ping <IP-address>Performs a ping test from the FortiGate unit to the specified IP address.Safe
exec traceroute <IP-address>Performs a traceroute from the FortiGate unit to the specified IP address.Safe
get hardware nic <interface-name>Displays statistics for a specific interface, including RX/TX packets and errors.Safe
diag netlink interface listLists all interfaces with detailed netlink information.Safe
diag sys topDisplays system processes and resource usage, helpful for identifying high CPU or memory usage impacting networking.Safe
get system arpDisplays the ARP table, showing mappings of IP addresses to MAC addresses.Safe
get router info mplsCheck MPLS status and configurations.Safe

Dangerous Fortinet Network Commands

CommandDescriptionDangerous
config system interfaceEnters interface configuration mode.Dangerous
edit <interface-name>Selects an interface to configure.Dangerous
set ip <IP-address>(Under interface config) Sets the IP address for the interface.Dangerous
set allowaccess ping http https ssh telnet(Under interface config) Configures the management access allowed on the interface.Dangerous
set status up(Under interface config) Enables the interface.Dangerous
set status down(Under interface config) Disables the interface.Dangerous

Fortinet BGP/Routing Show Commands

CommandDescriptionGood vs Bad Result
show router bgpDisplays the current BGP configuration.
config router bgpEnters the BGP configuration mode.
get router info bgp summaryDisplays a summary of BGP sessions, including state, number of prefixes received, and uptime.Good: State is “Established” with expected number of prefixes. Bad: State is not “Established”.
get router info bgp networksLists networks advertised by the BGP router.Good: Expected networks are listed. Bad: Missing networks or unexpected networks are present.
get router info bgp routesDisplays BGP routes in the routing table, showing paths, next hops, and metrics.Good: Routes and next hops are as expected. Bad: Missing routes or incorrect next hops.
get router info bgp neighborsShows detailed information about BGP neighbors/peers, including their AS numbers and session state.Good: State is “Established”. Bad: Frequent state changes or non-established state.
get router info bgp neighbors <neighbor-ip> advertised-routesLists the routes being advertised to a specific BGP neighbor.
get router info bgp neighbors <neighbor-ip> received-routesLists the routes received from a specific BGP neighbor.
diag ip bgp neighbors <peer-ip> advertised-routesShows routes advertised to a specific BGP neighbor.Good: Advertises correct routes to neighbor. Bad: Missing routes or advertising unexpected routes.
diag ip bgp neighbors <peer-ip> received-routesShows routes received from a specific BGP neighbor.Good: Receives expected routes from neighbor. Bad: Missing expected routes or receiving incorrect routes.
diag ip bgp neighbors <peer-ip>Provides detailed diagnostics for a specific BGP neighbor.Good: Stable connection with neighbor. Bad: Errors or unstable connection indicators.

Fortinet BGP/Routing Set Commands

CommandDescription
set network(Under BGP config) Specifies a network to advertise via BGP.
set neighbor(Under BGP config) Configures a BGP neighbor.
Last updated on 9 Feb 2024
Published on 9 Feb 2024