Course contents

Unit 4: Advanced AARLesson 4.1 (1 of 7 in this unit)15 of 63 in the Advanced Cisco SD-WAN course

BFD-derived loss/latency/jitter measurement

How the edge measures loss, latency and jitter from the BFD probes inside each tunnel, how intervals are averaged into the value compared with an SLA class, and why a short burst of loss can go unseen.

Advanced · 17 min read

You'll learn to explain how loss, latency and jitter are measured from the probes inside each tunnel, calculate the average the edge compares with an SLA class from per-interval values, and say why a short burst of loss can be hidden by the averaging window.

Technical definition

Path-quality measurement in Cisco SD-WAN means the loss, latency and jitter that each edge router calculates for every tunnel from the BFD probes that run inside it. The edge stores the values in fixed intervals, averages several recent intervals, and compares the average with the limits of an SLA class.

The measurement rides inside the tunnel

Every tunnel between two edges runs BFD, which exists to tell the edge whether the tunnel is alive. The same small packets carry enough information, such as sequence numbers and timestamps, for each side to work out how many were lost and how long and how steadily they travelled. The edge therefore measures the real path that user traffic takes, using packets that cross the same encrypted tunnel as the traffic itself.

Diagram
How a measurement is made
How a measurement is made

BFD packets cross the tunnel in both directions, the edge counts what is missing and times what arrives, stores the result for the current interval, averages the recent intervals, and compares the average with the SLA class.

  1. ProbeBFD packetsinside the tunnel
  2. Countmissing andlate packets
  3. Storeone result perinterval
  4. Averagerecent intervalstogether
  5. Comparewith the SLAclass
The comparison with the class uses the average, not the latest packet.
Diagram
The three numbers
The three numbers
NumberWhat it measuresWhat it hurts first
LossThe share of probes that did not arriveVoice and video, which cannot wait for a retransmission
LatencyHow long a probe takes to cross the pathInteractive traffic and anything with a strict delay budget
JitterHow much the delay varies from one probe to the nextVoice and video, which need a steady arrival rhythm
Units are a percentage for loss and milliseconds for latency and jitter. Check whether your release reports latency as round trip or one way.

Two clocks: liveness and quality

The edge runs two clocks over the same probes. The fast one decides whether the tunnel is alive: if no BFD packet is answered for the hello interval multiplied by the multiplier, the tunnel is declared down within seconds, and traffic moves. The slow one decides whether the tunnel is good enough: quality is calculated per interval and averaged over several intervals, which takes minutes or longer. A tunnel that stops answering is found quickly. A tunnel that answers but loses a few percent of its packets is found slowly.

Diagram
How fast a dead tunnel is declared down
How fast a dead tunnel is declared down
Hello intervalMultiplierDetection timeReading
1,000 ms77 secondsA common starting point, but check the release default
1,000 ms33 secondsFaster failover, less tolerance for lost hellos
500 ms73.5 secondsFaster failover and twice the hello traffic
3,000 ms721 secondsSlower failover, less hello traffic on a metered circuit
Detection time is the hello interval times the multiplier, multiplied out by script. The values are examples, and the allowed settings differ between releases.
Diagram
Liveness and quality are separate decisions
Liveness and quality are separate decisions

Liveness reacts to a tunnel that stops answering, within seconds, using the hello interval and multiplier. Quality reacts to a tunnel that answers badly, over minutes, using the poll interval and the number of intervals averaged.

Livenesshello interval timesmultiplierseconds
Qualitypoll interval timesintervals averagedminutes or more
A total failure is fast. A poor path is judged on the slower clock.

Intervals and the averaging window

Two settings control the quality clock. The poll interval is the length of one measurement interval. The multiplier is how many recent intervals the edge keeps and averages. Multiply them to get the window. On many releases the defaults are a poll interval of 600 seconds and six intervals, which is a window of one hour, so check what your release uses before you assume anything.

sdwan bfd color biz-internet hello-interval 1000 multiplier 7 ! bfd app-route multiplier 5 bfd app-route poll-interval 120000

Outline of the timers on an edge. The first block is liveness for one color: a one second hello and seven misses. The last two lines are quality: five intervals of 120 seconds, a window of ten minutes. The poll interval is in milliseconds. The layout, the defaults and the allowed values differ between releases and between templates and CLI.

Example output written for this lesson, simplified; real output has more fields and a different layout
BR-04#show sdwan app-route stats remote-system-ip 10.255.1.1 local-color biz-internet
TUNNEL: biz-internet to HUB-01 biz-inet   poll interval 600 s, 6 intervals
INTERVAL  AGE        LOSS  LATENCY  JITTER
0         0-10 min   11    71       38
1         10-20 min  0     58       6
2         20-30 min  0     57       5
3         30-40 min  0     59       7
4         40-50 min  0     58       6
5         50-60 min  0     57       5
AVERAGE              1.8   60       11
Each row is one interval. Interval 0 had 11 percent loss and the other five had none. The edge compares the last row with the SLA class. The average loss is 1.8 percent, which is under the voice limit of 2 percent, even though one whole interval was bad. The numbers are examples.
Diagram
Window size and what one bad interval does
Window size and what one bad interval does
Poll intervalIntervals keptWindowOne interval at 11 percent loss averages toVoice limit 2 percent
600 seconds660 minutes1.8 percentStill eligible, event not seen
300 seconds630 minutes1.8 percentStill eligible, event not seen
120 seconds510 minutes2.2 percentNot eligible for up to 10 minutes
60 seconds33 minutes3.7 percentNot eligible for up to 3 minutes
The average depends on how many intervals are kept, and the window length depends on the interval length. A shorter window sees the event and also forgets it sooner.
Diagram
Loss in each bad interval that crosses a 2 percent limit
Loss in each bad interval that crosses a 2 percent limit
Intervals keptOne bad interval aboveTwo bad intervals, each aboveThree bad intervals, each above
612 percent6 percent4 percent
510 percent5 percent3.3 percent
36 percent3 percent2 percent
Worked out by script on the assumption that the other intervals are clean: the average is the loss times the number of bad intervals divided by the intervals kept, so the loss must exceed the limit times the intervals kept divided by the number of bad intervals. The 11 percent burst in this lesson stays under the 12 percent line for six intervals.

