How to check the routing table on a Fortigate (CLI)

This is a quick reference guide detailing how to check the routing table on a Fortigate using the CLI.

1 – Log on using SSH

2 – View the full routing table

get router info routing-table all

This will output the full routing table

3 – Query a specific route

get router info routing-table details <route>

e.g.

Brierley-FW01 # get router info routing-table details 172.16.10.3

Routing table for VRF=0
Routing entry for 172.16.10.0/24
  Known via "connected", distance 0, metric 0, best
  * is directly connected, port2 distance 0


OR

Brierley-FW01 # get router info routing-table details 172.16.10.0/24

Routing table for VRF=0
Routing entry for 172.16.10.0/24
  Known via "connected", distance 0, metric 0, best
  * is directly connected, port2 distance 0

OR

Brierley-FW01 # get router info routing-table details 172.16.10.1/24

Routing table for VRF=0
Routing entry for 172.16.10.0/24
  Known via "connected", distance 0, metric 0, best
  * is directly connected, port2 distance 0


As you can see you can query the routing table using either the IP, if multiple routes are found then it will show all. The network and mask or ip and mask in slash format.

Thanks for reading

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s