Sub topic 13
Overlay tunnels across multiple transports
This chapter assumes you know IPv4 addressing, basic routing, and how an IPsec VPN protects traffic over the internet. It also assumes you have read the SD-WAN architecture chapter, so the terms control plane and data plane are familiar.
What an overlay is
An SD-WAN overlay is a set of tunnels that the SD-WAN edge devices build on top of whatever IP connectivity already exists. The existing connectivity is the underlay. The underlay can be an MPLS service, a broadband internet link, or an LTE or 5G connection. The underlay only has to deliver IP packets between the edge devices' addresses. It knows nothing about the sites, the VPNs, or the applications that ride inside the tunnels.
This separation is the central idea. The provider no longer decides how your sites connect. Your edge devices decide, because they build the topology themselves.
Transports, colors, and TLOCs
Each physical uplink on an edge device is a transport. Every transport has its own public or private IP address, its own provider, its own cost, and its own quality.
SD-WAN systems give each transport a label so policy can refer to it. Cisco SD-WAN calls the label a color, for example mpls, biz-internet, or lte. Colors are classed as private or public. A private color is reachable without NAT between sites, such as MPLS. A public color usually sits behind NAT, such as the internet.
An edge advertises each of its transports to the controllers as a TLOC (transport locator). In Cisco SD-WAN a TLOC is the tuple of system IP, color, and encapsulation. Other vendors use different names, but the idea is the same: a named endpoint that a tunnel can terminate on.
The edge learns the following from the controllers:
- Which other edges exist.
- Which TLOCs each one offers.
- Which TLOCs it may connect to, based on topology policy.
The edge then builds a tunnel for each usable pair of TLOCs. A site with three transports talking to a site with three transports can have up to nine pairings, though policy usually limits this. Color restrictions are a common limit. For example, a site may be allowed to pair mpls only with mpls.
Encapsulation: IPsec or GRE
Most SD-WAN products carry the tunnel payload in one of two ways.
| Encapsulation | Protection | Typical use |
|---|---|---|
| IPsec (ESP) | Encrypted and authenticated | Any transport, and always on the internet |
| GRE | None | Private transports where encryption is not required |
IPsec is the default for internet transports. Some designs use it on MPLS too, for defense in depth or compliance. GRE saves CPU and overhead but offers no confidentiality, so it only suits circuits the provider keeps private, and many organizations still choose to encrypt.
The difference from a traditional IPsec VPN is how the tunnels are set up. Classic site-to-site IPsec needs an administrator to configure peers, pre-shared keys or certificates, and crypto policies on every pair of devices. In SD-WAN the controllers authenticate each edge with certificates and distribute the keying material. New sites join the overlay automatically, so a full mesh does not become a configuration burden.
How the pieces fit together
The control plane and the data plane do different jobs.
- An edge boots and reaches the orchestrator. The orchestrator tells it which controllers to contact and authenticates it.
- The edge connects to the controllers over each transport and advertises its TLOCs and its local routes.
- The controllers send each edge the routes and TLOCs of the other sites, plus any topology policy.
- Edges build data-plane tunnels directly to each other. Traffic does not pass through the controllers.
Because the controllers hold only control traffic, they can be reached over the internet from every site. A controller outage stops new route updates, but tunnels that are already up keep carrying traffic for a configurable period.
Segmentation inside the overlay
Most SD-WAN overlays carry several separate routing domains, called VPNs or segments, over the same tunnels. The edge tags each packet with a segment identifier before encrypting it. The remote edge reads the tag and places the packet in the matching routing table.
This does the same job as a VRF in an MPLS Layer 3 VPN, but the identifier travels inside the customer's own tunnel, not in a provider label. Guest Wi-Fi, point-of-sale systems, and corporate users can then stay separate across the whole WAN without the provider being involved.
Tunnel health: BFD
An overlay needs to know whether each tunnel works and how well. SD-WAN edges run BFD (Bidirectional Forwarding Detection) inside every tunnel. BFD sends small probe packets at a regular interval. Each probe gives three measurements:
- Latency: the round-trip delay.
- Loss: the share of probes that never come back.
- Jitter: the variation in delay.
If probes stop arriving for several intervals, the edge marks the tunnel down and moves traffic to another one in about a second or less. The next chapter shows how these measurements feed application-aware policy. Here the key point is that the measurements are made inside the overlay, on the real path, not inferred from the provider's reports.
NAT traversal
Internet transports often put an edge behind a NAT device. The edge's own interface address is private, so the other side cannot reach it directly. SD-WAN handles this in two ways:
- Each edge learns its public address and port by asking a controller or a helper service. It advertises both the private and the public address, so peers pick the one that works.
- IPsec runs inside UDP, usually with NAT-T on UDP port 4500 or the product's own ports, so the NAT can track the flow.
Two edges that are both behind NAT can usually connect, because both send outbound packets first and each NAT creates a mapping. Some strict NAT types, such as symmetric NAT, break this. In that case the traffic has to relay through a third device or use a different transport.
Overhead and MTU
Every tunnel adds headers. An IPsec ESP tunnel with a UDP wrapper adds roughly 50 to 80 bytes, depending on the cipher and the product. On a 1500-byte Ethernet link, the usable inner MTU drops to about 1400 bytes.
If the inner packet is larger than the tunnel can carry and the Don't Fragment bit is set, the packet is dropped. Hosts then depend on ICMP "fragmentation needed" messages to lower their packet size. Firewalls often block those messages, so the symptom is odd: pings work, small web pages load, and large transfers stall.
The common fixes are:
- Set the tunnel interface MTU explicitly, for example 1400.
- Clamp the TCP maximum segment size (MSS) on the tunnel so that TCP connections never send oversized segments.
- Check the real path with a ping that sets the DF bit.
! Cisco IOS XE example: clamp TCP MSS on a tunnel interface
interface Tunnel100
ip mtu 1400
ip tcp adjust-mss 1360The 1360 value is the MTU minus 40 bytes for the IP and TCP headers.
Overhead also affects capacity planning. Small voice packets, such as 20 ms G.711 samples of 160 bytes, can gain a large share in extra header bytes. A 100 Mbps broadband link will carry less than 100 Mbps of useful traffic once tunnel overhead is counted.
Common errors
- Assuming all transports are equal. Broadband and LTE have different loss and jitter profiles than MPLS. A tunnel being up does not mean it is good.
- Forgetting that each transport has its own NAT and firewall state. A rule that allows the control connection on one uplink may not exist on another.
- Ignoring MTU. It is the most common cause of "the tunnel is up but the application is slow or broken".
- Letting the underlay leak. If the edge's underlay routes (the addresses used to build tunnels) are advertised into the overlay, packets can loop or bypass the tunnel. Keep underlay and overlay routing separate.
- Counting only the headline bandwidth. The overlay shares the link with the underlay's own control traffic and probing.
Summary of the working model
An edge builds one tunnel per allowed TLOC pair. The controllers distribute reachability and keys. BFD measures each tunnel. Segment tags keep customer domains separate. The underlay is just IP transport. Routing and policy then operate on the tunnels, which is how one site can use MPLS, broadband, and LTE at once.
Exercise
Site A has two transports (mpls and biz-internet) and Site B has the same two. Policy allows tunnels only between TLOCs of the same color. How many data-plane tunnels does the overlay build between A and B, and why might a ping across a working tunnel still fail for large packets?
Show answer
Two tunnels, one over mpls and one over biz-internet, because same-color pairing removes the two cross-color combinations (four pairs possible, two allowed). Large packets can fail because tunnel headers reduce the usable MTU. If the inner packet exceeds it with DF set, it is dropped, and blocked ICMP messages stop the sender from learning the smaller size. Setting the tunnel MTU and clamping TCP MSS fixes it.
Exercise
Why do the controllers not become a bandwidth bottleneck in an SD-WAN overlay?
Show answer
They carry only control-plane traffic (TLOCs, routes, policies, keys). Edges send user data directly to each other through data-plane tunnels.