This article contains promotional content. (December 2019) |
An overlay network is a logical computer network that is layered on top of a physical network. The concept of overlay networking is distinct from the traditional model of OSI layered networks, and almost always assumes that the underlay network is an IP network of some kind.
Some examples of overlay networking technologies are, VXLAN, BGP VPNs, and IP-over-IP technologies, such as GRE, IPSEC tunnels, or SD-WAN.
Underlay and Overlay:The "underlay" is the physical or underlying network that actually carries traffic—typically an IP network composed of routers, switches, and links. An "overlay" is a logical network built on top of the underlay, possessing its own address space, topology, and forwarding rules. The core distinction between the two is the decoupling of addresses from the underlying topology. Nodes within an overlay are addressed using logical identifiers—such as virtual IPs, node IDs, or DHT keys—without needing to be aware of how the underlying network is addressed or interconnected.
Encapsulation:Most overlays are implemented via encapsulation. The original data packet is treated as a payload and placed inside a new outer header, which is then used to route the packet across the underlay. Upon reaching the destination overlay endpoint, the outer header is stripped away, and the original inner packet is restored and forwarded to its final destination. Common encapsulation protocols include GRE, IP-in-IP, IPsec (tunnel mode), VXLAN, Geneve, and WireGuard. Application-layer overlays, by contrast, often do not employ IP-level encapsulation; instead, nodes exchange messages via standard TCP/UDP connections, determining the "next hop" at the application layer.
Control Plane and Data Plane:Overlays are likewise divided into these two planes. The control plane is responsible for discovering peers, distributing address mappings, and calculating paths—for example, BGP EVPN facilitating MAC/IP advertisements for VXLAN, or the maintenance of routing tables in a DHT. The data plane is responsible for the actual forwarding of encapsulated packets. Separating the design of these two planes is a common approach in modern overlay architectures.
Relationship to Related Concepts:Network Virtualization: Overlays serve as one of the primary methods for achieving network virtualization.
Software-Defined Networking (SDN): In this context, a controller is typically responsible for distributing mappings and policies to the overlay.
VPN: By definition, a VPN is a subset of an overlay, with a specific emphasis on isolation and confidentiality.
Service Mesh: This establishes a proxy network for communication between microservices at the application layer and can be considered a specific type of application-layer overlay.
Early days: The Internet itself. The Internet began as a network layered atop telephone lines. ARPANET utilized leased lines from telecommunications companies for interconnection—the very origin of the analogy mentioned in the original text.
The 1990s: MBone and 6bone. Emerging around 1992, the MBone (Multicast Backbone) stands as one of the earliest and most influential experiments with Internet overlays. At the time, most routers did not support IP multicast; consequently, "islands" that did support it were connected via IP-in-IP tunnels, effectively overlaying a multicast network on top of the unicast-based Internet. It was used to transmit audio and video from IETF meetings. 6bone followed a similar approach, using tunnels to build an IPv6 test network atop IPv4. These examples illustrate a recurring theme: overlays are frequently used to deploy new functionality before the underlying infrastructure is capable of supporting it natively.
Late 1990s to early 2000s: The rise of P2P. Napster appeared in 1999, followed by Gnutella and Freenet. Early Gnutella relied on query flooding—an inefficient method—which led the academic community to propose structured overlays. Around 2001, DHT (Distributed Hash Table) schemes such as Chord, CAN, Pastry, and Tapestry emerged, followed by Kademlia in 2002. These systems enabled lookups with $O(\log N)$ efficiency. BitTorrent arrived around 2001, and its later "Mainline DHT" implementation adopted Kademlia.
2001: RON. MIT’s Resilient Overlay Networks (RON) demonstrated that an application-layer overlay could bypass path failures caused by the slow convergence of the BGP (Border Gateway Protocol).
The 2000s: CDNs and anonymous networks. Content Delivery Networks (CDNs) like Akamai built vast overlays for content distribution across the Internet. Tor, which appeared around 2002 and utilizes onion routing, became the most well-known anonymous overlay. During the same period, PlanetLab provided a global testbed for overlay research.
Mid-2000s and beyond: Enterprise and the cloud. Carrier-provided MPLS/BGP VPNs (RFC 4364) became the mainstream solution for enterprise private networks, replacing Frame Relay and ATM. In the 2010s, the rise of cloud computing and virtualization drove the adoption of technologies like VXLAN (RFC 7348), NVGRE, and Geneve within data centers. SD-WAN extended this "overlay" concept to the interconnection of branch offices across wide-area networks (WANs). Meanwhile, container orchestration (Kubernetes) spurred the development of container-networking overlays, such as Flannel, Calico, and Cilium.
In the late 2010s, user-friendly "mesh VPNs" emerged. WireGuard—introduced in an academic paper in 2017 and later integrated into the Linux kernel—gained popularity for its minimalist design. Products such as Tailscale, ZeroTier, and Nebula built mesh-style overlays based on this or similar concepts, prioritizing zero-configuration setup and NAT traversal.

