Routing is a critical function in FortiGate that ensures traffic is directed efficiently through the network. It includes basic static routes, advanced dynamic routing protocols, and modern SD-WAN features to optimize traffic flow.
Static Routing involves manually defining routes for traffic to specific destinations. It’s the simplest form of routing but lacks the flexibility of dynamic routing.
Default Route:
A route used when no specific route matches the destination. It typically points to the internet gateway.
Example Configuration:
config router static
edit 1
set dst 0.0.0.0/0
set gateway 192.168.1.254
next
end
Here, 0.0.0.0/0 means "all traffic," and the gateway is 192.168.1.254.
Destination-Specific Route:
Used for traffic to a particular network or host.
Example Configuration:
config router static
edit 2
set dst 10.0.0.0/24
set gateway 192.168.2.1
next
end
What is ECMP?
How to Configure ECMP:
Add multiple static routes with the same destination but different gateways:
config router static
edit 1
set dst 0.0.0.0/0
set gateway 192.168.1.254
set distance 10
next
edit 2
set dst 0.0.0.0/0
set gateway 192.168.2.254
set distance 10
next
end
FortiGate will load balance traffic across both gateways.
Dynamic Routing uses protocols to automatically adjust routes based on network changes. FortiGate supports OSPF and BGP, two widely used protocols.
Key Features:
Steps to Configure OSPF:
Define OSPF Areas:
config router ospf
set router-id 1.1.1.1
config area
edit 0.0.0.0
next
end
end
Enable OSPF on Interfaces:
config router ospf
config network
edit 1
set prefix 192.168.1.0/24
set area 0.0.0.0
next
end
end
Adjust OSPF Costs:
config system interface
edit "port1"
set ospf-cost 10
next
end
Key Features:
Steps to Configure BGP:
Define BGP Neighbors:
config router bgp
set as 65001
config neighbor
edit "192.168.1.2"
set remote-as 65002
next
end
end
65001 and 65002 are the AS numbers for local and remote devices.Advertise Networks:
config router bgp
config network
edit 1
set prefix 192.168.1.0/24
next
end
end
Apply Route Filters:
config router access-list
edit "filter1"
config rule
edit 1
set prefix 10.0.0.0/24
set action deny
next
end
next
end
SD-WAN (Software-Defined WAN) is a modern approach to routing, offering dynamic traffic management and link optimization.
What It Does:
Steps to Configure Load Balancing:
CLI Example:
config system sdwan
config members
edit 1
set interface "wan1"
next
edit 2
set interface "wan2"
next
end
end
Health-Check Rules:
FortiGate can monitor the health of WAN links and dynamically reroute traffic if a link fails.
Example Configuration:
config system sdwan
config health-check
edit "internet-check"
set server "8.8.8.8"
set interval 500
set failtime 3
set recoverytime 5
next
end
end
Here’s how routing features might be applied in a real-world scenario:
Routing ensures that data packets reach their destinations efficiently. Mastering static, dynamic, and SD-WAN routing allows you to design resilient and high-performance networks. Start with simple static routes and gradually explore dynamic protocols and SD-WAN for more advanced use cases.
Policy-Based Routing (PBR) allows you to override the routing table and direct traffic based on custom criteria such as:
Unlike regular routing, which chooses the path based on the destination IP and routing table, PBR gives control to the administrator to route traffic differently based on needs.
config router policy
edit 1
set input-device "port1"
set src 192.168.1.0 255.255.255.0
set dst 0.0.0.0 0.0.0.0
set gateway 10.10.10.1
set output-device "wan2"
next
end
This rule forces all traffic from 192.168.1.0/24 entering from port1 to use the gateway 10.10.10.1 through wan2, regardless of the default routing table.
Troubleshooting routing issues is an essential skill. These CLI commands help determine how FortiGate is making routing decisions and are commonly used in both real-world troubleshooting and exams.
View all routes:
get router info routing-table all
List current active routes (kernel routing table):
diagnose ip route list
Trace the path to a destination:
execute traceroute <destination-ip>
Check OSPF neighbor status:
get router info ospf neighbor
Check BGP peer and route status:
get router info bgp summary
You may get questions such as:
“Which command shows whether FortiGate has learned a specific route via OSPF?”
Correct answer: get router info ospf neighbor (or specific route checks via the routing table)
Administrative Distance (AD) determines the priority of a route when multiple routing protocols provide paths to the same destination.
| Route Type | Default AD (Lower = Higher Priority) |
|---|---|
| Directly Connected | 0 |
| Static Route | 10 |
| eBGP | 20 |
| OSPF | 110 |
| iBGP | 200 |
If a route to 10.0.0.0/24 exists in both OSPF and static routes:
config router static
edit 1
set dst 10.0.0.0/24
set gateway 192.168.1.1
set distance 5
next
end
This overrides the default static route preference, giving it the highest priority.
A BGP route map is used to filter, modify, or influence routing updates. It's FortiGate's way of controlling which routes are advertised or accepted, and how they're treated (e.g., modifying attributes like local preference or MED).
config router prefix-list
edit "BLOCKED-PREFIX"
config rule
edit 1
set prefix 10.0.0.0/24
set ge 24
set le 24
next
end
next
end
config router route-map
edit "BLOCK-NET"
config rule
edit 1
set match-ip-address "BLOCKED-PREFIX"
set action deny
next
end
next
end
config router bgp
config neighbor
edit "192.168.1.2"
set route-map-out "BLOCK-NET"
next
end
end
| Topic | Purpose | Exam Relevance |
|---|---|---|
| Policy-Based Routing | Override route table using traffic policies | High (real-world + exam use) |
| Routing Diagnostics | Command-line tools to trace and validate routing decisions | Very High |
| Route Preference & AD | Determines which route is preferred | High (common trick questions) |
| BGP Route Maps | Filter or modify advertised/received routes | Medium (bonus points topic) |
How can a static route be selected as valid in the routing table but still not get installed into the FIB?
Because being the preferred route in the RIB does not always guarantee successful installation into the forwarding table.
This is a subtle but very exam-relevant routing scenario. Fortinet published a troubleshooting article specifically about routes that appear valid in the routing database but never make it into the FIB. Operationally, that means the control plane likes the route, but the dataplane cannot use it as installed. The correct next step is to verify interface state, recursive resolution, and whether another condition prevents hardware/software forwarding from programming the route. Candidates often stop at “the route exists,” but the right mindset is to validate both RIB and FIB. That distinction matters because packets follow the forwarding result, not your assumption based on a config line. In exam terms, the strongest answer shows that you understand route selection and actual forwarding are related but separate stages.
Demand Score: 82
Exam Relevance Score: 90
When both policy routes and SD-WAN rules exist, which one is evaluated first?
Policy routes are checked before SD-WAN rules during route selection for matching traffic.
This exact confusion appears in community discussions, and the answer matters because many troubleshooting mistakes start from the wrong lookup order. Fortinet guidance cited in those discussions states that FortiOS evaluates policy routes first; only if no policy route matches does traffic continue into the broader routing and SD-WAN decision process. Fortinet’s route-lookup explanation also reinforces that FortiGate performs route lookups systematically rather than “trying everything at once.” The practical consequence is that a broad policy route can override what an engineer expected SD-WAN to do. On the exam, the best answer is not merely the order itself, but the implication: if traffic is taking the wrong exit, inspect policy routing first before blaming SD-WAN health checks or rule priority. That troubleshooting order saves a lot of time.
Demand Score: 79
Exam Relevance Score: 94
If I have both BGP and a static route to the same destination over IPsec, why does the static route keep winning and prevent failover?
Because FortiGate prefers routes based on route-selection rules, and a still-valid static route can remain preferred over BGP until its conditions change.
Admins repeatedly ask how to make BGP “take over” when a static route remains present for the same destination. Community threads show the operational symptom clearly: traffic keeps following the static entry, so failover never behaves the way the engineer expects. The lesson is that dynamic routing does not automatically override a valid static route just because BGP has learned a path. You must design the routing policy so the preferred path changes when the underlying condition changes, instead of leaving a permanent static entry that stays installable. On the exam, the strongest answer is conceptual: do not treat BGP as magic failover if a more preferred static route is still viable. Understand route preference, installation state, and failure detection together.
Demand Score: 74
Exam Relevance Score: 88