Graphic: VXLAN, DCI and multicast between data centers

In short: VXLAN is a technique that “stretches” a Layer 2 network over a Layer 3 network. Together with the BGP EVPN control plane it is today the standard way of building data center networks and one of the main ways of interconnecting them (DCI). When joining locations, the key is to limit the failure domain: in a Multi-Site architecture each data center is a separate “site” with border gateways between them. Multicast in VXLAN works on two levels (BUM traffic in the underlay, and application multicast in the overlay), and each has several variants and limitations. A particularly demanding use of multicast is in high-frequency trading (HFT) networks, which we cover in a separate article.

What VXLAN is and why it was created

VXLAN (Virtual eXtensible LAN, RFC 7348) is described as “a Layer 2 overlay scheme on a Layer 3 network”, intended for multi-tenant virtualized data centers. Each overlay is a VXLAN segment, and only machines in the same segment can communicate.

  • The segment identifier (VNI) is 24 bits, giving up to 16 million segments in one administrative domain (a VLAN identifier, by comparison, is 12 bits).
  • Encapsulation: the original Ethernet frame is wrapped in an 8-byte VXLAN header, and that in a UDP datagram with destination port 4789. The source port is to be a hash of fields of the inner frame so that the network can spread traffic over many paths (ECMP).
  • Tunnel endpoints are called VTEPs. They can be on a switch (leaf), a router or in a hypervisor.
  • Overhead: the RFC does not give a total, but from the header lengths it follows that 14 B (Ethernet) + 20 B (IPv4) + 8 B (UDP) + 8 B (VXLAN) = 50 bytes for IPv4 without a VLAN tag (our calculation).
  • MTU: a VTEP must not fragment VXLAN packets, and the RFC recommends raising the MTU of the physical network. In practice vendors recommend jumbo frames. For example, Cisco’s guide specifies an MTU of 9216 in the underlay, as the maximum server MTU (9000) plus VXLAN overhead (Cisco).

EVPN: the control plane that brings order to VXLAN

By default VXLAN learns addresses from traffic (flood-and-learn). In a large network this means flooding unknown addresses and ARP. RFC 8365 describes using EVPN as the control plane for network virtualization overlays (including VXLAN). Instead of data-plane learning it uses control-plane learning: MAC and IP addresses are advertised through BGP, which reduces flooding of unknown unicast and ARP. EVPN also supports machine mobility (MAC mobility) and multihoming.

In practice a distributed anycast gateway goes with it: the same IP and MAC address of the default gateway on all VTEPs. A machine that moves between VTEPs does not need to resolve the gateway address again (Cisco). This matters for DCI because it reduces the “tromboning” of traffic over the link between locations.

VXLAN between data centers (DCI)

Joining two or more data centers with a VXLAN overlay is usually done for: moving virtual machines and workloads, business continuity (DR, active-active), migrations and consistent tenant segmentation across several locations. The differences are in how they are joined.

Diagram: two data centers with spine-leaf fabrics and Border Gateways joined by a DCI network, with a single multicast stream carried between them

Three models

  1. One stretched fabric. The underlay and overlay span all locations like one network. It is the simplest, but the whole network becomes a single failure and configuration domain: a problem in one location can affect another. For large environments vendors recommend a different approach.
  2. EVPN Multi-Site with Border Gateways (BGWs). Each data center is a separate site (in the Cisco example, a separate BGP autonomous system). BGWs “separate” the fabric from the network joining the locations: they terminate the VXLAN tunnel and create a new one (re-originate), and the VTEPs inside the site are hidden so that only BGW addresses are visible in the DCI network. eBGP is used between sites. For Layer 2 BUM traffic between sites the BGWs use Ingress Replication, so no multicast is needed in the DCI. A Designated Forwarder is elected per VNI to avoid duplicates. There are also mechanisms to limit the impact of failures: storm control on the way out of a site and link tracking (fabric/DCI tracking), which withdraws the BGW’s advertisements when it loses connectivity to the fabric or to the DCI. Cisco’s guide describes this as separate failure domains (Cisco: VXLAN EVPN Multi-Site, design guide). Other vendors have analogous solutions, but names and limitations differ.
  3. Interconnect through gateways or MPLS-style ASBRs. RFC 8365 describes two models. In the first, the gateway terminates EVPN routes and translates VNIs between domains: nodes in a data center may hold only local routes, and withdrawals after a failure stay within the location, which improves convergence. In the second (in the style of inter-AS Option B) nodes hold larger tables and the DCI devices behave like ASBRs. The RFC notes a limitation here: the “mass withdrawal” mechanism does not work in the Option B model because the next hop is rewritten.

