Course contents

Unit 2: Advanced OMP and TLOCLesson 2.5 (1 of 1 in this unit)2 of 25 in the Advanced Cisco SD-WAN course

OSPF/BGP redistribution, tags and loop avoidance

Lab: connect OSPF and BGP on the service side, redistribute between those protocols and OMP, and stop the routing loops that two edges at one site can create.

Advanced · 20 min read

You'll learn to explain how routes move between OMP and a LAN routing protocol, predict how two edges at one site can create a loop, and stop it with tags.

Technical definition

Route redistribution is the act of taking routes learned by one routing protocol and advertising them into another. In SD-WAN the two sides are OMP (the overlay protocol) and the routing protocol of the site LAN, such as OSPF or BGP.

Why a second edge changes everything

At a single-edge site, redistribution is a one-way pipe each way and is hard to get wrong. At site 103 there are two WAN Edges, BR-03A (10.255.2.3) and BR-03B (10.255.2.4), both in OSPF area 0 with the LAN core in service VPN 10. Each edge can pass routes between OMP and OSPF. When both do, a route can leave the overlay through one edge, cross the LAN, and re-enter the overlay through the other. This lab builds that setup, shows the failure, and fixes it. Site IDs, system IPs and prefixes are examples.

The two directions

The two directions
The two directionsDirection; What it does; Control. LAN into OMP: Remote sites learn 10.10.3.0/24 and other site 103 prefixes Enabled per VPN on the edge, by route type (connected, static, OSPF, BGP) OMP into LAN: The core learns prefixes of remote sites, such as 10.10.1.0/24, 10.10.2.0/24 and 10.20.1.0/24 Redistribute OMP into OSPF or BGP on the edgeDirectionWhat it doesControlLAN into OMPRemote sites learn 10.10.3.0/24 andother site 103 prefixesEnabled per VPN on the edge, by routetype (connected, static, OSPF, BGP)OMP into LANThe core learns prefixes of remotesites, such as 10.10.1.0/24,10.10.2.0/24 and 10.20.1.0/24Redistribute OMP into OSPF or BGP onthe edge

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.
  • For OSPF, the commonly described default is that internal routes (intra-area and inter-area) go into OMP and external routes do not, until you enable them. Verify this for your release.
  • OMP routes redistributed into OSPF normally appear in the core as external routes (Type 5 LSAs, advertised by an ASBR, an edge acting as the boundary router). Verify the type in your release.
  • OMP routes are described as having an administrative distance of 251 on IOS XE SD-WAN, which is high, so an IGP route to the same prefix wins. Check the value on your release with show ip route vrf 10 <prefix>.

That last point is what turns a mistake into an outage. If an edge learns a remote prefix both from OMP and from OSPF, the OSPF copy wins. The edge then forwards towards the LAN instead of into the tunnel, and the packet goes to the other edge, which may do the same thing. See the administrative distance lesson if that term is new.

How the loop forms, step by step

  1. HUB-01 advertises 10.20.1.0/24 into OMP. Both BR-03A and BR-03B receive it.
  2. BR-03A redistributes OMP into OSPF. The core now has 10.20.1.0/24 as an external route from BR-03A.
  3. BR-03B hears the OSPF route from the core. If BR-03B also advertises OSPF external routes into OMP, it announces 10.20.1.0/24 to the overlay as a route it owns.
  4. BR-03B has two copies of the prefix: the OMP one (distance 251) and the OSPF one (a lower distance). The OSPF copy wins, so BR-03B sends traffic for 10.20.1.0/24 across the LAN towards BR-03A.
  5. BR-03A has the real OMP route and sends it into a tunnel. In the good case that works. If BR-03A also prefers an OSPF copy learned from BR-03B's advertisement, packets bounce between the two edges until the TTL (time to live) reaches zero.

Whether you get a bounce, a detour or a black hole depends on which combination of redistribution and route preference is configured. All of them are wrong, and all of them start with two redistribution points.

How a routing loop forms at a site with two edges
How a routing loop forms at a site with two edgesSite 103 has two WAN Edge routers, Edge A and Edge B, on one LAN that runs a routing protocol. Edge A redistributes OMP routes into the LAN protocol. Edge B redistributes LAN routes back into OMP. A prefix learned from the fabric can therefore come back into the fabric as if it began at the site, and the two edges can send traffic for it in circles. Tags and filters stop the route being redistributed a second time.SD-WAN fabric (OMP)Edge AEdge BSite LAN, routing protocolOMP into LANLAN back into OMPFix: tag on the way in, filter on the tag on the way back.

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

Tag routes when they are redistributed one way and refuse tagged routes when redistributing back the other way. Symptoms are a rising metric, a prefix that flaps and traffic that loops.

Recognising the symptoms

  • A traceroute from a site 103 host shows the same two hops repeating (BR-03A, then BR-03B, then BR-03A) and ends with TTL exceeded messages.
  • Latency to a remote site jumps, or only some flows fail.
  • High CPU on an edge as it forwards the same packets repeatedly.
  • A remote site sees site 103 advertising prefixes that belong to somewhere else.

