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.
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 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.
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.
- Usablevalid and theTLOC resolves
- Route preferencehighest valuestays
- TLOC preferencehighest valuestays
- Later stepsorigin, router ID,TLOC address
- Shareequal routessplit the flows
| Stage | Question | Which value wins | Agreement in public references |
|---|---|---|---|
| Usable | Is the route valid and does its TLOC resolve? | Not a comparison: unusable routes are removed | Agreed |
| Route preference | How strongly was the route advertised? | Higher | Agreed, before TLOC preference |
| TLOC preference | How strongly is this transport preferred? | Higher | Agreed, after route preference |
| Later tie-breakers | Origin type, origin metric, router ID, TLOC address | Differs by step | Order and direction differ, check the release |
| Equal routes | Which routes are still tied? | All of them are chosen | Agreed, with a limit |
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.
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.
- ChosenResolved, and wins the comparisonInstalled and carries traffic
- BackupResolved, but loses on a stepKept, but carries nothing now
- UnresolvedThe TLOC cannot be reachedRemoved before preference counts
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.
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.
| Goal | Knob | Compared when | A common mistake |
|---|---|---|---|
| Prefer HUB-01 over HUB-02 | Route preference | Early, before TLOC preference | Raising TLOC preference on the other hub and expecting a change |
| Prefer mpls over biz-internet at one hub | TLOC preference | Only between equal route preferences | Setting it and leaving route preference unequal between the hubs |
| Make two paths share | Equal values at both steps | Both stages tie | Forgetting a limit on the number of equal paths |
| Keep a route as a backup only | Lower value than the primary | At the stage where they first differ | Giving it a higher value by accident |
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.
| Equal routes | Paths advertised with a limit of 4 | Routes left out | Share of traffic on each advertised path |
|---|---|---|---|
| 2 equal routes | 2 | 0 | 50.0 % |
| 4 equal routes | 4 | 0 | 25.0 % |
| 6 equal routes (3 hubs, 2 transports) | 4 | 2 | 25.0 % |
| 8 equal routes (4 hubs, 2 transports) | 4 | 4 | 25.0 % |
| 16 equal routes | 4 | 12 | 25.0 % |
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.
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.
- Origin typeconnected, static,then protocols
- Origin metriccompared only forthe same origin
- Router IDsystem IP ofthe originator
- TLOC addressthe last resortto break a tie
| Situation | Risk | What to set instead |
|---|---|---|
| Two hubs meant as primary and DR with equal preference | Both are chosen and share traffic, so the DR hub carries production flows | Different route preference on the two hubs |
| Two transports meant as preferred and backup with equal TLOC preference | Both transports share traffic, so the Internet circuit carries half | Different TLOC preference on the two transports |
| More equal routes than the send path limit | Which routes are cut is decided by tie-breakers | Make the wanted paths win, or raise the limit |
| A design document that says 'lowest router ID wins' | The direction differs between references | Verify on the release, then record the result |
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.
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 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.
- Hub choiceRoute preference 200 on HUB-01HUB-01 wins over HUB-02 as intended
- Transport choiceTLOC preference left at the defaultmpls and biz-internet tie and share
- First fixTLOC preference raised on HUB-02 mplsNo effect: HUB-02 lost earlier
- Real fixTLOC preference raised on HUB-01 mplsOnly HUB-01 mpls is chosen
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.
| Step | HUB-01 mpls | HUB-01 biz-internet | HUB-02 mpls | HUB-02 biz-internet |
|---|---|---|---|---|
| Start: route preference 200 on HUB-01 only | 500 | 500 | 0 | 0 |
| First fix: TLOC preference 200 on HUB-02 mpls | 500 | 500 | 0 | 0 |
| Real fix: TLOC preference 200 on HUB-01 mpls | 1,000 | 0 | 0 | 0 |
| Then the HUB-01 mpls TLOC is unresolved | 0 | 1,000 | 0 | 0 |
| Then both HUB-01 TLOCs are unresolved | 0 | 0 | 500 | 500 |
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
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?
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?
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?
Six routes are equal at every stage and the send path limit is 4. How many paths does the Controller advertise to a branch?
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?
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?
A reference says the router with the lowest router ID wins ties, and another says the highest wins. What is the sensible design response?
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?