Requirements on the DCI transport

  • IP reachability between BGWs is the only thing Multi-Site requires from the transport. It can be a routed L3 network, an MPLS L3VPN service or a carrier service. The BGW loopback addresses (virtual anycast and physical) must be reachable across the DCI.
  • MTU: VXLAN adds 50 or 54 bytes. Cisco’s examples use an MTU of 9216. If the carrier does not carry jumbo frames, you must lower the MTU in the fabric, because VXLAN is not fragmented.
  • Link topology: Cisco’s examples recommend triangles rather than “squares”, because a plain square gives no ECMP, and BUM traffic needs a way to reach the remote site.
  • Separate the internal and external underlay (usually separate routing protocols on each side of the BGW) and do not mix device roles: a DCI misconfiguration on a mixed device may harm traffic inside the site.
  • Latency and RTT follow from distance. The overlay does not shorten them, and some applications (clusters, synchronous replication) have requirements that must be checked before stretching Layer 2.

Where to stretch Layer 2 and where not to

These are our design recommendations, consistent with the direction in vendor guides (separate failure domains, VLANs do not have to be on every VTEP): route between locations by default (L3VNI, IP routes in EVPN), and stretch Layer 2 only where an application requires it (for example clusters with L2 adjacency, live migrations, legacy systems). Limit the stretch to selected VNIs, enable storm control and monitor the number of MAC addresses and routes.

Multicast in VXLAN: two layers that are easy to confuse

The most common misunderstanding: “multicast in VXLAN” can mean (1) multicast in the underlay that the network uses to carry BUM traffic, or (2) tenant application multicast (for example a market data stream) carried in the overlay. These are different problems with different solutions.

1. BUM traffic (broadcast, unknown unicast, multicast) in the underlay

According to RFC 7348, broadcast, multicast and unknown-destination frames are sent to the multicast group assigned to the VNI, and VTEPs join it with IGMP ((*,G) joins). The RFC suggests PIM-SM and notes that BIDIR-PIM would be more efficient. RFC 8365 allows four BUM tunnel variants in EVPN: PIM-SSM, PIM-SM, BIDIR-PIM and Ingress Replication (each copy sent by unicast to each remote VTEP), advertised with the IMET route.

  • Ingress Replication: needs no multicast routing in the underlay, but loads the VTEP with replication. Cisco’s guide notes that it fits when the VTEP has strong hardware replication and BUM traffic is small. As a counterexample it gives a 4K video stream. It also points to the limit on the number of VTEP peers.
  • Multicast in the underlay (PIM ASM or BiDir): replication happens in the network. This needs an RP (for example Anycast RP on the spines), and scale is limited by the number of groups (Cisco’s guide for NX-OS 10.3 mentions 512 groups).
  • Changing the mode later is costly: the guide describes migrating from Ingress Replication to multicast in the underlay as complex and causing outages, so it is worth deciding at the start, taking into account whether the fabric will ever carry application multicast.

2. Application multicast within one L2 network (VNI)

Without additional mechanisms, application multicast in a VNI is treated as BUM, that is it reaches all VTEPs of the segment, including those without receivers. RFC 9251 introduces IGMP/MLD proxy in EVPN: each VTEP terminates host reports and queries locally and advertises group membership with BGP routes (Selective Multicast Ethernet Tag, type 6). As a result traffic reaches only the VTEPs that have expressed interest, and EVPN acts as a distributed multicast router for the subnet.

