Why this matters — the airport visa queue
Picture the immigration counter at Bangalore airport. Five queues feed one officer. Diplomatic-status passengers go first — the officer waves them through without checking the regular queue. Then the standard queue (most of us). Walk-ins (last-minute boarding) come after. And finally, if you have no ticket at all, you join the any-flight-will-do default queue near the gate. That's exactly how a FortiGate picks where a packet goes.
Five lookup tiers, walked top-to-bottom: policy route → static → dynamic (OSPF/BGP) → SD-WAN rule → default route. First match wins, evaluation stops. Get this one sentence right and the next 10 minutes of the interview belong to you.
Karan (L3 network engineer, 6 years in) designs dual-DC routing for a Tier-1 banking client. DC1 in Mumbai (FortiGate 10.60.0.1), DC2 in Hyderabad (10.70.0.1), OSPF area-0 backbone between them, plus an eBGP session to the ISP (203.0.113.50, AS 65001) for internet underlay. Branch traffic from 10.60.10.5 destined to the core banking VLAN in DC2 keeps taking the wrong path during failover.
Karan's first instinct: "OSPF should pick the best link." Wrong start point. FortiGate doesn't even reach OSPF until policy-route and static lookups fail. A stale policy route written six months ago was steering 10.60.10.0/24 out the secondary ISP — bypassing OSPF entirely. He fixed it in 8 minutes once he walked the order. We'll see the exact command at the end.
The four words an interviewer wants to hear
Behind the waterfall sit four concepts that decide ties: distance, priority, metric, and administrative selection. Distance picks which table wins when the same prefix exists in multiple sources. Priority picks the winner inside the static table when two routes share the same distance — most engineers don't know this exists and that's the L3-grade trap. Metric is the cost the protocol itself uses (OSPF cost, BGP MED). Administrative selection covers ISDB / SD-WAN tie-breakers.
Manually configured next-hop for a prefix. Default distance 10. Use for point-to-point known paths (DC-to-DC VPN tunnel, ISP next-hop). Set priority to break ties without changing distance.
Steer by source / incoming intf / port — runs BEFORE the static table. Use to send "guest WiFi 10.99.0.0/24" out a different ISP. So what: a forgotten policy route silently breaks SD-WAN.
Internet Service Database route — steer "Salesforce" or "Office365" by app identity instead of subnet. Lives inside the policy-route table. So what: traffic to known SaaS bypasses normal lookup.
IGP. Link-state. Areas (0 = backbone), LSAs, SPF Dijkstra. Default distance 110. Fast convergence inside one AS. Needs matching MTU + Hello/Dead. So what: intra-DC + intra-WAN best friend.
EGP. Path-vector. AS_PATH + LOCAL_PREF + MED decide. eBGP dist=20, iBGP dist=200. Slow convergence (default keepalive 60s / hold 180s). So what: ISP peering and SD-WAN overlay/underlay.
Static route to Null0 — silently drop traffic to a prefix. Use as anti-failover trap (kill leaked routes during failover testing) or to absorb DDoS-targeted IPs upstream.
Walking a packet — Karan's banking DC flow
Theory dies the moment you trace one real packet. Karan's branch user sits at 10.60.10.5; the core banking VLAN at DC2 lives on 10.70.20.0/24. Between them: FortiGate DC1 (10.60.0.1, OSPF area-0 ABR) and FortiGate DC2 (10.70.0.1). Here's the walk.
Before you scroll — if Karan adds a static route 10.70.20.0/24 → 10.55.0.1 with distance 10 (default) and OSPF is already advertising the same prefix at distance 110, which table wins, and why?
get router info ospf database) but it sits inactive in the routing table because the static beat it. To force OSPF, raise the static's distance above 110 (set distance 120) — then OSPF becomes the active route and static is the backup.
Riya at an Indian enterprise Pune sees two static default routes on her FortiGate: 0.0.0.0/0 → 203.0.113.1 (distance 10, priority 0) and 0.0.0.0/0 → 198.51.100.1 (distance 10, priority 5). Both are up. Which one is active in the routing table?
Real config — static + policy route on Karan's FG
Here's the exact CLI Karan keeps in his runbook for new DC builds.
config router static
edit 1
set dst 10.70.20.0 255.255.255.0
set gateway 10.99.0.2
set device "to-DC2-VPN"
set distance 10
set priority 0
set comment "Primary path to DC2 core banking VLAN"
next
edit 2
set dst 10.70.20.0 255.255.255.0
set gateway 10.99.1.2
set device "to-DC2-MPLS"
set distance 10
set priority 5
set comment "Backup path — wins only if Route 1 goes down"
next
edit 99
set dst 10.55.99.0 255.255.255.0
set blackhole enable
set comment "Anti-leak — drop test traffic during failover drills"
next
end
config router policy
edit 1
set input-device "port5"
set src "10.60.99.0/24"
set dst "0.0.0.0/0"
set protocol 0
set output-device "wan2"
set gateway 198.51.100.1
set comment "Guest WiFi out the secondary ISP"
next
end
Codes: K - kernel, C - connected, S - static, R - RIP, O - OSPF, IA - OSPF inter-area
B - BGP, * - candidate default, ia - SR isis-A, V - BGP VPNv4
S* 0.0.0.0/0 [10/0] via 203.0.113.1, wan1
C 10.60.0.0/24 is directly connected, port5
S 10.55.99.0/24 [10/0] is a summary, Null0 ← blackhole route
S 10.70.20.0/24 [10/0] via 10.99.0.2, to-DC2-VPN
O IA 10.70.30.0/24 [110/30] via 10.99.0.2, to-DC2-VPN, 04:12:35
B 203.0.114.0/24 [20/0] via 203.0.113.50, wan1, 02:08:17
Policy route runs BEFORE SD-WAN lookup. A stray policy route — say, written six months ago to test a guest subnet — makes your beautifully-tuned SD-WAN rules look broken. The packet matches Tier 1, gets steered out the wrong WAN, and never reaches Tier 4. Always run get router info policy-route as your first SD-WAN debug step.
Aman at an Indian IT services firm Bangalore wires up SD-WAN with two ISPs (wan1, wan2) and a "send Office365 over wan2" SLA rule. The rule's health check is green but Office365 still egresses wan1. He runs get router info routing-table all — wan2 default is there. What does he run next?
OSPF — the IGP every interviewer drills
OSPF is FortiGate's default workhorse for intra-AS routing — campus, DC-to-DC over IPsec, multi-site WAN. Three things separate someone who has READ about OSPF from someone who has run it: areas, LSA types, and the neighbor state machine. Get all three on the whiteboard in 90 seconds and you've cleared an L2 round.
FortiGate OSPF sits at distance 110 by default. Areas scope flooding — Area 0 (backbone) glues everything together; non-zero areas (1, 2, …) connect through ABRs. LSAs are the protocol's payload — flood them to identical topology databases on every router in the area, then SPF (Dijkstra) computes shortest paths.
The OSPF neighbor state machine — and the EXSTART trap
OSPF doesn't just "come up." It walks 7 states: Down → Init → 2-Way → ExStart → Exchange → Loading → Full. Most candidates stop at "Full = good." The L3-grade question is: where do tunnels get stuck, and why? Answer: EXSTART, almost always because of MTU mismatch.
▶ OSPF neighbor state machine — Down → Full
Watch what happens when Karan brings up OSPF area-0 between FG DC1 and FG DC2 over their IPsec tunnel.
get router info routing-table all with code O.
Real config — OSPF area-0 between Karan's DC FortiGates
config router ospf
set router-id 10.60.0.1
config area
edit 0.0.0.0
next
end
config network
edit 1
set prefix 10.60.0.0 255.255.255.0
set area 0.0.0.0
next
edit 2
set prefix 10.99.0.0 255.255.255.0
set area 0.0.0.0
next
end
config interface
edit "to-DC2-VPN"
set hello-interval 10
set dead-interval 40
set mtu 1400
set mtu-ignore enable
next
end
end
OSPF process 0, VRF 0: Neighbor ID Pri State Dead Time Address Interface 10.70.0.1 1 Full/ - 00:00:35 10.99.0.2 to-DC2-VPN
FortiOS uses distance for which protocol wins (static 10, OSPF 110, eBGP 20, iBGP 200). But when distance matches between two static routes, priority breaks the tie — and lower priority wins. Most engineers never set priority, so all routes default to 0 and ECMP kicks in. If you want a clean primary/backup with same distance, give the backup a higher priority (e.g. 5).
Pooja at an Indian IT services firm Hyderabad brings up OSPF between two FortiGates over a fresh IPsec tunnel. get router info ospf neighbor shows the peer stuck in EXSTART/DR indefinitely. What's the most likely fix?
set mtu 1400 on both) or enable mtu-ignore. Option a affects cost calculations, not adjacency. Option c can mask the symptom but doesn't fix the root cause. Option d does nothing — the issue is symmetrical.BGP — when SD-WAN underlay meets ISP peering
BGP is where Karan's design earns its money. The bank uses BGP to peer with two ISPs (AS 65001 + AS 65002) for internet redundancy, and again as the underlay for an SD-WAN overlay. Two flavours matter: eBGP for talking to the ISP, and iBGP for talking to another FortiGate in the same AS.
Real config — eBGP peering to the ISP
Karan peers FG DC1 (AS 65100) with ISP edge router (AS 65001) at 203.0.113.50. ISP demands MD5 password auth and rejects sessions with default TTL=1 if the FortiGate sits behind a small CPE — hence ebgp-multihop.
config router bgp
set as 65100
set router-id 10.60.0.1
config neighbor
edit "203.0.113.50"
set remote-as 65001
set password "banking-isp-md5"
set ebgp-multihop enable
set ebgp-multihop-ttl 5
set route-map-in "rm-isp-in"
set route-map-out "rm-isp-out"
next
end
config network
edit 1
set prefix 203.0.114.0 255.255.255.0
next
end
end
config router route-map
edit "rm-isp-in"
config rule
edit 10
set match-ip-address "ACL-Default"
set set-local-preference 200
next
end
next
end
VRF 0 BGP router identifier 10.60.0.1, local AS number 65100 BGP table version is 47, main routing table version 47 Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd 203.0.113.50 4 65001 8421 7912 47 0 0 02:08:17 352 Total number of neighbors 1
If get router info bgp summary shows State/PfxRcd = Active (not "Established"), your eBGP session is failing. Top causes, in order: (1) TTL too low — peer is more than 1 hop away, fix with set ebgp-multihop enable; (2) firewall policy blocking TCP/179 in the transit zone; (3) password mismatch; (4) local AS misconfigured. Always check in that order.
▶ Watch a packet evaluated through the routing tiers — policy route wins
Same FG DC1, different source — Karan's guest WiFi subnet 10.60.99.0/24. A leftover policy route steers it out wan2 before OSPF or BGP even get a vote.
delete policy 1 in config router policy. SD-WAN now wins.Two days into the bank's go-live, NOC reports asymmetric routing on the SD-WAN — return traffic from a SaaS provider arrives on wan1 even though the outgoing flow used wan2. Karan checks diag sys session list | grep dst=<saas> and confirms: outgoing wan2, return wan1.
The cause: the ISP behind wan1 advertises a more-specific route via eBGP with shorter AS-path, so return traffic naturally prefers it. The fix isn't to disable BGP — it's a route-map that tags wan2-advertised prefixes with a higher LOCAL_PREF on the inbound side and adjusts MED outbound. 12 minutes of diagnose ip router command show + one route-map edit + one BGP soft-reset, and traffic flows symmetrically.
Karan has two static default routes pointing at wan1 and wan2, both distance 10, both priority 0. ECMP is enabled. He wants outbound traffic from a single user session to consistently take wan1 (his "primary"). What's the cleanest one-line change?
Debug like an L3 — Karan's one-command checklist
Vikram, Karan's senior at the banking IT team, doesn't argue. He runs three commands in order. You should too.
# 1. Is the route in the active table? get router info routing-table all | grep 10.70.20.0 # 2. Where did it come from? (OSPF? BGP? static?) get router info routing-table database # 3. Live route process — what's the OSPF/BGP daemon doing? diagnose ip router command show # 4. Drill into a specific protocol get router info ospf neighbor get router info ospf database get router info bgp summary get router info bgp network
One sweep tells you whether the route exists, which protocol won it, and whether the routing daemon is even healthy. No tcpdump. No guessing.
After any routing change, run these two commands in order:
get router info routing-table all — confirms the prefix is active.
get router info ospf neighbor (or bgp summary) — confirms adjacencies are healthy.
Expected: prefix shows with the right protocol code (O, O IA, B, S) and the neighbor shows Full (OSPF) or Established (BGP).
Mandiant's UNC5820 hijacked FortiManager via CVE-2024-47575 (CVSS 9.8, missing auth in fgfmsd) and pushed rogue policies — and in many fleets the same vector silently re-injected static routes that overrode OSPF / BGP-learned paths. The IOC pattern: unexpected S (static) entries appearing for prefixes that should be coming from your IGP, with high distance values that "shouldn't matter" but actually do because the attacker also bumped FMG-pushed static routes ahead of dynamic learn. Audit hint: diff get router info routing-table database output against your last known-good baseline weekly. Source: Tenable PSIRT advisory.
Riya at an Indian IT services firm Pune installs two static routes to the SAME destination with distance 10 AND priority 0 on both. ECMP is enabled. She expects the FortiGate to load-balance 50/50 across them. diag sys session list shows all sessions using only one of the two paths. What's the most likely cause?
source-ip-based ECMP — every session from the same source IP goes the same way (sticky). If Riya is testing from one workstation, she sees 0% load-balance even though both routes are installed. Change to config system settings → set ecmp-max-paths 2 AND config system settings → set v4-ecmp-mode source-dest-ip-based (or weight-based) to spread per-flow. Confirm with get router info routing-table all — both routes should show as S*.
🤖 Ask the AI Tutor
Tap any question — instant context-aware answer. Tuned on FortiOS 7.4 / 7.6 docs + community.
Pre-curated answers grounded in FortiOS 7.4 / 7.6 docs + LIVECommunity. For complex prod issues, paste your get router info routing-table all + diagnose ip router command show output into chat.techclick.in.
📝 Final round — seven more
You've already answered 3 inline. Seven more. 70% (7 of 10) total marks this lesson complete on your Techclick profile. Tap Submit all answers at the end.
Self-explanation prompt
In 2-3 sentences, explain to a hypothetical batchmate: "Why can a stray policy route make a perfectly-configured SD-WAN deployment look broken?" Writing it out cements the concept faster than re-reading.
📖 Mini-glossary — terms used in this blog
- Static route
- Manually configured next-hop, default distance 10, FortiOS-specific priority breaks ties.
- Policy route
- Tier-1 lookup — steer by source / incoming intf / port / service before any other table runs.
- ISDB route
- Internet Service DB route — steer by SaaS identity (Salesforce, O365) instead of subnet.
- OSPF
- Link-state IGP. Default distance 110. Areas + LSAs + Dijkstra SPF.
- LSA
- Link-State Advertisement — the unit OSPF floods (Types 1/2/3/5 most common).
- Area
- OSPF flooding domain. Area 0 = backbone; non-zero areas touch backbone via ABRs.
- ABR
- Area Border Router — sits in 2+ areas, translates Type 3 summary LSAs.
- BGP
- Path-vector EGP. eBGP 20, iBGP 200. AS-path + LOCAL_PREF + MED decide.
- eBGP / iBGP
- external (between ASes) vs internal (same AS) BGP — different distances and TTL rules.
- AS-path
- Ordered list of ASes a BGP route has traversed. Loop prevention + tiebreaker.
- Local-pref
- iBGP attribute — higher LOCAL_PREF wins. Used to engineer outbound path choice.
- ECMP
- Equal-Cost Multi-Path — when distance AND priority match, FortiOS load-balances across both.
- Blackhole route
- Static route to Null0 — silent drop, no ICMP reply. Anti-leak / DDoS sinkhole.
- Route-map
- Conditional filter / mutator for BGP attributes — match prefix, set local-pref / MED / community.
- ebgp-multihop
- Override eBGP's default TTL=1 so peers separated by intermediate routers can establish.
What's next?
Blog 7 opens up FortiGate VDOMs and multi-tenancy — single-VDOM vs multi-VDOM, mgmt VDOM, inter-VDOM links (NPU offload tricks), per-VDOM resource caps, and the MSP patterns the Indian aggregators use to host 50+ clients on one box.
📚 Sources
- Fortinet Community — Technical Tip: Routing methods in FortiGate (policy, ISDB, SD-WAN, static, dynamic). community.fortinet.com
- iMedita — 150+ Routing Interview Questions for Network Engineers. imedita.com/blog/routing-interview-questions
- UniNets — Top Fortinet Firewall Interview Q&A 2025. uninets.com/blog/fortinet-firewall-interview-questions-answers
- NWKings — Top 20 Fortinet Firewall Interview Questions and Answers (2025). nwkings.com/fortinet-firewall-interview-questions-and-answers
- Fortinet Community — Technical Tip: BGP neighbor on FortiGate stuck in Active / Idle. community.fortinet.com (eBGP multihop + TCP/179 + MD5)
- Fortinet Docs — OSPF Configuration (FortiOS 7.4 / 7.6 Administration Guide). docs.fortinet.com
- Fortinet Docs — BGP Configuration (FortiOS 7.4 / 7.6 Administration Guide). docs.fortinet.com
- Tenable Blog — CVE-2024-47575 FAQ: FortiJump Zero-Day in FortiManager. tenable.com/blog/cve-2024-47575-faq-about-fortijump-zero-day-in-fortimanager
- GitHub yuriskinfo — FortiGate debug-diagnose complete cheat sheet. github.com/yuriskinfo/cheat-sheets