01 Oct 2015

Composing Software Defined Networks

NSDI’13

… realize these abstractions in Pyretic, an imperative, domain-specific language embedded in Python.

… build a single application out of multiple, independent, reusable network policies that affect the processing of the same traffic.


previous: support multiple concurrent tasks (each controls its own slice) — a disjoint portion of traffic, over which the tenant or application module has (the illusion of) complete visibility and control.

SDN offers network-wide visibility and direct control over the underlying switches from a logically centralized controller. … today’s SDN platform … limited support fro creating modular applications …

composition operators

flexible constructs that build network applications out of simple independent components: however, programmer must specify policies in terms of the underlying physical topology …

abstract topology

network object has three key elements: a topology, a policy, and, for derived networks, a mapping … Pyretic constructs … programmer simply specifies the mapping between elements of the topologies, along with a function for calculating forwarding paths through the underlying topology, and Pyretic calculates correct implementation automatically.

abstract packet model


Compared to conventional platforms [7, 12, 2, 3, 19], our Pyretic language raises the level of abstraction by introducing an abstract packet model, an algebra of high-level policies, and network objects.

3.2 High-Level Policy Functions

A static policy
is a “snapshot” of a network’s global forwarding behavior, represented as an abstract function from a located packet to a multiset of located packets.

… Of course, one cannot build many useful network applications with just a single static, unchanging policy. To do so,

one must use a series of static policies (i.e., a dynamic policy).

3.2.2 From Static Policies to Dynamic Applications

Doing so illustrates a common Pyretic programming paradigm: One may develop dynamic applications by constructing parameterized static policies, listening for network events, and then repeatedly recomputing the static policy using different parameters as the network environment changes … building up a somewhat more complex policy by defining a collection of ordinary Python functions that compute simple, independent components of the policy, which are subsequently composed together.

5.2 putting it all together

the correct processing order of load balancer and firewall turns out to be direction-dependent