Course contents

Unit 8: Management and basic policiesLesson 8.5 (1 of 1 in this unit)27 of 27 in the Cisco SD-WAN course

Application-aware routing introduction

How a WAN Edge measures loss, latency and jitter on each tunnel, compares them with an SLA class, and picks a path for matching traffic, including what a brownout and a full failure look like.

Intermediate · 15 min read

You'll learn to describe how application-aware routing measures tunnels and compares them with an SLA class, tell a brownout from a failure, and verify which path a flow is using.

Technical definition

Application-aware routing (AAR) uses measured tunnel quality and policy to select paths for matching traffic. WAN Edge routers compare loss, latency and jitter with an SLA class and apply transport preferences. If no available path meets the class, the configured policy determines whether traffic uses another available path or is dropped.

This lesson uses classic BFD-based AAR on Cisco IOS XE Catalyst SD-WAN 17.x with Manager 20.x. The policy excerpt uses Controller syntax, not WAN Edge configuration mode. Exact features and commands depend on the paired releases; enhanced AAR modes are outside this example.

Choppy calls on a circuit that is up

At about two in the afternoon, calls from BR-01 to the voice gateway behind HUB-01 start to break up. The MPLS circuit that carries them shows up, with no errors on the interface. The provider is dropping a few per cent of packets somewhere inside its network. A route cannot see that: the link is up, so the route stays. Application-aware routing exists to notice it and move the calls to the internet path until MPLS recovers.

What the router measures

Application-aware routing follows measured quality
Application-aware routing follows measured qualityBR-01 reaches HUB-01 over two tunnels, one over biz-internet and one over mpls. BFD probes on each tunnel measure loss, latency and jitter. A voice SLA class allows 150 milliseconds latency and 1 percent loss. When the internet tunnel exceeds the limit, new voice flows move to the mpls tunnel while other traffic stays where it was.BR-01HUB-01biz-internetmplslatency 210 ms: over the limitlatency 40 ms: voice moves hereSLA class: voicelatency 150 ms, loss 1%Probes: BFD on every tunnelloss, latency, jitter

On small screens, swipe sideways or focus the diagram and use the arrow keys.

A tunnel that is up is not necessarily a good tunnel. AAR turns the BFD measurements into a path choice for each application, and a policy decides which classes use which transport.

Every tunnel between two WAN Edge routers already runs BFD (Bidirectional Forwarding Detection) hello packets, by default one per second, to detect a dead tunnel. AAR reuses those probes to measure the tunnel's quality:

What the router measures
What the router measuresBFD probes every tunnel.BFD probesin every tunnelMeasureloss, latency, jitterCompareto SLA class

On small screens, swipe sideways or focus the diagram and use the arrow keys.

The result is loss, latency and jitter.
  • Loss: the share of probes that do not come back, as a percentage.
  • Latency: a tunnel-delay measurement in milliseconds. Check the command and release before treating a displayed value as one-way or round-trip delay.
  • Jitter: how much that delay varies, in milliseconds.

Results are collected in intervals. The router averages the values it has collected over several recent intervals and compares the average with each SLA class. The poll interval and the number of intervals used (the multiplier) are configurable. On many releases the defaults are an interval of ten minutes and a multiplier of six, which suits a stable network and reacts slowly; designs that carry voice usually shorten both. Check the defaults for your release, and remember the trade-off: faster reaction also means more path changes when a link is only briefly bad.

SLA classes and the policy

An SLA class is a set of thresholds: a path qualifies when its measured loss, latency and jitter are all within them. An application-aware routing policy then matches traffic (by application, by DSCP value, by address and so on) and names the SLA class and the transports to prefer.

SLA classes
SLA classesAn SLA class sets limits for loss, latency and jitter.VoiceStrict limitsVideoModerate limitsBulkLoose limits

On small screens, swipe sideways or focus the diagram and use the arrow keys.

Policy ties an application to a class.
policy sla-class VOICE loss 2 latency 150 jitter 30 ! app-route-policy VOICE-AAR vpn-list VPN-20 sequence 10 match dscp 46 ! action sla-class VOICE preferred-color mpls ! ! ! ! ! apply-policy site-list BRANCHES app-route-policy VOICE-AAR ! !