A worked case: the burst the average hid

Users at BR-04 reported broken calls for about ten minutes around 14:00, then normal service. The Internet provider confirmed a short congestion event. The voice policy prefers the biz-internet tunnel and keeps mpls as the spare, and mpls was healthy the whole time, yet the calls were not moved. The statistics for biz-internet show why.

The output above is from that tunnel. One interval had 11 percent loss and the five others were clean. The average of 1.8 percent stayed under the voice limit of 2 percent, so the tunnel remained eligible and the calls stayed on it while they were degraded. Nothing was misconfigured. The window was long enough to dilute the event below the limit.

Diagram
Evidence from the case
Evidence from the case

Calls were broken for ten minutes and then recovered. One measurement interval shows eleven percent loss and five show none. The average is below the voice limit. The tunnel stayed eligible, so traffic was not moved.

  1. SymptomCalls broken for about 10 minutesNormal again afterwards
  2. IntervalsOne interval: 11 percent lossFive intervals: no loss
  3. Average1.8 percent lossUnder the voice limit of 2
  4. ResultTunnel stayed eligibleTraffic was not moved
A long window protects against noise and hides short bursts. Both are the same property.

The choice is between a window that ignores short events and one that reacts to them. A window of 120 seconds and five intervals would have averaged the same event to 2.2 percent and made the tunnel ineligible for voice within one interval. It would also react to every short burst, and paths would change more often. Decide with data: read the statistics for several tunnels over a week, count how often short bursts occur, and set a window that matches how long users tolerate a problem. Then test it against a failure in the lab.

What the measurement can and cannot see

Diagram
Events and how the measurement treats them
Events and how the measurement treats them
EventSeen bySpeedNote
Tunnel stops answeringBFD livenessSecondsTraffic moves without the quality averages
Steady loss or jitter above the limitQuality averageOne windowThe tunnel becomes ineligible for the class
Short burst inside one intervalQuality average, dilutedOften not seenDepends on the window and the size of the burst
Loss in the local egress queueProbes share the queuePartlyCheck the queue counters on the interface as well
A path that fails slowly or briefly needs a different tool than a path that fails completely. Plan for both.
Diagram
Where a hidden quality problem can come from
Where a hidden quality problem can come from

A long window dilutes a short burst. A threshold close to normal values makes the result jumpy. A congested local queue delays the probes themselves. The two ends can see different values.

Quality problem not seen
  • Long windowshort burstsdiluted
  • Thresholdtoo loose ortoo close
  • Local queueprobes sharethe interface
  • Other enddirectiondiffers
Check the window first, then the threshold, then the local queue, then the other end.

Learn more: SLA Classes and Policy ThresholdsQoS, AAR and Application PerformanceIPsec/BFD Failures and Packet Drops

Test yourself

Predict · scenario 1

A tunnel stops answering completely. Which mechanism moves the traffic, and how fast?

Predict · scenario 2

Six intervals show loss of 8, 0, 0, 0, 0 and 0 percent. The voice limit is 2 percent. What is the average, and is the tunnel eligible for loss?

Predict · scenario 3

The poll interval is 120 seconds and five intervals are kept. How long is the averaging window?

Predict · scenario 4

Why not set the shortest possible window on every tunnel?

Predict · scenario 5

A tunnel uses a 500 ms hello interval and a multiplier of 7. About how long after it stops answering is it declared down?

Predict · scenario 6

Six intervals are kept. One interval shows 15 percent loss and the other five are clean. The voice limit is 2 percent. What happens?

Predict · scenario 7

Three intervals are kept and the voice limit is 2 percent. What single bad interval, with the others clean, is enough to push the average over the limit?

FAQ

Does Cisco SD-WAN send extra test traffic to measure quality?
No separate test stream is needed. The BFD packets that keep each tunnel monitored also carry what the edge needs to calculate loss, latency and jitter. Measurement therefore needs no probe configuration beyond the BFD timers.
Why does a failed tunnel go down in seconds while a poor tunnel is noticed in minutes?
Two different timers are involved. Liveness is decided by the BFD hello interval and multiplier, and it reacts to a tunnel that stops answering. Quality is averaged over the poll interval and the number of intervals kept, so a tunnel that still answers but performs badly is judged more slowly.
Can I shorten the averaging window?
Yes, the poll interval and the number of intervals are settings. A shorter window reacts sooner to a real problem, and it also reacts to short bursts that would have healed themselves, so path changes become more frequent. Read the permitted values and defaults for your release before you change them.
Are the measured values the same in both directions?
Not necessarily. Each edge calculates the values for the tunnels it sees, and the two directions of a path can differ. Read the statistics on both ends when a complaint is about one direction. Also check how your release defines latency, as round trip or one way, before you compare it with a limit.