referenceFortinet

FortiGate get router info routing-table all

Jump to content ↓

Display the active FortiGate routing table and interpret connected, static, dynamic, and default routes during connectivity troubleshooting.

intermediaterisk: noneFreshFortiOS 7.4
Last verified 2026-09-17 · Next review 2027-03-16
FortinetFortiGatereference
01Before you run this

Read-only or non-disruptive in normal use. Validate the target context before relying on the output.

02Applies to

FortiGate · FortiOS · 7.4

When to use this content

Use this reference when you need to inspect, validate or explain the current state of FortiGate during operational troubleshooting.

Technical article

Overview

get router info routing-table all displays the routes currently installed in the FortiGate routing table for the active VDOM.

It is one of the first commands to use when a FortiGate receives traffic but appears to forward it toward the wrong interface, gateway, or VPN tunnel.

Command

bash
get router info routing-table all

What it does

The command shows active routes from sources such as:

  • Connected networks
  • Static routes
  • RIP
  • OSPF
  • BGP
  • IS-IS

It also identifies the candidate default route.

The exact codes displayed can depend on enabled routing protocols and FortiOS version.

When to use it

Use this command when:

  • A destination is unreachable.
  • Traffic exits the wrong WAN interface.
  • A VPN is up but the remote subnet is not reachable.
  • A new static route does not appear to be active.
  • You suspect a more-specific route is overriding another route.
  • You need to confirm the active default gateway.
  • You need to identify whether a network is directly connected or learned dynamically.

Example output

text
S*      0.0.0.0/0 [10/0] via 192.0.2.1, wan1
C       10.1.10.0/24 is directly connected, VLAN10
S       10.2.20.0/24 [10/0] via IPSEC-SITE2 tunnel 198.51.100.10
O       10.3.30.0/24 [110/20] via 10.1.10.2, VLAN10

How to read common route codes

C - Connected

The subnet exists directly on a FortiGate interface.

text
C 10.1.10.0/24 is directly connected, VLAN10

This normally means an interface in that VDOM has an address belonging to the subnet.

S - Static

The route was configured statically.

text
S 10.2.20.0/24 [10/0] via IPSEC-SITE2 tunnel 198.51.100.10

O - OSPF

The route was learned through OSPF.

B - BGP

The route was learned through BGP.

* - Candidate default

A route marked with * is a candidate default route.

A common example is:

text
S* 0.0.0.0/0 [10/0] via 192.0.2.1, wan1

Administrative distance and metric

Routes commonly display values in brackets such as:

text
[10/0]

The first value represents administrative distance. The second is the metric used by the routing protocol or route type where applicable.

Do not compare routes only by administrative distance. Route selection begins with prefix specificity: a more-specific route can take precedence over a broader route.

For example:

text
10.1.10.0/24
10.1.10.0/26

Traffic for 10.1.10.20 matches both prefixes, but /26 is more specific and is therefore the relevant route before administrative distance becomes a deciding factor between equal-length candidates.

VDOM consideration

When VDOMs are enabled, routing commands must be executed in the relevant VDOM context.

If a route appears to be missing, verify that you are not looking at a different VDOM's routing table.

Troubleshooting workflow

1. Find the destination prefix

For a destination such as:

text
10.2.20.15

identify all table entries that could match the address.

2. Identify the most-specific route

Check for overlapping routes with longer prefixes.

Example:

text
10.2.20.0/24
10.2.20.0/26

The /26 route covers addresses from 10.2.20.0 through 10.2.20.63 and will be more specific for those destinations.

3. Check gateway or outgoing interface

Confirm that the selected next hop or tunnel is the intended path.

4. Compare with packet evidence

Use:

bash
diagnose sniffer packet any 'host 10.2.20.15' 4 0 l

If FortiGate is selecting an unexpected path, use debug flow to see the route decision in packet processing.

How to validate

A routing check is complete when you can identify:

  • The most-specific route for the destination.
  • The route source.
  • The outgoing interface or tunnel.
  • The next-hop gateway where applicable.
  • Whether another overlapping route could change the result for part of the address space.

Risks and considerations

This is a read-only diagnostic command and does not modify routing state.

The risk comes from misinterpreting the table rather than from executing the command.

Common interpretation errors include:

  • Ignoring longer-prefix routes.
  • Looking in the wrong VDOM.
  • Assuming a configured route must be active.
  • Confusing routing with firewall-policy permission.

A correct route does not prove that a firewall policy permits the traffic.

  • FortiGate debug flow
  • FortiGate packet sniffer
  • FortiGate execute ping
  • FortiGate IPsec tunnel established but no traffic

Sources

See the authoritative Fortinet references in the article metadata.

Guided learning

This article is part of a path

FortinetFortiGate Traffic TroubleshootingStep 3/6 · next: Observe the packets
View path →
Technical path

Knowledge graph

Explicit editorial relationships across prerequisites, commands, troubleshooting, Labs and next steps.

Knowledge quality

Did this article help you solve the problem?

Each account can vote once per article. You can change your vote without increasing the total count.