Course contents

Unit 7: IPsec and BFDLesson 7.1 (1 of 5 in this unit)42 of 62 in the Cisco SD-WAN course

Transport encapsulation and IPsec security

How data tunnels are encapsulated and protected, how keys travel through the control plane, and how this differs from control-connection security.

Intermediate · 9 min read

You'll learn to say how WAN Edge tunnels are encapsulated and protected, how keys reach the peers, and how the data plane differs from control connection security.

Technical definition

Data-plane security (IPsec) is the protection of user traffic between WAN Edges. By default each tunnel carries traffic inside IPsec using ESP, which encrypts and authenticates it. The keys are not negotiated per tunnel with a handshake; they are advertised through the control plane.

Two kinds of security

Diagram
Control and data
Control and data

Different protection for different traffic.

Control planeDTLS or TLSWAN Edge to controllers
Data planeIPsec ESPWAN Edge to WAN Edge
Both rely on certificates and the control plane.

Control connections protect the routing and configuration information. The tunnels between WAN Edges carry the users' traffic, and they have their own protection, which is the subject of this lesson.

Encapsulation choices

Diagram
Tunnel encapsulation
Tunnel encapsulation
EncapsulationEncrypts?Use
IPsec (ESP)Yes, with authenticationDefault; used over the internet and wherever privacy matters
GRENoWhere encryption is unnecessary or applied elsewhere
Encapsulation is part of the TLOC. Two TLOCs need a common encapsulation to form a tunnel.

How the keys are shared

Diagram
Key distribution
Key distribution

Keys travel through the control plane.

  1. WAN Edgecreates a key
  2. OMPadvertises it with the TLOC
  3. Peersreceive via the Controller
  4. Tunneltraffic is encrypted
No per-tunnel handshake is needed.

Each WAN Edge generates a key for the traffic it will receive and advertises it with its TLOC through OMP. Peers use that key when sending to it. The design avoids a negotiation between every pair of sites, which is why large fabrics form tunnels quickly. Some releases also offer keys unique to each pair of devices, at the cost of more state. The key is replaced periodically, and the old one stays valid for a short overlap so traffic is not lost.

  • The algorithms and authentication options differ by release and platform; check the security configuration guide.
  • If certificates or control connections fail, new keys cannot be distributed, so tunnels eventually fail.
  • An IPsec problem shows as a missing or flapping BFD session, covered in the next lesson.
Example output written for this lesson, simplified; real output has more fields and a different layout
BR-01#show sdwan ipsec outbound-connections
SOURCE IP      DEST IP        SOURCE PORT  DEST PORT  ENCRYPT
203.0.113.10   198.51.100.20  12346        12346      AES-256-GCM
One outbound tunnel with its encryption suite. The command name, columns and cipher shown are illustrative and depend on the release.

Learn more: Control Connections (DTLS and TLS)Overlay and TunnelsTLOC Components

Test yourself

Predict · scenario 1

Which protects user traffic between two WAN Edges by default?

Predict · scenario 2

How do peers learn the key for sending to a WAN Edge?

FAQ

Is control traffic protected the same way?
No. Control connections to the Controller, Validator and Manager use DTLS or TLS. IPsec protects the data tunnels between WAN Edges. The two have separate keys and mechanisms.
When would GRE be used instead of IPsec?
GRE carries traffic without encrypting it. It is chosen when encryption is not needed, for example over a private circuit, or when another device already encrypts. Some designs support both encapsulations on one TLOC.
How often do the keys change?
The keys are refreshed on a timer, commonly once a day by default, and the rekey time can be configured. Check the value and the key-exchange options for your release.