Rules and routing are essential components of SD-WAN functionality. They control how traffic flows through the network and ensure that traffic is directed dynamically and optimally based on the network’s real-time conditions.
Goal:
Define how specific types of traffic are routed through the network based on conditions like IP addresses, applications, and services.
SD-WAN rules are policies that the SD-WAN device uses to decide the best path for traffic. These rules are matched sequentially, starting from the highest priority.
Rule Conditions:
192.168.1.0/24).8.8.8.8 for DNS queries).Priority Settings:
You want to prioritize Zoom traffic over social media usage.
192.168.1.0/24zoom.us192.168.1.0/24facebook.comSD-WAN rules allow you to customize traffic flow, ensuring that critical applications have consistent and reliable performance.
Goal:
Provide fixed-path routing for predictable and straightforward traffic flows.
Static routing is a manual configuration where traffic is directed to a specific next-hop address, regardless of network changes.
Define the Destination Network:
10.1.1.0/24.Set the Next-Hop Address:
192.168.0.1.Configure a Default Route (Default Gateway):
0.0.0.0/0, Next Hop = WAN1 Gateway.Your branch office needs to send all internet-bound traffic to an ISP via WAN1.
0.0.0.0/0 (all traffic).203.0.113.1).Static routing provides a simple and predictable way to direct traffic but lacks flexibility in dynamic environments.
Goal:
Adapt to complex network topologies by automatically learning and updating paths.
Dynamic routing uses protocols like OSPF (Open Shortest Path First) or BGP (Border Gateway Protocol) to automatically discover and update routes based on network changes.
OSPF (Open Shortest Path First):
BGP (Border Gateway Protocol):
You have two branches connected via OSPF:
10.1.1.0/24.10.2.2.0/24.Dynamic routing ensures resiliency and flexibility in large, complex networks where static routes would be too rigid.
Goal:
Control traffic paths based on strategic or performance considerations.
Policies that guide SD-WAN’s decision-making for traffic routing, often based on SLA metrics.
Path Selection Based on SLA Performance:
Primary and Backup Paths:
Your office has two WAN links:
Routing policies allow fine-grained control over traffic behavior, ensuring optimal performance and reliability.
Configure Static Routes:
0.0.0.0/0) for internet-bound traffic through WAN1.Enable Dynamic Routing:
Set SD-WAN Rules:
Test Rule Priority:
With proper routing and rules, SD-WAN can efficiently manage traffic flow, ensuring optimal performance and reliability for all applications.
Effective SD-WAN routing is crucial for ensuring optimal traffic flow, redundancy, and efficient WAN utilization. While basic SD-WAN routing covers static routes, SD-WAN rules, and dynamic routing, additional considerations such as route priority, policy-based routing (PBR), Equal-Cost Multi-Path (ECMP), advanced BGP configurations, and troubleshooting techniques enhance the robustness of an SD-WAN deployment.
A default route (0.0.0.0/0) is used when no specific route matches the destination IP.
It is typically set to an ISP gateway or a SD-WAN WAN link, ensuring that all non-matching traffic is forwarded to the internet.
Example of a default static route configuration in FortiGate:
config router static
edit 1
set dst 0.0.0.0/0
set gateway <ISP_Gateway_IP>
set device wan1
next
end
If multiple default routes exist, priority is determined by administrative distance and cost metrics.
Routes in FortiGate are prioritized based on the following order:
To verify which routes are actively used, administrators can use the following command:
get router info routing-table all
This command displays all active routes, including their priority, cost, and next-hop IP.
Policy-Based Routing (PBR) allows administrators to override normal routing behavior by forcing traffic through a specific WAN link based on predefined rules. Unlike standard SD-WAN rules, PBR is processed before SD-WAN rules.
To force VoIP traffic (UDP port 5060) through WAN2, use the following configuration:
config router policy
edit 1
set input-device "lan"
set src "192.168.1.0/24"
set dst "0.0.0.0/0"
set protocol 17 # UDP
set dst-port 5060
set gateway <WAN2_Gateway_IP>
set output-device "wan2"
next
end
ECMP (Equal-Cost Multi-Path) allows SD-WAN to balance traffic across multiple WAN links with the same cost metric.
config router setting
set ecmp-max-paths 4
end
This setting allows up to 4 equal-cost paths for traffic distribution.
config router bgp
config neighbor
edit <BGP_Peer_IP>
set local-preference 200
next
end
end
config router bgp
config neighbor
edit <ISP_Peer_IP>
set metric 50
next
end
end
To check which SD-WAN rule is applied to a session, use:
diagnose sys sdwan service
This command helps verify:
For static and dynamic route status, use:
diagnose ip route list
This command shows:
get router info ospf routing
Displays OSPF-learned routes and next-hop details.
get router info bgp summary
Shows BGP peer status, route counts, and AS path information.
0.0.0.0/0) ensure connectivity when no specific match exists.diagnose sys sdwan service → Verifies SD-WAN rule matching.diagnose ip route list → Checks static and dynamic routing behavior.get router info bgp summary → Validates BGP peering and routing.In what order does FortiGate evaluate SD-WAN rules?
FortiGate evaluates SD-WAN rules top-down by rule ID (priority).
SD-WAN rules are processed sequentially starting with the lowest rule ID (highest priority). When traffic matches the conditions of a rule—such as source, destination, application, or service—the firewall applies that rule and stops evaluating additional SD-WAN rules. This means rule ordering is critical for ensuring correct traffic steering. If a broad rule appears above a more specific rule, it may capture traffic before the intended rule is evaluated. Administrators frequently encounter routing issues due to misordered rules, especially when implementing application-based steering or multiple WAN policies. Correct rule ordering ensures the intended path-selection logic is applied consistently.
Demand Score: 86
Exam Relevance Score: 92
What happens when traffic does not match any configured SD-WAN rule?
It is handled by the implicit SD-WAN rule.
If traffic does not match any explicit SD-WAN rule, FortiGate automatically applies an implicit rule at the bottom of the rule list. This implicit rule typically distributes traffic using the default load-balancing algorithm across all eligible members. Because it has the lowest priority, it only applies when no other rule conditions match. Troubleshooting scenarios often reveal unexpected traffic patterns caused by traffic falling into this implicit rule. Engineers must verify that rule conditions are properly configured to avoid unintended routing behavior.
Demand Score: 82
Exam Relevance Score: 90
Does SD-WAN override the routing table when selecting a path?
No. Routing decisions occur before SD-WAN rule evaluation.
FortiGate first performs a routing table lookup to determine the outgoing interface or zone. If the selected route points to the SD-WAN zone (virtual-wan-link), then SD-WAN rules determine which specific member interface should forward the traffic. This means SD-WAN does not replace the routing table; it operates after route lookup to select the best link within the SD-WAN zone. Misconfigured static routes or missing routes often cause traffic to bypass SD-WAN entirely, which is a common troubleshooting scenario during deployments.
Demand Score: 80
Exam Relevance Score: 94
Which routing protocols are commonly used with Fortinet SD-WAN deployments?
Common protocols include OSPF, BGP, and static routing.
Fortinet SD-WAN integrates with several routing protocols. Static routes are frequently used in simple branch deployments, while OSPF or BGP is used in larger networks to dynamically exchange routes across WAN overlays. Dynamic routing helps maintain connectivity if links fail and enables route convergence across SD-WAN sites. In enterprise environments, BGP is commonly used with SD-WAN overlay tunnels because it scales better across large multi-site deployments. Understanding how routing protocols interact with SD-WAN path selection is essential for designing resilient WAN architectures.
Demand Score: 77
Exam Relevance Score: 88
What condition must be met for an SD-WAN rule to apply to traffic?
All rule matching criteria must match the traffic session.
Each SD-WAN rule includes match conditions such as source address, destination address, application, or service. A session must match all configured criteria for the rule to apply. If any condition fails, FortiGate moves to the next rule in the list. This behavior ensures precise traffic steering but can cause unexpected routing when rules are overly restrictive. Engineers should carefully verify match criteria when troubleshooting rule-selection problems.
Demand Score: 75
Exam Relevance Score: 87