3. Multicast between subnets (routed)

  • An external PIM router (“router-on-a-stick”). Traffic leaves the fabric and comes back, the stream is flooded in both VLANs, and the number of copies grows with the number of VLANs (Cisco).
  • Tenant Routed Multicast (TRM, Cisco). VTEPs themselves route multicast between a tenant’s subnets. Signaling uses the MVPN address family (NGMVPN, RFC 6514), and the underlay requires PIM Sparse Mode (in the underlay PIM SSM, BiDir and Ingress Replication are not supported for TRM). Each VRF has a default MDT group that all VTEPs with that VRF use. It is inclusive, so with high-bandwidth streams copies also reach VTEPs without receivers (Data MDT is the selective solution). TRM always routes, so TTL drops by 1, even when the source and receiver are in the same subnet. Check application TTLs before migrating (Cisco).
  • EVPN OISM (RFC 9625), an IETF standard. A vendor-neutral solution that routes multicast between a tenant’s subnets without “hairpinning” through a router and without a PIM RP for ASM inside the tenant domain. It uses, among others, an additional SBD domain, IMET and SMET routes, and tunnels such as Ingress Replication, P2MP or BIER. Support varies by platform, so check the vendor’s documentation before choosing.

4. Multicast between data centers

In Multi-Site the BGW separates the multicast domains: the fabric and the DCI are separate domains, and MVPN routes are re-advertised at each BGW. In Cisco’s TRM Multi-Site a single Designated Forwarder per L3VNI sends one copy of the stream to the other site, so there are no duplicates. Between BGWs you can use optimized Ingress Replication or PIM-SM multicast in the DCI network. Caveats: TRM Multi-Site works only in L3 TRM mode, the same VRF must use the same L3VNI at every site, and limits (for example the number of BGWs) depend on the NX-OS version (Cisco).

Multicast in high-frequency trading networks

Multicast is the basis of market data distribution, and the requirements on latency, its variation and fairness of delivery are particularly high there. We cover this in a separate article, together with A/B feeds, SSM, time synchronization and the role of VXLAN in such an environment: Multicast in HFT networks: market data, A/B feeds, fairness of delivery and time.

Design checklist

  1. MTU along the whole path (fabric, DCI, servers): +50 B and no fragmentation. Verify with the carrier.
  2. BUM mode: Ingress Replication or multicast in the underlay. Decide together with the decision about application multicast, because changing later is costly.
  3. Application multicast: IGMP snooping and IGMP/MLD proxy (RFC 9251) in the VNI, TRM or OISM between subnets, TRM Multi-Site or another mechanism between locations. Check version limits (groups, BGWs, modes).
  4. PIM and RP: Anycast RP, static configuration, ASM or SSM as the applications require, TTL in applications.
  5. Failure domains: separate sites, storm control, link tracking, delayed restore after a failure (so that the control plane has time to converge).
  6. Observability: streaming telemetry, microbursts, replication and drop counters on ports.
  7. Tests: replay of captured multicast traffic at the target rate, measurement of latency and jitter, link and BGW failures, behavior when many receivers join. If you use TRM, test with the real application TTL.
  8. Documentation and compliance: a description of version and hardware limitations, and a link to DORA requirements on resilience and ICT third-party risk.

How we can help

  • VXLAN/EVPN and DCI architecture design (Multi-Site, transport choice, MTU, failure domains) and review of existing deployments (consulting, network audit),
  • a multicast audit: groups, RPs, IGMP, TTL, A/B flows and behavior during failures,
  • a test and measurement plan (latency, jitter, packet loss), including for networks with demanding timing requirements,
  • security and segmentation of environments in the overlay (IT security).

Book a free 30-minute consultation or write to nc@netcontractor.pl.

Sources

This article is for information only and is not legal or regulatory advice or a purchasing recommendation. Configuration examples and limits (for example the number of groups, BGWs, MTU values) come from Cisco Nexus documentation for the NX-OS versions indicated and may differ by platform and version, and other vendors have their own solutions; verify them in the current documentation. Cisco, Nexus and other names are trademarks of the respective companies; NetContractor is neither a partner nor a sponsor of the companies mentioned. The diagram is an illustrative example.

Previous PostNext Post

Leave a Reply

Your email address will not be published. Required fields are marked *