Course contents

Unit 2: Advanced OMP and TLOCLesson 2.2 (2 of 8 in this unit)7 of 63 in the Advanced Cisco SD-WAN course

Best path, route availability and selection factors

Predict which OMP routes are chosen: usable routes first, then route preference, then TLOC preference, with equal routes sharing traffic under a send path limit and the later tie-breakers kept out of the design.

Advanced · 25 min read

You'll learn to predict which OMP routes are chosen from their usability, route preference and TLOC preference, work out how equal routes share traffic under a path limit, and set preferences so the later tie-breakers do not have to decide.

Technical definition

OMP best-path selection is the ordered comparison that decides which of several OMP routes for the same prefix are chosen and installed. A route must first be usable. Among usable routes, the comparison looks at route preference, then TLOC preference, then further tie-breakers. Routes that are still equal after the comparison are all chosen and share the traffic.

One number does not decide

A branch has four routes to the application prefix 10.20.1.0/24: through HUB-01 on mpls, HUB-01 on biz-internet, HUB-02 on mpls and HUB-02 on biz-internet. Someone raises a preference somewhere, and the question is which of the four routes carry traffic afterwards. The answer depends on which preference was raised, on which route, and on what the other routes look like, because the choice is made by an ordered comparison and not by the biggest number on the screen.

Diagram
One biggest number against an ordered comparison
One biggest number against an ordered comparison

Looking for the biggest number on the screen suggests that any raised preference wins. The real choice is an ordered comparison: a route must be usable first, then route preference is compared, then TLOC preference, and only a tie moves on to the next step.

The biggest numberany raised valueshould win
The ordered stepsusable, then route,then TLOC preference
The order of the steps decides which number matters, so the same change can do a lot or nothing.

The comparison as a funnel

Think of the comparison as a funnel. Each stage removes routes or keeps only those with the best value, and later stages are reached only by routes that are still tied.

Diagram
The selection funnel
The selection funnel

First, routes that are not usable are removed. Then the routes with the highest route preference stay. Of those, the routes with the highest TLOC preference stay. Further tie-breakers apply if routes are still equal. Routes that remain are all chosen and share the traffic up to the path limit.

  1. Usablevalid and theTLOC resolves
  2. Route preferencehighest valuestays
  3. TLOC preferencehighest valuestays
  4. Later stepsorigin, router ID,TLOC address
  5. Shareequal routessplit the flows
Each stage is reached only by the routes that tied at the stage before.
Diagram
What each stage asks
What each stage asks
StageQuestionWhich value winsAgreement in public references
UsableIs the route valid and does its TLOC resolve?Not a comparison: unusable routes are removedAgreed
Route preferenceHow strongly was the route advertised?HigherAgreed, before TLOC preference
TLOC preferenceHow strongly is this transport preferred?HigherAgreed, after route preference
Later tie-breakersOrigin type, origin metric, router ID, TLOC addressDiffers by stepOrder and direction differ, check the release
Equal routesWhich routes are still tied?All of them are chosenAgreed, with a limit
Based on public references that agree on the first stages and differ on the later ones. Some references also list a local administrative distance and an active-versus-stale check ahead of preference. Those are local or session-state checks and not settings used to steer, so this lesson counts them under usable.

Usable first: a route that cannot resolve cannot win

Before any comparison, a route must be usable. It has to be valid, and the TLOC it points to has to resolve: the edge must know how to reach that transport address, and on an edge the route is installed for forwarding only when a tunnel to that TLOC is working. A route that fails this test is out, and its preference is not looked at.

Diagram
Why preference cannot rescue an unusable route
Why preference cannot rescue an unusable route

A route that is chosen, installed and resolved takes part in the comparison. A route that is resolved but loses the comparison is kept as a backup candidate. A route whose TLOC is unresolved is removed before preference is looked at, however high it is.

  1. ChosenResolved, and wins the comparisonInstalled and carries traffic
  2. BackupResolved, but loses on a stepKept, but carries nothing now
  3. UnresolvedThe TLOC cannot be reachedRemoved before preference counts
Check the status code before reading the preference.

Two steering knobs: route preference and TLOC preference

An engineer has two preferences to steer with, and they act at different levels. Route preference belongs to a route, and is the knob for choosing one hub over another. TLOC preference belongs to a transport, so it decides between the transports of the same hub, once the route preference is equal.

Diagram
Route preference and TLOC preference
Route preference and TLOC preference

Route preference is set on the routes that a site advertises and decides between hubs. TLOC preference is set on a transport and decides between the transports of one hub. Because route preference is compared first, TLOC preference only matters between routes whose route preference is equal.

Route preferencea route, set per sitechooses the hub
TLOC preferencea transportchooses mpls or Internet
Pick the hub with route preference, then pick the transport with TLOC preference.
Diagram
Which knob for which goal
Which knob for which goal
GoalKnobCompared whenA common mistake
Prefer HUB-01 over HUB-02Route preferenceEarly, before TLOC preferenceRaising TLOC preference on the other hub and expecting a change
Prefer mpls over biz-internet at one hubTLOC preferenceOnly between equal route preferencesSetting it and leaving route preference unequal between the hubs
Make two paths shareEqual values at both stepsBoth stages tieForgetting a limit on the number of equal paths
Keep a route as a backup onlyLower value than the primaryAt the stage where they first differGiving it a higher value by accident
Higher is better for both preferences. Where a preference is set, on the tunnel interface or by a control policy, depends on the design and release, so check the documentation for the version in use.

Equal routes and the send path limit

Routes that tie at every stage are all chosen and share the flows. The Controller does not send every equal route to every edge: it advertises at most a configured number of paths, the send path limit. Public references give the default as 4 and a range of 1 to 16, and the limit is a Controller setting. When more routes are equal than the limit, the later tie-breakers decide which ones are sent, and the rest do not reach the branch.

Diagram
Equal routes against a send path limit of 4 (computed)
Equal routes against a send path limit of 4 (computed)
Equal routesPaths advertised with a limit of 4Routes left outShare of traffic on each advertised path
2 equal routes2050.0 %
4 equal routes4025.0 %
6 equal routes (3 hubs, 2 transports)4225.0 %
8 equal routes (4 hubs, 2 transports)4425.0 %
16 equal routes41225.0 %
Computed by script as the smaller of the equal routes and the limit, with traffic split evenly over the advertised paths. Real sharing follows a flow hash and is only roughly even. Raising the limit to 6 would advertise all 6 routes in the third row and give each 16.7 percent. The equal-cost limit of the edge also applies, so check both.

The practical point is that in a network with many hubs and transports, equal routes are quietly cut down to the limit, and the routes that are cut are chosen by tie-breakers that nobody set on purpose. If a design depends on a particular path being used, make that path win by preference and not by a tie-breaker.

The later tie-breakers: set preferences so they do not decide

Beyond TLOC preference, references list further steps: the type of the route at its origin, the origin metric, the router ID of the originator and the TLOC address. One reference uses the first of them in deciding whether routes are equal at all, and the last ones to rank routes when more are equal than the send path limit. The references differ in order, and for the last two they even differ on whether the higher or the lower value wins. That is a reason to treat these steps as a last resort that the design does not rely on.

Diagram
The later tie-breakers
The later tie-breakers

After route preference and TLOC preference, references list the origin type, the origin metric, the router ID and the TLOC address. Their order and direction differ between sources, so a design should not depend on them.

Still tied
  • Origin typeconnected, static,then protocols
  • Origin metriccompared only forthe same origin
  • Router IDsystem IP ofthe originator
  • TLOC addressthe last resortto break a tie
If a design reaches these steps, a preference is missing.
Diagram
How to keep the later steps from deciding
How to keep the later steps from deciding
SituationRiskWhat to set instead
Two hubs meant as primary and DR with equal preferenceBoth are chosen and share traffic, so the DR hub carries production flowsDifferent route preference on the two hubs
Two transports meant as preferred and backup with equal TLOC preferenceBoth transports share traffic, so the Internet circuit carries halfDifferent TLOC preference on the two transports
More equal routes than the send path limitWhich routes are cut is decided by tie-breakersMake the wanted paths win, or raise the limit
A design document that says 'lowest router ID wins'The direction differs between referencesVerify on the release, then record the result
The safest design gives every intended winner an explicit preference. Verify the behaviour of the release with a test, as in the fault-injection lab, and record it.

A worked case: half the flows crossed the Internet circuit

The design says: use HUB-01 first, and inside HUB-01 prefer mpls over biz-internet. Priya's colleague set route preference 200 on the routes that HUB-01 originates, and nothing else. Users at BR-01 then complain that some application flows are slower than before, and the monthly Internet circuit usage has jumped. Priya reads the routes for the prefix at BR-01.

Example output written for this lesson, simplified; real output has more fields and a different layout
BR-01#show sdwan omp routes 10.20.1.0/24
FROM     TLOC IP      COLOR         PREFERENCE  STATUS
HUB-01   10.255.1.1   mpls          200         C,I,R
HUB-01   10.255.1.1   biz-internet  200         C,I,R
HUB-02   10.255.2.1   mpls          0           R
HUB-02   10.255.2.1   biz-internet  0           R
Both HUB-01 routes are chosen and installed, with the same route preference of 200 and the default TLOC preference, so they tie and share the flows. HUB-02's routes are resolved but lose on route preference and carry nothing. Real output has more fields and a different layout.
Diagram
Evidence from the case
Evidence from the case

