FortiGate route selection explainer

Give a destination and a set of routes and see which install, which is selected, and which are floating backups absent from the forwarding table.

Networking

Runs entirely in your browser. Nothing is uploaded.

How FortiOS selects a route

  • A policy route is consulted BEFORE the routing table and overrides it. If the table says one thing and traffic does another, look for a policy route first — this tool models the table, not policy routes.
  • DISTANCE decides which route is INSTALLED. Routes to the same destination compete, the lowest distance wins, and the loser is absent from the table rather than merely deprioritised.
  • PRIORITY decides which of several ALREADY-INSTALLED routes is preferred. It never resurrects a route that lost on distance.
  • Same prefix and same distance means both install and priority chooses. Different distances means one installs and the other is a floating backup.
  • Forwarding takes the LONGEST matching prefix among installed routes. True ties on prefix, distance and priority are load shared by ECMP.
  • destination: 10.2.5.10
  • route: prefix=0.0.0.0/0, gw=192.0.2.1, dev=wan1, distance=10, priority=0
  • route: prefix=10.2.0.0/16, gw=10.1.1.1, dev=port3, distance=10, priority=0
API endpointGEThttps://ronutz.com/api/v1/fortigate-route-selection-explainerDocumented, not served. Opens the specification.

References