Check first: which edge installs the prefix from which source. Then look at who originates the prefix in OMP.

Example output written for this lesson, simplified; real output has more fields and a different layout
BR-03B#show ip route vrf 10 10.20.1.0
Routing Table: 10
Routing entry for 10.20.1.0/24
  Known via "ospf 10", distance 110, metric 20, type extern 2
  Last update from 10.10.3.2 on GigabitEthernet5, 00:04:12 ago
  Routing Descriptor Blocks:
  * 10.10.3.2, from 10.255.2.3, 00:04:12 ago, via GigabitEthernet5
The prefix 10.20.1.0/24 belongs to the data centre. BR-03B should reach it through a tunnel (an OMP route), but it is installed from OSPF, learned from BR-03A across the LAN. The text "type extern 2" and the next hop 10.10.3.2 show it is a redistributed copy. This is the evidence of the first half of the loop.
Example output written for this lesson, simplified; real output has more fields and a different layout
HUB-01#show sdwan omp routes 10.20.1.0/24
VPN  PREFIX         FROM PEER    PATH ID  LABEL  STATUS  TLOC IP      COLOR         PREF
10   10.20.1.0/24   10.255.0.11  301      1002   C,I,R   10.255.2.4   biz-internet  -
On HUB-01 the prefix 10.20.1.0/24 is now also offered by BR-03B (10.255.2.4), a branch that should not originate it. This is the second half: the copy has re-entered OMP. The hub's own local route is normally preferred, but other sites may pick the wrong origin.

The loop-prevention toolkit

The loop-prevention toolkit
The loop-prevention toolkitTool; How it helps; Cost. Tag on redistribution: When OMP is redistributed into the LAN protocol, set a tag such as 3000. Routes carrying it are known to come from the overlay. A route policy on each edge Refuse the tag going back: When the LAN protocol is advertised into OMP, deny routes with that tag, so a copy cannot re-enter the overlay. A second route policy on each edge Community or AS path (BGP): Mark routes learned from OMP with a community and filter on it at the other edge, or keep AS-path checks on. Needs agreement with the BGP neighbour Fewer redistribution points: Let one edge do OMP into the LAN protocol where the design allows it. The other edge advertises only. A single edge carries the work. Plan its failure Summaries or defaults: Give the core a summary of overlay prefixes instead of each route. Less precise pathsToolHow it helpsCostTag on redistributionWhen OMP is redistributed into theLAN protocol, set a tag such as 3000.Routes carrying it are known to comefrom the overlay.A route policy on each edgeRefuse the tag goingbackWhen the LAN protocol is advertisedinto OMP, deny routes with that tag,so a copy cannot re-enter theoverlay.A second route policy on each edgeCommunity or AS path(BGP)Mark routes learned from OMP with acommunity and filter on it at theother edge, or keep AS-path checkson.Needs agreement with the BGPneighbourFewer redistributionpointsLet one edge do OMP into the LANprotocol where the design allows it.The other edge advertises only.A single edge carries the work. Planits failureSummaries or defaultsGive the core a summary of overlayprefixes instead of each route.Less precise paths

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.
route-map OMP-TO-OSPF permit 10 set tag 3000 ! route-map OSPF-TO-OMP deny 10 match tag 3000 ! route-map OSPF-TO-OMP permit 20 ! router ospf 10 vrf 10 redistribute omp subnets route-map OMP-TO-OSPF

Sketch only. On IOS XE SD-WAN the redistribution into OMP and the route policy that filters it are normally built in SD-WAN Manager templates, and the keywords here (redistribute omp, how the second route-map is attached) are not verified for your release. The tag value 3000 is an example. Verify the keywords in your release before use.

The idea is two plain-language rules: tag everything that comes out of the overlay, and refuse anything with that tag on its way back in. It works at a dual-edge site because the tag travels with the OSPF route to the other edge, where the deny rule catches it.

Tasks

Task 1: map the redistribution points

List every point at site 103 where a route moves between OMP and OSPF.

Show answer

Four, if both edges redistribute in both directions: BR-03A OMP into OSPF, BR-03A OSPF into OMP, BR-03B OMP into OSPF and BR-03B OSPF into OMP. Each pair can feed the other edge's pair. A good first step is to reduce this number.

Task 2: apply the tag rules

On both edges, tag routes from OMP into OSPF and deny that tag from OSPF into OMP. What should the OSPF routes look like in the core?

Show answer

10.20.1.0/24, 10.10.1.0/24 and 10.10.2.0/24 appear in the core with tag 3000. Check with show ip ospf database external and look for the tag value on those LSAs.