Both HUB-01 routes have route preference 200, so HUB-01 wins over HUB-02 as intended. The two HUB-01 routes tie on TLOC preference, which was left at the default, so the flows are shared between mpls and biz-internet. An attempt to fix it by raising the TLOC preference on HUB-02's mpls TLOC changes nothing, because HUB-02 already lost on route preference.

  1. Hub choiceRoute preference 200 on HUB-01HUB-01 wins over HUB-02 as intended
  2. Transport choiceTLOC preference left at the defaultmpls and biz-internet tie and share
  3. First fixTLOC preference raised on HUB-02 mplsNo effect: HUB-02 lost earlier
  4. Real fixTLOC preference raised on HUB-01 mplsOnly HUB-01 mpls is chosen
The hub choice worked. The transport choice had no knob set, and the first fix touched the wrong route.

The repair raises the TLOC preference of HUB-01's mpls TLOC to 200, so it wins the second comparison among the two HUB-01 routes. The table follows what happens to 1,000 example flows at each step, including the failures that the design has to survive.

Diagram
Where 1,000 example flows go at each step (computed)
Where 1,000 example flows go at each step (computed)
StepHUB-01 mplsHUB-01 biz-internetHUB-02 mplsHUB-02 biz-internet
Start: route preference 200 on HUB-01 only50050000
First fix: TLOC preference 200 on HUB-02 mpls50050000
Real fix: TLOC preference 200 on HUB-01 mpls1,000000
Then the HUB-01 mpls TLOC is unresolved01,00000
Then both HUB-01 TLOCs are unresolved00500500
Worked out by script with a simplified model: usable routes only, then highest route preference, then highest TLOC preference, then an even split. Real selection has more steps and real sharing follows a flow hash, so the split is only roughly even. Example flows, not measurements.

The last two rows show the behaviour the design wanted. When the mpls tunnel to HUB-01 fails, the traffic moves to HUB-01's Internet transport and stays at HUB-01. It reaches HUB-02 only when both HUB-01 routes are unusable. The test that proves it is to fail the transport in the lab and read the routes again, as in the fault-injection lesson.

Learn more: OMP Route AttributesDual-Hub SD-WAN DesignOMP Black Holes and TLOC ResolutionOMP State and Update Processing

Test yourself

Predict · scenario 1

HUB-01's route has route preference 200 and an unresolved TLOC. HUB-02's route has route preference 0 and resolves. Which route carries the traffic?

Predict · scenario 2

Two hubs advertise the same prefix with the same route preference. HUB-01's mpls TLOC has TLOC preference 200 and HUB-01's biz-internet TLOC has the default. HUB-02's TLOCs have the default. Which routes are chosen?

Predict · scenario 3

An engineer wants HUB-01 to be the primary hub. HUB-01's routes have route preference 0, the same as HUB-02, and the engineer raises the TLOC preference on one HUB-01 transport to 200. What is the result?

Predict · scenario 4

Six routes are equal at every stage and the send path limit is 4. How many paths does the Controller advertise to a branch?

Predict · scenario 5

An engineer raises the TLOC preference on HUB-02's mpls TLOC to 200 to make HUB-02 preferred. HUB-01's routes have route preference 200 and HUB-02's have route preference 0. What changes?

Predict · scenario 6

Four routes tie on route preference and TLOC preference. Two of them come from HUB-01 and two from HUB-02. What happens at the edge, ignoring any limit?

Predict · scenario 7

A reference says the router with the lowest router ID wins ties, and another says the highest wins. What is the sensible design response?

Predict · scenario 8

In the case, the HUB-01 mpls TLOC has TLOC preference 200 and then becomes unresolved. HUB-01 routes keep route preference 200 and HUB-02's routes have route preference 0. Where does the traffic go?

FAQ

Which is compared first, route preference or TLOC preference?
Route preference. Public references agree that it comes before TLOC preference. So a TLOC preference only decides between routes whose route preference is already equal. Raising it on a route that loses on route preference changes nothing.
Is a higher preference better?
Yes, for both route preference and TLOC preference a higher number wins. This is the opposite of a metric or administrative distance, where lower is better, so it is a common source of mistakes.
What happens when two routes tie at every step?
Both are chosen and installed, and traffic is shared between them by flow, up to the equal-cost limit of the device. The Controller also advertises at most a configured number of equal paths to each edge, the send path limit.
Are the later tie-breakers the same on every release?
Do not rely on that. Public references list the later steps, such as origin type, origin metric, router ID and TLOC address, in different orders, and disagree on whether a higher or a lower router ID wins. Check the documentation for the release in use, and set preferences explicitly so these steps do not have to decide.
Does an unresolved route ever win?
No. A route whose TLOC cannot be reached is not usable, so it is left out before any preference is compared, however high its preference is.