Network-Wide Configuration Synthesis

Ahmed El-Hassany, Petar Tsankov, Laurent Vanbever, Martin T. VechevCAV 2016 · DOI

Abstract

Computer networks are hard to manage. Given a set of high-level requirements (e.g., reachability, security), operators have to manually figure out the individual configuration of potentially hundreds of devices running complex distributed protocols so that they, collectively, compute a compatible forwarding state. Not surprisingly, operators often make mistakes which lead to downtimes. To address this problem, we present a novel synthesis approach that automatically computes correct network configurations that comply with the operator's requirements. We capture the behavior of existing routers along with the distributed protocols they run in stratified Datalog. Our key insight is to reduce the problem of finding correct input configurations to the task of synthesizing inputs for a stratified Datalog program. To solve this synthesis task, we introduce a new algorithm that synthesizes inputs for stratified Datalog programs. This algorithm is applicable beyond the domain of networks. We leverage our synthesis algorithm to construct the first network-wide configuration synthesis system, called SyNET, that support multiple interacting routing protocols (OSPF and BGP) and static routes. We show that our system is practical and can infer correct input configurations, in a reasonable amount time, for networks of realistic size (> 50 routers) that forward packets for multiple traffic classes.

Introduction

Modern computer networks are notoriously difficult to manage. Network operators are tasked with manually configuring hundreds of devices, each running distributed protocols like BGP for external routing and OSPF for internal routing. These protocols interact in complex and often subtle ways; for instance, BGP route selection frequently depends on OSPF costs to determine the optimal exit point for traffic. This manual, "brittle" process is a leading cause of network downtime due to human error.

While existing research has focused on verifying whether a given configuration is correct, SyNET shifts the paradigm toward synthesis. By automatically generating correct-by-construction configurations from high-level requirements, SyNET aims to eliminate the configuration errors that plague modern infrastructure.

Methodology: Synthesis via Stratified Datalog

The core innovation of SyNET is treating the stable forwarding state of a network as the fixed point of a logic program. The authors model the behavior of routing protocols and their interdependencies using stratified Datalog.

Declarative Modeling

In this framework, the "input" to the Datalog program represents the device configurations (e.g., link weights, static routes), while the "output" represents the resulting forwarding state. Stratification is essential because protocols do not operate in isolation; BGP, for example, must wait for OSPF to converge before it can make informed routing decisions. This dependency is naturally captured by the strata of the Datalog program.

SyNET input components: (a) Network Specification, (b) Topology, and (c) Path Requirements.

The $S_{Strat}$ Synthesis Algorithm

To find valid configurations, the authors developed a general-purpose algorithm, $S_{Strat}$, for synthesizing inputs to stratified Datalog programs. Because Datalog supports recursion and negation, standard SMT encoding is insufficient. $S_{Strat}$ partitions the program into strata and solves them iteratively. If a lower stratum cannot satisfy the requirements imposed by a higher one, the algorithm backtracks to find an alternative solution.

SMT Encoding and Derivation

The actual configuration values are found by unrolling recursive Datalog predicates into SMT constraints. SyNET uses the Z3 solver to find a model that satisfies both the protocol logic and the operator's high-level requirements, such as specific path constraints for different traffic classes.

SyNET output components: (d) Synthesized Datalog input and (e) the derived router configuration.

Evaluation and Results

SyNET was evaluated on a variety of network topologies, including the real-world Internet2 backbone (9 routers) and synthetic grid topologies ranging from 16 to 64 routers. The system was tested against varying numbers of traffic classes to assess scalability.

  • Scalability: SyNET successfully synthesized configurations for the Internet2 topology in under 20 seconds. For a 64-router grid using OSPF and static routes, it found a valid configuration in approximately two hours.
  • Practicality: Given that over 50% of production networks consist of fewer than 32 routers, SyNET's performance—handling such sizes in under an hour—demonstrates its practical utility.
  • Correctness: All synthesized configurations were validated in an emulated environment using Cisco routers, confirming that the logic-based synthesis translates accurately to real-world hardware behavior.

Discussion and Future Work

While SyNET represents a significant advancement, it faces challenges with extremely large search spaces. For the most complex test cases (64 routers with 10 traffic classes and all protocols enabled), the system timed out after 24 hours. Future improvements could involve hierarchical synthesis, where configurations for smaller regions are generated independently. Additionally, while SyNET ensures correctness for a static topology, future work could extend the system to synthesize configurations that are resilient to link failures.

Conclusion

SyNET is the first system to automatically synthesize configurations for networks running multiple interacting protocols. By reducing network synthesis to a solvable logic problem, it provides a robust foundation for automated, error-free network management.

Summary updated

BibTeX
@inproceedings{elhassany2016network,
  author = {Ahmed El-Hassany and Petar Tsankov and Laurent Vanbever and Martin T. Vechev},
  title = {{Network-Wide Configuration Synthesis}},
  booktitle = {CAV},
  year = {2016},
  doi = {10.1007/978-3-319-63390-9\_14},
}
Figure