Example output written for this lesson, simplified; real output has more fields and a different layout
BR-03B#show ip ospf database external 10.20.1.0
            OSPF Router with ID (10.255.2.4) (Process ID 10 VRF 10)
                Type-5 AS External Link States
  LS age: 212
  Link State ID: 10.20.1.0 (External Network Number)
  Advertising Router: 10.255.2.3
  Network Mask: /24
        Metric Type: 2 (Larger than any link state path)
        Metric: 20
        External Route Tag: 3000
The advertising router is BR-03A and the External Route Tag is 3000. BR-03B's outbound rule now matches this tag and refuses to put the route back into OMP.

Task 3: confirm the overlay is clean

Which source should the data centre prefix show in the branch's routing table now?

Show answer

OMP, not OSPF. The OSPF copy still exists in the OSPF database, but check that the prefix is installed from OMP. If an OSPF copy is still installed instead, look at administrative distance on the edge and at whether your release lets you prefer OMP for those prefixes.

Example output written for this lesson, simplified; real output has more fields and a different layout
BR-03B#show sdwan omp routes 10.20.1.0/24
VPN  PREFIX         FROM PEER    PATH ID  LABEL  STATUS  TLOC IP      COLOR         PREF
10   10.20.1.0/24   10.255.0.11  101      1002   C,I,R   10.255.1.1   biz-internet  -
10   10.20.1.0/24   10.255.0.11  201      1002   R       10.255.1.2   biz-internet  -
The origins are HUB-01 (10.255.1.1) and HUB-02 (10.255.1.2). Neither site 103 edge appears as an origin. That is the clean state.

Optional part: eBGP to a legacy router

A legacy router behind site 103 may speak eBGP (external BGP, between different autonomous systems) with the edges. The same pattern applies with BGP tools. Mark routes from OMP with a community when sending them to the legacy router. Filter on that community when accepting routes from BGP into OMP at the other edge. Keep AS-path loop detection on its default behaviour unless you have a reason: two edges in one AS across a legacy router can reject each other's routes and break the path rather than cause a loop. See the BGP course for communities and AS paths.

Break and fix

Fault 1: tag set, but not filtered on the way back

Symptom: the core shows tag 3000 on remote prefixes, yet HUB-01 still sees BR-03B as an origin of 10.20.1.0/24.

Diagnosis and fix

The first rule works and the second does not. Check that the route policy that denies tag 3000 is attached to the OSPF-into-OMP direction on both edges, and that the OSPF routes it sees really carry the tag. Fix the attachment, then clear the route from OMP and re-check with show sdwan omp routes.

Fault 2: external OSPF routes not advertised into OMP

Symptom: a static default route redistributed into OSPF at the LAN core is missing at remote sites.

Diagnosis and fix

The edge advertises only internal OSPF routes into OMP unless external ones are enabled for that VPN. Confirm the route is in show ip route vrf 10 on the edge, then enable the external route type for advertisement. When doing so, keep the tag filter in place, since external routes are exactly what can loop.

Fault 3: one edge does both jobs and its failure takes the site

You reduced redistribution to BR-03A only. When BR-03A fails, the core loses all remote prefixes.

Diagnosis and fix

A single redistribution point is a single point of failure. Either accept it knowingly and test the failure, or use both edges with the tag rules from this lab, and different metrics so the core prefers one. Re-run the failure test and record how long the core takes to converge.

What to record

Keep the redistribution map (who redistributes what, in which direction), the tag value and where it is set and denied, the administrative distances you saw on your release, and a before and after of show sdwan omp routes for one remote prefix. Note the release and model, since keywords differ.

Test yourself on redistribution

Predict · scenario 1

BR-03B shows 10.20.1.0/24 installed from OSPF, next hop BR-03A, although HUB-01 is the origin. Why is the OSPF route winning over the OMP one?

Predict · scenario 2

You want to stop routes taken from OMP into OSPF at BR-03A from returning to OMP at BR-03B. What is the clean approach?

Predict · scenario 3

A traceroute from a site 103 host to 10.20.1.10 alternates between 10.10.3.2 and 10.10.3.3 and ends in TTL exceeded. What is the best first check?

Predict · scenario 4

Remote sites do not receive a default route that the LAN core injects into OSPF as an external route. The edge has it in its VPN 10 table. What is the likely reason?

FAQ

Does an SD-WAN edge advertise all its OSPF routes into OMP?
Not necessarily. By default only OSPF internal routes (intra-area and inter-area) are described as advertised into OMP, and external OSPF routes need to be enabled explicitly. Check the default for your release and the setting under the VPN's advertise options.
Why can redistribution cause a loop with two edges?
Edge A puts an OMP route into the LAN protocol. Edge B learns it from the LAN protocol and, if allowed, advertises it back into OMP as if it were local. Now the prefix has a second origin that is really a copy, and traffic can circle between the edges.
Is a tag part of the route or only a label on one router?
In OSPF and similar protocols a route tag travels with the route in the LAN protocol, so a second edge can read it. That is why tags work between two edges: the first edge sets the tag and the second one filters on it.