← Back to knowledge base
mediumRouting (BGP/OSPF/Static)

Troubleshooting FortiGate routing path and gateway selection

Confirmed 8/3/2026

Problem

Traffic may use an incorrect gateway or interface when routes for specific destination networks are missing or configured with the wrong distance or priority. Routing decisions depend on the destination segment and its associated gateway. For example: - `0.0.0.0/0` uses the ISP router. - `10.10.10.0/24` uses MPLS. - `20.20.20.0/24` uses VPN1. - `30.30.30.0/24` uses VPN2.

Symptoms

Traffic does not reach the destination, exits through an unexpected interface, receives no reply, or returns through a different gateway. The example flow uses source `172.168.0.100` and destination `10.10.10.16`, which should traverse the MPLS interface in both directions.

Environment

FortiGate with static routes and multiple possible paths, such as an ISP router, MPLS, VPN1, and VPN2.

Root Cause

Possible causes include an incorrect destination segment or subnet, a missing or incorrect static route, unsuitable route distance or priority, an unreachable peer gateway, or missing/asymmetric routing on the peer. If FortiGate forwards traffic through the correct gateway but the peer does not reply or returns traffic through another gateway, the problem is on the peer-side routing path rather than FortiGate.

Solution

  1. Open Network -> Static Route in the FortiGate GUI.

  2. Confirm that every destination network is associated with the intended gateway and interface. Add missing entries or remove incorrect entries as necessary. In the example, 10.10.10.0/24 must be reachable through MPLS.

  3. Check whether 10.10.10.0/24 is installed in the routing table:

get router info routing-table all | grep 10.10.10.0/24

Alternatively, display the entire routing table:

get router info routing-table all
  1. Start a packet sniffer for ICMP traffic involving 10.10.10.16:
diag sniffer packet any 'host 10.10.10.16 and icmp' 4 0
  1. From source 172.168.0.100, ping destination 10.10.10.16 and inspect the ingress and egress interfaces. A successful symmetric flow appears as follows:
interfaces=[any]
filters=[host 172.168.0.100 and host 10.10.10.16 and icmp]
11.097441 lan in 172.168.0.100 -> 10.10.10.16: icmp: echo request
11.097557 MPLS out 192.168.244.136 -> 10.10.10.16: icmp: echo request
11.129438 MPLS in 10.10.10.16 -> 192.168.244.136: icmp: echo reply
11.129477 lan out 10.10.10.16 -> 172.168.0.100: icmp: echo reply
12.102049 lan in 172.168.0.100 -> 10.10.10.16: icmp: echo request
12.102085 MPLS out 192.168.244.136 -> 10.10.10.16: icmp: echo request
12.133505 MPLS in 10.10.10.16 -> 192.168.244.136: icmp: echo reply
12.133531 lan out 10.10.10.16 -> 172.168.0.100: icmp: echo reply
13.109669 lan in 172.168.0.100 -> 10.10.10.16: icmp: echo request
13.109708 MPLS out 192.168.244.136 -> 10.10.10.16: icmp: echo request
13.147746 MPLS in 10.10.10.16 -> 192.168.244.136: icmp: echo reply
13.147773 lan out 10.10.10.16 -> 172.168.0.100: icmp: echo reply
14.114213 lan in 172.168.0.100 -> 10.10.10.16: icmp: echo request
14.114249 MPLS out 192.168.244.136 -> 10.10.10.16: icmp: echo request
14.138062 MPLS in 10.10.10.16 -> 192.168.244.136: icmp: echo reply
14.138096 lan out 10.10.10.16 -> 172.168.0.100: icmp: echo reply
  1. Review each complete ping as a four-packet flow. The 11.xxxxxx, 12.xxxxxx, 13.xxxxxx, and 14.xxxxxx timestamp groups each represent one ping. The expected direction is:

    • Request: LAN(in) to MPLS(out).
    • Reply: MPLS(in) to LAN(out).
  2. If FortiGate selects the wrong path, correct the route, distance, or priority as appropriate.

  3. Verify that the destination segment and subnet are correct.

  4. Confirm that the FortiGate interface can reach the peer gateway. Set the ping source to the relevant interface IP:

Exe ping-options source <interfaceIP>
  1. Check that the peer device has a route back to FortiGate. A request leaving through MPLS(out) but a reply arriving through VPN1(in) is asymmetric and incorrect for this example; the reply should return through MPLS. If FortiGate sends traffic to the correct gateway but receives no response or the response uses another gateway, troubleshoot routing on the peer.

Verification

Confirm that 10.10.10.0/24 appears in the routing table through the intended path. In the packet sniffer, requests from 172.168.0.100 to 10.10.10.16 must enter on LAN and leave on MPLS, while replies must enter on MPLS and leave on LAN. Four lines should be visible for each successful ping: inbound request, outbound request, inbound reply, and outbound reply.

Tags

No tags yet.

Community rating

/ 5 (0)

Discussion (0)

    No comments yet.