Structure of a policy as it would appear in a Controller's CLI, shortened. It is normally built in SD-WAN Manager. Loss is in per cent, latency and jitter in milliseconds. The thresholds are an example for voice, not a default. Traffic marked DSCP 46 (EF) in VPN 20 uses a path that meets the VOICE class and prefers MPLS.

Reading it aloud gives the whole model: match voice in VPN 20; among tunnels that meet the VOICE thresholds, prefer the MPLS colour; apply this at the branch sites. The policy is about which paths are eligible and which is preferred, not about changing the routes themselves.

Four conditions and what the router does

Voice from BR-01 to HUB-01 under the VOICE class (2% loss limit), preferring MPLS. Decide which path voice will take before reading the last column.

Four conditions
Four conditionsThe result depends on which paths meet the SLA.Preferred path meets SLAStay on itOnly another path meets SLAMove to that pathSeveral paths meet SLAShare or prefer by orderNone meets SLAFallback or best path

On small screens, swipe sideways or focus the diagram and use the arrow keys.

Plan the fallback.
Four conditions and what the router does
Four conditions and what the router doesCondition; What BR-01 sees; Where voice goes. Both paths healthy: Loss, latency and jitter within the class on MPLS and on the internet MPLS: more than one path is eligible, so the preferred colour decides MPLS brownout (6% loss): MPLS tunnel up and BFD fine, but the averaged loss is over the 2% limit; the internet tunnel qualifies The internet path, and back to MPLS once the averages recover and stay within the SLA MPLS fails: BFD declares the tunnel down according to its configured detection settings; for example, a 1-second hello and multiplier 7 give a nominal 7-second detection interval, not a forwarding-recovery guarantee The internet path. This is a failure, not a brownout: the tunnel leaves the set of paths altogether Both paths miss the SLA: No tunnel meets the class Configured, not automatic: depending on the policy and release, traffic is shared over all tunnels, sent to the best available one, or dropped if the policy is strict. Choose this on purposeConditionWhat BR-01 seesWhere voice goesBoth paths healthyLoss, latency and jitter within theclass on MPLS and on the internetMPLS: more than one path is eligible,so the preferred colour decidesMPLS brownout (6% loss)MPLS tunnel up and BFD fine, but theaveraged loss is over the 2% limit;the internet tunnel qualifiesThe internet path, and back to MPLSonce the averages recover and staywithin the SLAMPLS failsBFD declares the tunnel downaccording to its configured detectionsettings; for example, a 1-secondhello and multiplier 7 give a nominal7-second detection interval, not aforwarding-recovery guaranteeThe internet path. This is a failure,not a brownout: the tunnel leaves theset of paths altogetherBoth paths miss the SLANo tunnel meets the classConfigured, not automatic: dependingon the policy and release, traffic isshared over all tunnels, sent to thebest available one, or dropped if thepolicy is strict. Choose this onpurpose

On small screens, swipe sideways or focus the diagram and use the arrow keys.

Read each row across: the left box names the item, the others describe it.

When neither path qualifies, inspect the action. The shortened preferred-colour example above does not enable Strict/Drop or best-tunnel fallback. Non-strict handling can use an available tunnel even though it misses the SLA; Strict/Drop discards matching traffic when no tunnel qualifies. Fallback to best path needs its own policy action and SLA-class criteria on supported releases, starting with IOS XE 17.5.1a and Manager 20.5.1. An available path is not necessarily a healthy one, and other data policies can also affect the choice.

A brownout moves traffic because the path no longer meets the SLA; a failure removes the path. Both end on the other transport, for different reasons.

What AAR is not

What AAR is not
What AAR is notAAR picks among tunnels, it does not fix them.Not a QoS toolIt does not shape queuesNot a repairIt cannot improve a bad circuitNot instantIt reacts after measurement

On small screens, swipe sideways or focus the diagram and use the arrow keys.

Underlay quality is still the limit.
  • Not an instruction to move every packet after one loss. Classic AAR uses measured intervals and policy. One lost probe alone does not establish the forwarding outcome.
  • Not a replacement for QoS. AAR chooses a path; queuing and marking decide how traffic is treated on it.
  • Not instant. Detection speed depends on the measurement settings, which is why failure detection (BFD, seconds) is much faster than brownout detection (averages, longer).
  • Not controlled from the Controller at packet time. The edge router measures and decides locally.

Checking which path is in use

Example output
BR-01#show sdwan app-route stats
REMOTE SYSTEM IP  LOCAL COLOR  REMOTE COLOR   INDEX  PACKETS  LOSS  LATENCY  JITTER
10.255.1.1        mpls         mpls           0      600      6     41       9
10.255.1.1        mpls         mpls           1      600      5     38       8
10.255.1.1        biz-internet biz-internet   0      600      0     22       2
10.255.1.1        biz-internet biz-internet   1      600      0     21       3
Two tunnels to HUB-01, each with recent measurement intervals (the index is the interval). MPLS shows loss of 5 to 6 per cent in both: above the 2 per cent in the VOICE class. The internet tunnel has no loss, 21 to 22 ms latency and 2 to 3 ms jitter, so it qualifies. The values are an example; the layout is simplified.
show sdwan app-route sla-class

On a WAN Edge: the SLA classes the router has received from the Controller, with their thresholds. If the class is missing here, the policy has not reached this router.

show sdwan policy service-path vpn 20 interface GigabitEthernet3 source-ip 10.30.1.10 dest-ip 10.30.100.10 protocol 17 dscp 46

Asks the router which path a flow with these values would take under the current policy. Interface GigabitEthernet3 is the LAN-side interface in VPN 20; use the values of the flow you are checking. It only queries the router's policy; it sends no traffic. Keywords vary a little between releases.

The first command shows what the router measured, the second shows what it was told to enforce, and the third shows the decision. A complaint about a path then becomes three observations, not a guess.

Testing it in a lab

To see AAR act, make one path worse on purpose in a lab: put a WAN emulator, or a Linux bridge with tc netem, in line on the MPLS side and add loss. Then watch the three commands above, and remove the impairment and watch the traffic return. Do this only in a lab; never impair a production circuit. Record how long each reaction took. With default measurement settings the first test usually shows how slow AAR is, which is the lesson.

Why does a brownout take longer to react to than a failure?

A failure is a dead tunnel: BFD stops receiving probes and declares it down after a few missed hellos, in seconds. A brownout is a tunnel that still works but badly, so the router has to measure it, average over several intervals and compare against the SLA. That takes at least one measurement interval, and with default settings much longer. Shortening the interval and multiplier speeds it up at the cost of more sensitivity to short disturbances.

Technical reference: Cisco IOS XE 17.x application-aware routing guide. Commands and outputs here are authored teaching examples; no router image or live network was executed.

Test yourself on application-aware routing

Predict · scenario 1

The VOICE SLA class allows 2% loss. MPLS is up with 6% average loss; the internet is up with 0% and meets the latency/jitter limits. Voice prefers MPLS, with no overriding data policy. Where does voice go?

Predict · scenario 2

Which measurements does AAR use to judge a tunnel?

Predict · scenario 3

One BFD probe is lost on the MPLS tunnel. What does AAR do?

Predict · scenario 4

Both tunnels are up but neither meets VOICE. What must you check before predicting forwarding?

Predict · scenario 5

Where does the AAR decision for a packet run?

FAQ

Does AAR move all traffic as soon as one packet is lost?
Not automatically. Classic AAR evaluates measured loss, latency and jitter over configured intervals. One lost probe is not by itself a command to move all traffic; the measured result, thresholds, available paths and policy determine the outcome. BFD tunnel failure is a separate event.
Is AAR the same as load balancing?
No. AAR adds measured-quality checks and policy preferences to path selection. Several qualifying paths can share traffic. If none qualifies, ordinary non-strict handling can still forward over available paths; Strict/Drop instead drops matching traffic. Best-path fallback is a separate configured option on supported releases.
Where is the policy configured and where does it run?
It is configured centrally in SD-WAN Manager, held on the Controller, and sent to the WAN Edge routers at the sites it is applied to. It runs on the edge routers, which do the measuring and the forwarding. The Controller is not in the data path.