SONiC
Module 4 · EVPN/VXLAN in SONiC

Underlay Design

35 minLesson

The overlay is only as good as the road beneath it. This lesson covers eBGP vs iBGP underlays, loopback and point-to-point addressing, ECMP, the reachability the VTEPs actually require, the MTU math VXLAN forces on you, and how underlay design draws your failure domains.

Prerequisites: Lesson 4.1 · BGP configuration in FRR (Module 3)

Learning objectives

  • Choose between an eBGP (per-leaf ASN) and iBGP (route-reflector) underlay and justify it.
  • State the *minimum* reachability the overlay needs: VTEP loopback to VTEP loopback.
  • Compute the MTU budget VXLAN overhead imposes and set underlay MTU accordingly.
  • Explain how ECMP is achieved and verified, and how underlay topology defines failure domains.
Why this matters

A large fraction of 'EVPN is broken' tickets are underlay tickets in disguise: a missing loopback route, an MTU too small for the encapsulated frame, or ECMP that silently isn't.

If you validate the underlay rigorously first, every later overlay failure is genuinely an overlay failure — which halves your search space.

What your CCNP already gives you

  • eBGP vs iBGP mechanics, route reflection, next-hop behavior.
  • ECMP concepts and BGP multipath.
  • Path-MTU and fragmentation fundamentals.

What is new in SONiC

  • FRR is the BGP implementation; underlay config is standard FRR you already read in Module 3.
  • SONiC interface MTU is set per-interface in CONFIG_DB and must account for VXLAN overhead explicitly.
  • Loopback advertisement and multipath are verified through both show ip route and vtysh.
Analogy — The road network under the shipping lanes
In the analogyIn SONiC
The public road networkUnderlay routed fabric
The street addresses of the terminalsVTEP loopbacks
Multiple parallel highways between two citiesECMP paths
The tunnel/bridge height limit trucks must clearMTU headroom
What it actually is: The underlay's only job is to deliver a packet addressed from one VTEP loopback to another. It does not need to know about tenants, VLANs, or VNIs — just how to route loopback prefixes, ideally over multiple equal-cost paths. The MTU is a hard clearance limit: the outer VXLAN headers add ~50 bytes, so if a full-size tenant frame plus headers exceeds the road's clearance, the 'truck' can't pass and forwarding silently fails for large frames only.
Where the analogy stops working

Roads are shared public infrastructure; a data-center underlay is private and you control every hop, so you can (and should) engineer MTU and ECMP precisely rather than hope. Also, unlike a truck that visibly can't fit, an MTU problem often manifests as *intermittent* failure (pings pass, bulk transfers hang) — a subtlety the analogy understates.

eBGP vs iBGP underlay

AspecteBGP underlay (per-device ASN)iBGP underlay (single ASN + route reflectors)
AS designUnique ASN per leaf/spine (often private 4-byte)One ASN fabric-wide; spines are route reflectors
Next-hop / path visibilityAS-path gives loop protection and easy multipathNeeds RR + next-hop-unchanged discipline for overlay
Config volumeMore neighbor/ASN config, very explicitFewer ASNs, but RR design must be correct
ECMPMultipath across spines is natural with distinct AS-pathsRequires bgp bestpath / add-path tuning
Common DC choicePopular for CLOS fabrics; simple to reason aboutCommon where an existing iBGP core is reused
Overlay peering is separate from underlay peering

The underlay carries loopback reachability; the EVPN (overlay) BGP sessions are typically established between loopbacks (often multihop). Do not conflate the two sessions — in troubleshooting they fail independently. A healthy underlay session does not imply a healthy EVPN session, and vice versa.

The only reachability the overlay demands

Reduce the requirement to its core: every VTEP loopback must be routable from every other VTEP loopback, and the EVPN sessions between those loopbacks must come up. That is it. Tenant subnets, VLANs, and VNIs are never carried by the underlay.

This is why underlay validation in Lab 4.1 is loopback-to-loopback ping plus route inspection — nothing tenant-related appears until the overlay exists.

MTU: the overhead you cannot ignore

VXLAN adds roughly 50 bytes of outer headers to every frame: outer Ethernet (14) + outer IPv4 (20) + UDP (8) + VXLAN (8), and more with IPv6 or additional tags. If tenant hosts send standard 1500-byte frames, the underlay must carry ~1550-byte packets without fragmentation.

The clean fix is jumbo frames on the underlay (e.g., interface MTU 9100/9216) so overhead is invisible to tenants. If you cannot raise underlay MTU, you must lower the tenant MTU — but that pushes complexity onto hosts. Either way, decide it deliberately; the default 1500 everywhere is the classic silent-VXLAN-failure setup.

MTU budget (IPv4 underlay, illustrative)

LayerBytesRunning total
Tenant frame (payload as seen by host)15001500
Inner Ethernet header (already in the 1500? no — added)141514
VXLAN header81522
UDP header81530
Outer IPv4 header201550
Outer Ethernet header141564
Exact numbers vary with tagging/IPv6; the point is the ~50-byte overlay tax. Size the underlay MTU with headroom (9100+ is common) rather than to the exact byte.

ECMP and failure domains

In a CLOS fabric, ECMP across spines gives you both bandwidth and resilience: losing one spine costs 1/N of capacity, not connectivity. In FRR this means BGP multipath must be enabled and the loopback must be learned via multiple equal-cost next hops — verify it, don't assume it.

Your underlay topology *is* your failure-domain map. A single shared spine, a single underlay link, or a single-homed leaf each defines a blast radius. Design so that no single underlay failure isolates a VTEP that hosts live tenants.

Troubleshooting implications
  • Before blaming EVPN, ping remote loopback from local loopback (correct source) — that is the overlay's true dependency.
  • Test large-frame reachability (DF-bit, size ~1500+) to expose MTU problems the small pings hide.
  • Confirm multipath in the RIB; a missing second next hop is a latent outage.

Key takeaways

  • The underlay's sole job: loopback-to-loopback reachability, ideally over ECMP.
  • eBGP-per-leaf and iBGP-with-RR are both valid; choose deliberately and keep overlay peering separate.
  • Budget ~50 bytes of VXLAN overhead — raise underlay MTU or you will hit silent large-frame failures.
  • Underlay topology defines your failure domains; validate the underlay fully before touching the overlay.

Tested against: SONiC 202305 / 202311 lineage · Upstream (community) unless noted · SONiC-VS (virtual) baseline · last reviewed 2026-07. Exact commands and behavior can vary by SONiC release, image, hardware platform, and enterprise distribution.

Knowledge check

Q1

Two-leaf VXLAN fabric; underlay interfaces were left at their default MTU.

Small pings between two tenant hosts succeed, but bulk file transfers hang and never complete across the overlay. The EVPN session is Established and the remote MAC is programmed. What is the most likely root cause?