Nodes in an overlay network can be thought of as being connected by logical links, each of which corresponds to a path, perhaps through many physical links, in the underlying network. For example, distributed systems such as peer-to-peer networks are overlay networks because their nodes form networks over existing network connections.[citation needed ]
The Internet was originally built as an overlay upon the telephone network, while today (through the advent of VoIP), the telephone network is increasingly turning into an overlay network built on top of the Internet.[citation needed ]
Overlay networks have a certain set of attributes, including separation of logical addressing, security and quality of service. Other optional attributes include resiliency, encryption and bandwidth control.
Based on how nodes are organized, overlays can be categorized into two main types:
Unstructured Overlays.
Nodes are connected randomly or according to local rules, with no global pattern to the topology. Searches rely on methods such as flooding, random walks, or heuristics. The advantages include simple implementation, high tolerance for frequent node joins and departures ("churn"), and effective support for complex keyword-based queries. The drawbacks are low search efficiency and no guarantee that rare content will be located. Early Gnutella is a representative example. Later improvements introduced "super-peer" architectures—seen in systems like FastTrack—where more capable nodes take on indexing responsibilities.
Structured Overlays.
Both nodes and data are mapped into a common identifier space. Techniques such as consistent hashing are used to determine "which node is responsible for which key," thereby imposing a specific structure on the topology.
Chord: The identifier space is a ring; nodes maintain a "finger table," resulting in a search complexity of O(log N) hops.
CAN: The identifier space is treated as a d-dimensional Cartesian coordinate space, with each node responsible for a specific region.
Pastry / Tapestry: Routing is based on prefix matching, while also accounting for network proximity.
Kademlia: Uses the XOR operation as a metric for "distance" between nodes and maintains "k-buckets." It offers robust support for parallel lookups and handles node failures effectively; it is widely used, for instance, in the Mainline DHT implementation of BitTorrent.
The advantages of structured overlays include high, predictable search efficiency, making them well-suited for exact-match queries. Their disadvantages include the overhead required to maintain the topology, stability issues under high churn, and limited support for range or fuzzy queries.
Hybrid Approaches. Many practical systems are hybrid in nature. For example, a DHT might be used for node discovery or indexing content (seeds), while the actual data transfer occurs via direct P2P connections.
Guaranteeing bandwidth through marking traffic has multiple solutions, including IntServ and DiffServ. IntServ requires per-flow tracking and consequently causes scaling issues in routing platforms. It has not been widely deployed. DiffServ has been widely deployed in many operators as a method to differentiate traffic types. DiffServ itself provides no guarantee of throughput; it does allow the network operator to decide which traffic is higher priority, and hence will be forwarded first in congestion situations.
Overlay networks implement a finer granularity of quality of service, allowing enterprise users to decide on an application and user or site basis which traffic should be prioritized.
Many telcos use overlay networks to provide services over their physical infrastructure. In the networks that connect physically diverse sites (wide area networks, WANs), one common overlay network technology is BGP VPNs. These VPNs are provided in the form of a service to enterprises to connect their own sites and applications. The advantage of these kinds of overlay networks is that the telecom operator does not need to manage addressing or other enterprise-specific network attributes.
Within data centers, it was more common to use VXLAN, however due to its complexity and the need to stitch layer-2 VXLAN-based overlay networks to layer-3 IP/BGP networks, it has become more common to use BGP within data centers to provide layer-2 connectivity between virtual machines or Kubernetes clusters.
Enterprise private networks were first overlaid on telecommunication networks such as Frame Relay and Asynchronous Transfer Mode (ATM) packet switching infrastructures but migration from these (now legacy) infrastructures to IP-based MPLS networks and virtual private networks started (2001~2002) and is now completed, with very few remaining Frame Relay or ATM networks. From an enterprise point of view, while an overlay VPN service configured by the operator might fulfill their basic connectivity requirements, SD-WAN overlay networks offer additional flexibility.
The Internet is the basis for more overlaid networks that can be constructed in order to permit routing of messages to destinations not specified by an IP address. For example, distributed hash tables can be used to route messages to a node having a specific logical address, whose IP address is not known in advance.[needs context ]
Overlay networks can be incrementally deployed at end-user sites or on hosts running the overlay protocol software, without cooperation from Internet service providers. The overlay has no control over how packets are routed in the underlying network between two overlay nodes, but it can control, for example, the sequence of overlay nodes a message traverses before reaching its destination.
D1. P2P Overlay
In this model, nodes act as both clients and servers, handling content discovery and exchange autonomously via an overlay network. Typical applications include file sharing (e.g., BitTorrent, early Gnutella), distributed storage (e.g., IPFS, which utilizes a Kademlia-based DHT), streaming media, and instant messaging. These systems share a common characteristic: they either operate without a central server or rely on one only minimally, with scalability increasing alongside the number of nodes. Common challenges include node churn, free-riding, and the presence of malicious nodes.
D2. VPN and Enterprise Private Network Overlays
Carrier BGP/MPLS VPN (RFC 4364): Service providers offer isolated Layer 3 VPNs to various clients over their own backbone networks, with routes between client sites advertised via BGP. The provider does not need to manage the client’s internal address planning, allowing different clients to use overlapping address spaces.
IPsec / GRE Tunnels: Enterprises establish point-to-point or hub-and-spoke tunnels over the public internet, employing IPsec to ensure data confidentiality and integrity.
SD-WAN: A unified logical network is overlaid on top of multiple underlying transport links (such as MPLS, broadband, or 4G/5G). A central controller directs traffic based on application-specific policies, enabling application-aware traffic steering and automated failover between links.
D3. Data Center and Cloud Overlays
VXLAN (RFC 7348): This protocol encapsulates Layer 2 frames within UDP packets. It uses a 24-bit VNI (VXLAN Network Identifier) to support approximately 16 million logical network segments, overcoming the ~4,094-segment limit of traditional VLANs. The outer UDP source port is typically generated by hashing the inner flow, which allows the underlying network to distribute traffic evenly via ECMP (Equal-Cost Multi-Path routing).
NVGRE (RFC 7637): Based on GRE encapsulation. Geneve (RFC 8926): An encapsulation format that includes extensible options, designed to unify the functionalities of various existing encapsulation methods.
BGP EVPN (RFC 7432): Serves as the control plane for VXLAN, distributing MAC/IP reachability information among devices and reducing reliance on flood-and-learn mechanisms. Cloud VPC: A virtual private network within a public cloud, which essentially provides an isolated logical network for each tenant atop a shared physical network.
Container Networking: Kubernetes CNI plugins (such as the VXLAN mode in Flannel) enable Pods residing on different hosts to exist within the same logical network.
D4. CDN and Application-Layer Distribution Overlays
CDNs deploy a large number of edge nodes across the internet to cache content closer to users. User requests are directed to appropriate nodes via DNS or Anycast; nodes may also form a dedicated transport overlay to optimize the path back to the origin server. By definition, a CDN is an application-specific overlay operated by a service provider. (Note: The original text does not currently discuss CDNs.)
D5. Overlay Multicast and Media Streaming Distribution
Approaches such as "End System Multicast" can be used to construct distribution trees or meshes. Tree structures are highly efficient but vulnerable to node failures; mesh structures are more robust—a common practice is to first build a mesh and then construct a distribution tree for each source atop it. P2P live-streaming systems often adopt this approach.
D6. Anonymity and Anti-Censorship Overlays
Tor: Traffic is forwarded through a three-hop relay chain, with each layer encrypted; individual relays only know the identity of the preceding and succeeding hops. I2P: Utilizes unidirectional tunnels and "garlic routing."
The goal of such overlays is to obscure the relationship between communicating parties, rather than merely encrypting the content. They are also frequently used to circumvent censorship—for instance, by employing "bridge" nodes to bypass blocks.
D7. Mesh VPNs and Zero-Trust Access
Tools like WireGuard, Tailscale, ZeroTier, and Nebula organize devices into a private overlay. Devices discover one another via a coordination service and prioritize direct connections (leveraging NAT traversal); if a direct connection fails, traffic is routed through a relay, eliminating the need for a centralized VPN gateway.
D8. P2P Networks for Blockchains and Distributed Ledgers
In blockchain systems like Bitcoin or Ethereum, nodes communicate across the internet via a P2P overlay to propagate transactions and blocks. Node discovery, neighbor selection, and message dissemination (such as the gossip protocol) are all design issues for an overlay network; latency and bandwidth directly impact the efficiency and security of consensus.
1. Encapsulation Overhead and MTU.
Each additional layer of encapsulation adds bytes to the packet header, thereby reducing the available payload size. For instance, VXLAN adds approximately 50 bytes—comprising the outer Ethernet, IP, UDP, and VXLAN headers—to the inner Ethernet frame. If the underlay MTU remains at 1500 bytes, the effective MTU for the inner payload decreases, which can lead to packet fragmentation or loss. Common countermeasures include increasing the underlay MTU (e.g., using Jumbo Frames) or adjusting the MSS (TCP Maximum Segment Size) at the endpoints. Furthermore, if Path MTU Discovery (PMTUD) is disrupted—for example, by firewalls blocking ICMP messages—it can result in "black hole" issues that are notoriously difficult to troubleshoot.
2. NAT Traversal.
Hosts located behind a NAT are typically not directly accessible from the outside. P2P and Mesh VPN systems often employ STUN (RFC 8489) to discover public-facing mapped addresses, use ICE (RFC 8445) to evaluate multiple candidate paths, and perform "UDP hole punching" to establish direct connections. If these attempts fail, the system falls back to a relay mechanism such as TURN. Symmetric NAT, in particular, makes hole punching significantly more challenging.
3. Routing Metrics and Path Selection.
While an overlay cannot directly control the specific paths taken within the underlay, it can influence routing by selecting intermediate nodes—a core concept behind solutions like RON (Resilient Overlay Networks). Overlay nodes actively probe the network to measure latency, packet loss, and bandwidth, using this data to inform path selection. This introduces a known challenge: when multiple overlay networks independently optimize their own paths, their choices may conflict with the underlying traffic engineering objectives, potentially leading to network oscillations.
4. Load Balancing and ECMP.
The underlay typically balances traffic across equal-cost paths using a hash of the packet's five-tuple. Following encapsulation, the outer five-tuple may appear identical for all inner flows, causing traffic to become concentrated on a limited number of paths. Protocols like VXLAN mitigate this by hashing the inner flow information and embedding the result into the outer UDP source port.
5. Control Plane Design. Approaches include flooding-and-learning, centralized controllers, or distributed protocols (such as BGP EVPN or DHT). Centralized controllers facilitate global policy enforcement but introduce concerns regarding single points of failure and scalability; distributed solutions offer greater robustness, though they entail increased complexity in terms of convergence and consistency.
6. Observability and Troubleshooting.
Overlay and underlay networks each possess their own distinct topologies and fault domains; when issues arise, it is necessary to correlate information across both layers to pinpoint the root cause. A common practice involves sampling overlay traffic independently, supplemented by specialized OAM (Operations, Administration, and Maintenance) tools.
Attacks on P2P/Structured Overlay Networks:
Sybil Attacks: An attacker creates a large number of forged identities, gaining control over a significant proportion of nodes within the overlay. This is a fundamental challenge in open networks, where obtaining an identity is inexpensive.
Eclipse Attacks: An attacker surrounds a target node by controlling all of its neighbors, thereby feeding it a false view of the network.
Routing and Storage Attacks: Malicious nodes may misdirect queries, or discard or tamper with data that is supposed to be stored.
Traffic Analysis and Correlation: In anonymous networks, it is possible to correlate communicating parties by observing the timing and volume characteristics of incoming and outgoing traffic.
Common Countermeasures: These include identity admission controls (such as certificates or permission-based systems), constraints on node IDs (e.g., binding IDs to IP addresses or requiring proof-of-work), redundant routing, reputation systems, and end-to-end encryption and authentication.
Security in Enterprise and Data Center Overlays: Tunnels themselves are not necessarily encrypted. For instance, VXLAN does not provide confidentiality by default; if the underlay network is untrusted, additional mechanisms such as IPsec or MACsec must be layered on top. In multi-tenant environments, it is essential to prevent tenants from accessing one another—a risk that can arise from misconfigurations or lapses in VNI (VXLAN Network Identifier) management.
Privacy Trade-offs: While overlay networks can be used to protect privacy (as seen with Tor), they can also be exploited to circumvent regulations or distribute malicious content—which is why such networks are frequently a subject of controversy.
The objective of resilience in telecommunications networks is to enable automated recovery during failure events in order to maintain a wanted service level or availability. As telecommunications networks are built in a layered fashion, resilience can be used in the physical, optical, IP or session to application layers. Each layer relies on the resilience features of the layer below it. Overlay IP networks in the form of SD-WAN services therefore rely on the physical, optical and underlying IP services they are transported over. Application-layer overlays depend on all the layers below them. The advantage of overlays is that they are more flexible and programmable than traditional network infrastructure, which can outweigh the disadvantages of additional latency, complexity and bandwidth overheads.
Resilient overlay networks (RONs) are architectures that allow distributed Internet applications to detect and recover from disconnection or interference. Current wide-area routing protocols that take at least several minutes to recover from are improved upon with this application-layer overlay. The RON nodes monitor the Internet paths among themselves and will determine whether or not to reroute packets directly over the Internet or over other RON nodes, thus optimizing application-specific metrics. The RON has a relatively simple conceptual design. RON nodes are deployed at various locations on the Internet. These nodes form an application-layer overlay that cooperates in routing packets. Each of the RON nodes monitors the quality of the Internet paths between each other and uses this information to accurately and automatically select paths for each packet, thus reducing the amount of time required to recover from poor quality of service.
Overlay multicast is also known as End System or Peer-to-Peer Multicast supports high bandwidth multi-source multicast among widely distributed nodes. It is a critical capability for a wide range of applications, including audio and video conferencing, multi-party games and content distribution. Multicast decouples the size of the receiver set from the amount of state kept at any single node and potentially avoids redundant communication in the network.
The limited deployment of IP multicast, a best-effort network-layer multicast protocol, has led to considerable interest in alternate approaches that are implemented at the application layer in accordance with the end-to-end principle. In an overlay or end-system multicast approach, participating peers organize themselves into an overlay topology for data delivery. Each edge in this topology corresponds to a unicast path between two end-systems or peers in the underlying internet. All multicast-related functionality is implemented at the peers instead of at routers, and the goal of the multicast protocol is to construct and maintain an efficient overlay for data transmission.
Overlay network protocols based on TCP/IP include:
Overlay network protocols based on UDP/IP include: