Sub topic 14
Application-aware routing and path selection
This chapter assumes you know the SD-WAN planes (control, management, orchestration, data) and that an SD-WAN edge builds overlay tunnels across several transports, such as MPLS, broadband, and LTE. It covers how the edge decides which tunnel carries each application.
Why plain routing is not enough
A normal routing protocol picks a path by a metric such as hop count or cost. It does not know whether that path is currently dropping packets or adding delay. A broadband link can stay "up" while its loss climbs to 5%. Voice over that link sounds bad, yet the routing table never changes.
Application-aware routing (AAR) adds two things. The edge measures how each tunnel is actually performing. It also matches each application to a policy that says how good a path must be.
The working model
- Classify. The edge identifies the application. It uses ports, addresses, DNS names, or deep packet inspection (DPI), which reads packet contents to recognize an application.
- Probe. The edge sends small probe packets through every overlay tunnel at a regular interval. From the replies it measures latency, loss, and jitter. Jitter is the variation in delay between packets.
- Compare. Each application class has an SLA (service level agreement): maximum latency, loss, and jitter.
- Steer. The edge sends the traffic over a tunnel that meets the SLA. It picks by preference order, for example cheapest first.
A runnable model
This Python function mirrors the decision. It returns the first transport, in preference order, whose measurements are all within the SLA.
# Simplified model of SD-WAN application-aware path selection.
paths = {
"mpls": {"latency_ms": 35, "loss_pct": 0.1, "jitter_ms": 5},
"broadband": {"latency_ms": 60, "loss_pct": 0.8, "jitter_ms": 20},
"lte": {"latency_ms": 90, "loss_pct": 1.5, "jitter_ms": 35},
}
sla = {"latency_ms": 150, "loss_pct": 1.0, "jitter_ms": 30} # voice-class SLA
preference = ["broadband", "mpls", "lte"] # cheapest first
def meets_sla(metrics, sla):
return all(metrics[k] <= sla[k] for k in sla)
def choose_path(paths, sla, preference):
for name in preference:
if meets_sla(paths[name], sla):
return name
return None # no path qualifies; a real policy would fall back
print(choose_path(paths, sla, preference)) # broadbandBroadband is first in the preference list. Its loss (0.8%) and jitter (20 ms) are inside the SLA, so it wins. If broadband loss rose to 1.4%, the function would skip it and return mpls. The edge makes the same switch without a person involved.
Common errors
- Wrong preference order. Listing MPLS first sends everything over the most expensive link and removes the savings SD-WAN is meant to give.
- SLA too tight. If no path ever qualifies, traffic falls to the fallback action constantly. Set SLAs from what the application needs, not from the best link's numbers.
- SLA too loose. Every path "passes," so the policy never moves traffic away from a poor link.
- No fallback. Define what happens when no path qualifies. Common choices are to use the best available path or to drop to a default.
- Flapping. Measurements near the SLA edge can make traffic bounce between paths. Platforms add hysteresis or a hold time, so a path must stay good or bad for a period before traffic moves.
- Probe overhead. Probing every tunnel often costs bandwidth, which matters on metered LTE links.
- Asymmetric paths. Each edge chooses for its own outbound traffic. The return traffic can take a different path, so check policy on both ends.
Exercise
A voice SLA allows 150 ms latency, 1.0% loss, and 30 ms jitter. Broadband measures 60 ms, 1.4% loss, and 20 ms jitter. MPLS measures 35 ms, 0.1% loss, and 5 ms jitter. The preference order is broadband, then MPLS. Which path carries voice, and why?
Show answer
MPLS. Broadband fails the loss limit (1.4% is above 1.0%), so the edge skips it even though its latency and jitter are within limits. MPLS meets all three limits and is next in the preference order.