In SD-WAN rules, the longest match routes will override the quality comparisons when all of the specific routes are out of SLA.
With this feature in an SD-WAN rule:
Lowest Cost (
sla): Even though all of the egress ports on specific routes (longest matched routes) are out of SLA, the SD-WAN rule still selects the first configured or lower-cost port from the egress ports to forward traffic.
Best Quality (
priority): Even though the egress ports on specific routes (longest matched routes) have worse quality that all other ports on less specific routes, the SD-WAN rule still selects the best quality port from the ports on specific routes to forward traffic.
This features avoids a situation where, if the members on specific routes (longest matched routes) are out of SLA or have worse quality, the traffic might be forwarded to the wrong members in SLA (higher quality) on the default or aggregate routes.
In this example, four SD-WAN members in two zones are configured. The remote PC (PC_2 - 10.1.100.22) is accessible on port15 and port16, even though there are valid routes for all of the SD-WAN members. A single SD-WAN service rule is configured that allows traffic to balanced between all four of the members, but only chooses between port15 and port16 for the specific 10.1.100.22 address. If neither port15 nor port16 meet the SLAs, traffic will be forwarded on one of these interfaces, instead of on port1 or dmz.
A performance SLA health check is configured to monitor 10.1.100.2. An SD-WAN service rule in Lowest Cost (SLA) mode is configured to select the best interface to steer the traffic. In the rule, the method of selecting a member if more than one meets the SLA (
tie-break) is configured to select members that meet the SLA and match the longest prefix in the routing table (
fib-best-match). If there are multiple ECMP routes with the same destination, the FortiGate will take the longest (or best) match in the routing table, and choose from those interface members.
config system sdwan config zone edit "virtual-wan-link" next edit "z1" next end config members edit 1 set interface "port1" set gateway 172.16.200.2 next edit 2 set interface "dmz" set gateway 172.16.208.2 next edit 3 set interface "port15" set zone "z1" set gateway 172.16.209.2 next edit 4 set interface "port16" set zone "z1" set gateway 172.16.210.2 next end config health-check edit "1" set server "10.1.100.2" set members 0 config sla edit 1 next end next end config service edit 1 set name "1" set mode sla set dst "all" set src "172.16.205.0" config sla edit "1" set id 1 next end set priority-members 1 2 3 4 set tie-break fib-best-match next end end