REAL: Emulating Control Plane at Simulator’s Cost

Ze Xia (Xi'an Jiaotong University), Hao Li (Xi'an Jiaotong University), Jinyu Fu (Xi'an Jiaotong University), Xin Wan (Xi'an Jiaotong University), Yihan Dang (Xi'an Jiaotong University), Danfeng Shan (Xi'an Jiaotong University), Li Chen (harnets.ai), Peng Zhang (Xi'an Jiaotong University)

23rd USENIX Symposium on Networked Systems Design and Implementation (NSDI '26) · Day 3 · Networked Resources, Virtualized

Overview

Network control plane modeling is a fundamental pillar of network engineering, ensuring that routing policies, protocol states, and configurations behave correctly before rolling out changes to production networks. Historically, practitioners faced a rigid dichotomy: use lightweight, highly scalable network simulation tools or rely on high-fidelity, resource-intensive network emulation frameworks. Simulation tools like Batfish model control plane behavior by re-implementing protocol logic, enabling rapid analysis on a single laptop but suffering from simplifying assumptions that miss real-world bugs, implementation quirks, and edge cases. Conversely, emulation runs actual production router binaries such as FRRouting, Bird, and Juniper cRPD, guaranteeing absolute behavioral fidelity at the cost of hundreds to thousands of CPU cores and terabytes of memory.

Watch on YouTube · Slides

Visual summary for REAL: Emulating Control Plane at Simulator’s Cost by Ze Xia, Hao Li, Jinyu Fu, Xin Wan, Yihan Dang, Danfeng Shan, Li Chen, Peng Zhang
Visual summary for REAL: Emulating Control Plane at Simulator’s Cost by Ze Xia, Hao Li, Jinyu Fu, Xin Wan, Yihan Dang, Danfeng Shan, Li Chen, Peng Zhang

Key moments

  1. 0:00 Introduction and background on control plane modeling
  2. 2:00 The efficiency gap between simulation and emulation
  3. 6:00 Three core designs: message delivery, run-to-idle, and iterative converge
  4. 10:00 Transparent system call interposition via LDPRELOAD
  5. 12:00 Evaluation results on fidelity, time, and memory savings
  6. 14:00 Conclusion and wrap-up

REAL: Emulating Control Plane at Simulator’s Cost

Speakers: Ze Xia, Ph.D. Student, Xi'an Jiaotong University

Conference: USENIX NSDI

YouTube: https://www.youtube.com/watch?v=xDlUDeMAbMo

Overview

Network control plane modeling is a fundamental pillar of network engineering, ensuring that routing policies, protocol states, and configurations behave correctly before rolling out changes to production networks. Historically, practitioners faced a rigid dichotomy: use lightweight, highly scalable network simulation tools or rely on high-fidelity, resource-intensive network emulation frameworks. Simulation tools like Batfish model control plane behavior by re-implementing protocol logic, enabling rapid analysis on a single laptop but suffering from simplifying assumptions that miss real-world bugs, implementation quirks, and edge cases. Conversely, emulation runs actual production router binaries such as FRRouting, Bird, and Juniper cRPD, guaranteeing absolute behavioral fidelity at the cost of hundreds to thousands of CPU cores and terabytes of memory.

This talk introduces REAL, a system designed to eliminate this compromise by matching emulation fidelity with simulation efficiency. Developed by researchers from Xi'an Jiaotong University and harness.ai, REAL achieves up to a 47× speedup over vanilla emulation, making it competitive with pure simulation tools while scaling to topologies exceeding 3,000 nodes. By identifying that the prohibitive costs of traditional emulation stem from a fundamental mismatch in the underlying runtime environment rather than the router software itself, REAL provides a specialized runtime that delivers simulation-grade efficiency without requiring modifications to vendor control plane binaries or the Linux kernel.

Background

▶ Watch: Introduction and background on control plane modeling (0:00)

The network systems community has long understood that the control plane—the core mapping function that ingests network-wide configurations and computes forwarding tables—is both critical and fragile. Massive border gateway protocol (BGP) incidents throughout history have demonstrated that minor protocol misconfigurations or implementation bugs can trigger catastrophic economic losses. Consequently, pre-deployment validation of control plane logic is indispensable.

Prior work bifurcated this validation space into two distinct paradigms:

  1. Simulation: Tools like Batfish re-implement routing protocols from scratch. While they can simulate large topologies within minutes on modest hardware, they inevitably introduce modeling gaps. They describe what should happen based on idealized protocol specs, rather than what production router software will do under real-world stress.
  2. Emulation: Running unmodified production router images inside isolated environments provides absolute fidelity. However, scaling emulation to thousands of nodes introduces staggering hardware bottlenecks. Previous industry deployments revealed that emulating large-scale networks demands massive clusters, taking tens of minutes just to initialize and consuming vast computational and memory resources.

The core motivation behind REAL is reconciling this efficiency gap by diagnosing the exact software and systems bottlenecks that render traditional emulation so expensive.

Key Findings

▶ Watch: Three core designs: message delivery, run-to-idle, and iterative converge (6:00)

Through deep profiling of large-scale router emulation workloads, the authors identified three primary sources of overhead that account for the massive time and memory footprint of vanilla emulation:

  • Network Build-up Overhead: Traditional emulators instantiate separate Linux containers for each router, interconnecting them using virtual Ethernet (veth) pairs. Linux kernel lock contention during veth creation makes network setup orders of magnitude slower than the actual control plane convergence process, consuming tens of minutes for large topologies before a single routing protocol message is exchanged.
  • Context Switch and Cache Thrashing: Operating system schedulers enforce general-purpose time-slicing and fairness across router processes. This design causes frequent, unnecessary preemptions. When a router processing a BGP update is interrupted mid-computation, its working set is evicted from the CPU cache, resulting in costly last-level cache (LLC) misses and memory reloads when the process is scheduled again.
  • Memory Residency Inefficiencies: In large topologies, convergence happens iteratively; protocol messages propagate gradually across the graph. At any given moment, more than half of the router processes are temporarily idle with empty message queues. However, because the operating system lacks visibility into the convergence state, it maintains full memory residency for all router processes simultaneously.

Addressing these bottlenecks enabled REAL to achieve unprecedented performance milestones: up to 47× faster execution than unmodified emulation, memory reductions allowing topology scaling beyond 3,000 nodes (a 3× increase over vanilla limits), and the discovery of a previously unknown implementation-level race condition in FRRouting that pure simulation tools are structurally incapable of detecting.

Technical Deep Dive

▶ Watch: Transparent system call interposition via LD_PRELOAD (10:00)

The core architectural insight of REAL is that the standard Linux runtime environment—designed for general-purpose application isolation, packet forwarding, and fair CPU scheduling—is fundamentally mismatched with the operational profile of control plane emulation. Rather than redesigning routing software or patching the Linux kernel (both of which are impractical in production environments), REAL interposes a specialized runtime directly between the control plane binaries and libc using LD_PRELOAD transparent system call interposition.

1. Message-Level Delivery

To eliminate veth setup overhead, REAL bypasses the Linux TCP/IP stack entirely for inter-router communication. When a router calls socket() with an internet address family (AF_INET), the REAL shim layer intercepts the call and substitutes a Unix domain socket configured for direct Inter-Process Communication (IPC). The router receives a standard file descriptor and executes write() calls normally, unaware that protocol messages are being delivered directly through memory channels without traversing virtual network devices.

2. Run-to-Idle Scheduling

To eliminate cache thrashing caused by OS thread preemption, REAL simulates run-to-idle scheduling via control event delivery. Instead of letting the Linux scheduler time-slice router processes arbitrarily, REAL ensures that once a router begins processing messages from its queue, it runs to completion (until its queue is empty and it goes idle) before yielding the CPU. This preserves the working set in the CPU cache, drastically reducing last-level cache misses and accelerating convergence.

3. Iterative Convergence and Snapshot/Restore

To control memory residency, REAL implements an iterative convergence algorithm combined with state snapshotting. Instead of instantiating every router simultaneously, subsets of routers are initialized, allowed to achieve local convergence, and subsequently snapshotted. Inactive or temporarily idle routers are purged from memory and restored dynamically as routing updates propagate across the topology graph. At any given phase of emulation, only the active subset of routers consumes physical memory.

Experimental Setup & Results

▶ Watch: Evaluation results on fidelity, time, and memory savings (12:00)

The evaluation of REAL focused on three critical dimensions: behavioral fidelity, execution time, and memory scaling.

  • Fidelity and Bug Discovery: When evaluating real network configurations, REAL successfully uncovered a novel implementation-level data race bug in FRRouting occurring during BGP teardown events (specifically when a peer router reboots and an I/O thread polls a file descriptor that the main thread simultaneously closes and immediately reallocates). Community maintainers confirmed this bug, which remains entirely invisible to simulation-based tools due to their abstraction of operating system threads and file descriptors.
  • Execution Speedups: On identical network topologies, REAL achieved up to a 47× speedup compared to vanilla emulation, pushing emulation performance to levels competitive with—and occasionally surpassing—pure simulation tools like Batfish.
  • Memory Scaling: Utilizing the iterative convergence engine, REAL successfully emulated massive topologies consisting of more than 3,000 nodes, marking a more than 3× improvement over vanilla emulation limits (which capped out around 1,000 nodes due to memory exhaustion).
  • Cache Behavior: Profiling of CPU execution patterns demonstrated that REAL transforms scattered, preemption-heavy execution traces into highly concentrated, continuous bursts of computation, directly validating the reduction in last-level cache misses.

Practical Implications

▶ Watch: Conclusion and wrap-up (14:00)

For network infrastructure teams, cloud providers, and systems engineers, REAL bridges a long-standing operational divide. Historically, network operators had to choose between the fast turnaround times of simulators (at the cost of missing subtle firmware and software bugs) or the absolute fidelity of emulators (at the cost of prohibitive cluster footprints).

By demonstrating that emulation overhead is an artifact of runtime mismatch rather than an inherent property of router software, REAL empowers practitioners to run large-scale emulation pipelines on commodity hardware or modest developer workstations. The use of transparent system call interposition (LD_PRELOAD) ensures that deployment remains frictionless—requiring zero modifications to proprietary vendor images or custom kernel builds. However, practitioners must note that while REAL optimizes CPU cache locality and memory residency, highly asynchronous distributed edge cases dependent on physical timing variations may still require careful validation.

Key Takeaways

  • The Emulation Dilemma Solved: REAL achieves the behavioral fidelity of full router software emulation with the computational efficiency and speed of lightweight network simulation.
  • Root Cause Identification: High emulation costs are driven by mismatched runtime abstractions—specifically Linux veth build-up overhead, OS thread preemption cache thrashing, and unmanaged memory residency.
  • Zero-Modification Architecture: Using LD_PRELOAD system call interposition, REAL intercepts networking, scheduling, and state primitives without modifying control plane binaries or the Linux kernel.
  • Dramatic Performance Gains: REAL delivers up to a 47× speedup over vanilla emulation and scales network topologies to over 3,000 nodes.
  • Real-World Bug Detection: The system's high fidelity enabled the discovery of a complex, production-grade BGP teardown data race bug in FRRouting that traditional simulators cannot detect.
  • Open Source Artifact: The complete REAL system artifact is publicly available as an open-source project for the systems and networking research community.

About the Speaker(s)

Ze Xia is a Ph.D. student at Xi'an Jiaotong University, specializing in networked systems, data center routing protocols, and control plane validation. His research focuses on bridging the gap between theoretical network modeling and practical systems implementation, collaborating with academic peers and industry partners such as harness.ai.

Reviews

  • Simon Wisk (Open Source Developer & AI Tooling Expert) — MUST SEE ★★★★★

→ Top-rated talks at 23rd USENIX Symposium on Networked Systems Design and Implementation (NSDI '26)

All talks from 23rd USENIX Symposium on Networked Systems Design and Implementation (NSDI '26)