茶

Brown Belt: FortiGate SD-WAN: Two ISPs, Health Checks and Failover

Two internet circuits are only useful if traffic actually moves between them when one degrades, not just when it dies. FortiGate SD-WAN does that with performance SLAs: it probes each link continuously and steers sessions by latency, jitter and loss. This lesson builds a two-ISP SD-WAN from the CLI and shows how to watch it fail over.

The pieces

ObjectRole
MemberA WAN interface with its gateway. Here: wan1 (ISP A) and wan2 (ISP B).
ZoneA group of members you reference in routes and firewall policy. The built-in zone is virtual-wan-link.
Performance SLA (health check)A probe (ping, HTTP, DNS) sent out each member to a target, with thresholds for latency, jitter and packet loss.
SD-WAN rule (service)Matches traffic (source, destination, app) and says how to pick a member: best quality, lowest cost, SLA-based, or manual.

1 · Members and zone

config system sdwan
    set status enable
    config zone
        edit "virtual-wan-link"
        next
    end
    config members
        edit 1
            set interface "wan1"
            set zone "virtual-wan-link"
            set gateway 203.0.113.1
            set priority 1
        next
        edit 2
            set interface "wan2"
            set zone "virtual-wan-link"
            set gateway 198.51.100.1
            set priority 2
        next
    end
end

Explanation: enabling SD-WAN turns the two WAN ports into members of one logical zone. Gateways are set per member because SD-WAN installs its own routes. priority is a tiebreaker only; the SLA rule below is what actually chooses.

Existing static routes on wan1/wan2 must go

An interface cannot be an SD-WAN member while a static route references it directly. Remove those routes first; you will replace them with one route to the zone in step 4.

2 · Performance SLA

config system sdwan
    config health-check
        edit "Internet"
            set server "8.8.8.8" "1.1.1.1"
            set protocol ping
            set interval 500
            set failtime 5
            set recoverytime 10
            set members 1 2
            config sla
                edit 1
                    set latency-threshold 150
                    set jitter-threshold 30
                    set packetloss-threshold 2
                next
            end
        next
    end
end

Explanation: every 500 ms, each member pings two public resolvers. Five consecutive failures mark the member down; ten successes bring it back. SLA 1 defines "good enough": under 150 ms latency, 30 ms jitter and 2% loss. A member can be up but out of SLA, and that is the case failover is really for.

3 · The SD-WAN rule

config system sdwan
    config service
        edit 1
            set name "Internet-SLA"
            set mode sla
            set src "LAN-net"
            set dst "all"
            config sla
                edit "Internet"
                    set id 1
                next
            end
            set priority-members 1 2
        next
    end
end

Explanation: mode sla means: use the members in the order listed, as long as each meets SLA 1. If wan1 falls out of SLA, new sessions go to wan2; when wan1 recovers, they come back. Other modes: priority (best measured quality wins), load-balance, and manual.

4 · Route and firewall policy

config router static
    edit 1
        set dst 0.0.0.0 0.0.0.0
        set sdwan-zone "virtual-wan-link"
    next
end
config firewall policy
    edit 10
        set name "LAN to Internet"
        set srcintf "internal"
        set dstintf "virtual-wan-link"
        set srcaddr "LAN-net"
        set dstaddr "all"
        set action accept
        set schedule "always"
        set service "ALL"
        set nat enable
        set logtraffic all
    next
end

Explanation: the default route points at the zone, not at an interface. The firewall policy also references the zone, so one policy covers both circuits and NAT uses whichever member the session lands on.

Verify and watch a failover

FGT # diagnose sys sdwan health-check
Health Check(Internet):
Seq(1 wan1): state(alive), packet-loss(0.000%) latency(12.418), jitter(0.611), sla_map=0x1
Seq(2 wan2): state(alive), packet-loss(0.000%) latency(21.904), jitter(1.207), sla_map=0x1

FGT # diagnose sys sdwan service
Service(1): Address Mode(IPV4) flags=0x200 use-shortcut-sla
  Gen(1), TOS(0x0/0x0), Protocol(0: 1->65535), Mode(sla), sla-compare-order
  Members(2):
    1: Seq_num(1 wan1), alive, sla(0x1), gid(0), cfg_order(0), local cost(0), selected
    2: Seq_num(2 wan2), alive, sla(0x1), gid(0), cfg_order(1), local cost(0)

FGT # diagnose sys sdwan member
FGT # get router info routing-table all | grep 0.0.0.0

sla_map=0x1 means the member passes SLA 1; 0x0 means it is up but failing the thresholds, and the service output will show wan2 as selected. To test without pulling a cable, raise latency on wan1 with a tool upstream, or temporarily set latency-threshold to 5 and watch the selection move.

Try it: SD-WAN on the branch FortiGate

A simulated FortiGate 60F with wan1 (ISP-A) and wan2 (ISP-B) but no SD-WAN yet. Enable it, add both members to the virtual-wan-link zone with their gateways, and add an Internet health check. diagnose sys sdwan health-check shows the result.

Summary

  • Members → zone → health check → SLA rule → route and policy to the zone.
  • Performance SLA is what makes this SD-WAN rather than dual-WAN: a link can be up and still be avoided.
  • Remove direct static routes before adding members; point the default route at virtual-wan-link.
  • diagnose sys sdwan health-check and diagnose sys sdwan service show state and selection.