Description | This article describes the issue of SD-WAN service rules not working as expected on a FortiGate, where the rules are not behaving as configured, causing traffic to take an unexpected path. The deployment is utilizing BGP ECMP (Equal Cost Multi-Path) for spoke-to-hub routing. |
Scope | FortiGate. |
Solution |
To troubleshoot the issue of SD-WAN service rules not working as expected, follow these steps:
Check the SD-WAN configuration to ensure that the rules are correctly configured and that the members are properly defined. In this example, there is a total of 10 SD-WAN members in a single rule.
edit 100
Verify that the routing information is correct and that the BGP network is properly configured. This example is focusing on the destination subnet of 8.8.4.4/32.
FOCLAB # get router info routing details 8.8.4.4 Routing table for VRF=0
There are a total of 10 next hops available for ECMP.
Check the SD-WAN health check and member status to ensure that all members are up and running.
FOCLAB # diagnose sys sdwan service Service(100): Address Mode(IPV4) flags=0x200 use-shortcut-sla
Based on the output of the diagnose command and routing info, the outgoing interface of the traffic going to destination 8.8.4.4 should be routed via SD-WAN member 1 interface t_hub1-1_111. However, FortiGate routes the traffic via another interface, in this case SD-WAN member 2 interface t_hub1-1_121. This behavior can be observed by running 'diagnose sys session list':
FOCLAB # diagnose sys session list ... orgin->sink: org pre->post, reply pre->post dev=37->431546/431546->37 gwy=10.1.137.108/10.239.88.67
FOCLAB # diagnose netlink interface list ... if=t_hub1-1_121 family=00 type=768 index=431546 mtu=1420 link=0 master=0
The reason for this behavior is due to a limitation in FortiOS, where SD-WAN limits a maximum of 8 paths of an ECMP outgoing path.
To confirm this behavior, run the command 'diagnose ip route list' to get the list of outgoing interfaces in the kernel for a given route; only the top 8 entries will be considered in outgoing interface selection for an SD-WAN rule.
FOCLAB # diagnose ip route list | grep -A 15 8.8.4.4
In this example, even though t_hub1-1_111 should be prioritized as the exit interface, it is ignored due to the limitation, and t_hub1-1_121 is picked as the outgoing interface. This limitation is removed on v7.2.11 and v7.4.x release. |
The Fortinet Security Fabric brings together the concepts of convergence and consolidation to provide comprehensive cybersecurity protection for all users, devices, and applications and across all network edges.
Copyright 2025 Fortinet, Inc. All Rights Reserved.