06 Oct 2015

Merlin: A Language for Provisioning Network Resources

http://www.cs.cornell.edu/~jnfoster/papers/merlin.pdf

ABSTRACT Merlin language includes logical predicates to identify sets of packets, regular expressions to encode forwarding paths, and arithmetic formulas to specify bandwidth constraints. Merlin compiler maps these policies into a constraint problem that determines bandwidth allocations using parameterizable heuristics. … Merlin delegates control of sub-policies and for verifying modifications made to sub-policies do not violate global constraints.

existing APIs for SDN programming are either too low-level or too limited in functionality to enable effective implementation of rich network-wide policies.

Network orchestration frameworks provide powerful mechanisms that handle a larger set of concerns including middlebox placement and bandwidth, but they either fail to provide a programmable API to those mechanisms, or expose APIs that are extremely simple (sequence of middleboxes).

2 language design

Merlin policy language gives constructs … specify the intended behavior … at a high level of abstraction. … to allow nat … Merlin uses tag-based routing scheme …

2.1 syntax and semantics

3 compiler

localization

rewrites formula sothat the bandwidth constraints apply to packets at a single location; given a formula with one term over n identifiers, the compiler divides bandwidth equally among the local terms.

  1. split identifiers

      [x : (ip.src = 192.168.1.1 and
            ip.dst = 192.168.1.2 and
            tcp.dst = 20) -> .* dpi .* ;
       y : (ip.src = 192.168.1.1 and
            ip.dst = 192.168.1.2 and
            tcp.dst = 21) -> .* ;
     	  z : (ip.src = 192.168.1.1 and
            ip.dst = 192.168.1.2 and
            tcp.dst = 80) -> .* dpi *. nat .* ],
      max(x + y,50MB/s) and min(z,100MB/s)
    

    localized to

      [x : (ip.src = 192.168.1.1 and
             ip.dst = 192.168.1.2 and
             tcp.dst = 20) -> .* dpi .* ;
       y : (ip.src = 192.168.1.1 and
            ip.dst = 192.168.1.2 and
            tcp.dst = 21) -> .* ;
       z : (ip.src = 192.168.1.1 and
            ip.dst = 192.168.1.2 and
            tcp.dst = 80) -> .* dpi *. nat .* ],
     max(x,25MB/s) and
     max(y,25MB/s) and
     min(z,100MB/s)
    
  2. if h1, h2, m1 are the three locations capable of running deep packet inspection, then the regular expression

     .* dpi .*
    

    would be transformed into

     .* (h1|h2|m1) .*.
    

path selection

multi-commodity flow problem1

programmers can invoke Merlin with one of the three optimization criteria: weighted shortest-path, min-max ratio, min-max reserved.

best-effort rates for traffic requiring only best-effort rates, .. compiler only needs to compute sink-trees that obey the path constraints expressed in the policy

3.4 Code Generation

4 dynamic adaption

delegation

Merlin allows administrators to delegate policies to tenants who may then refine them. Tenants can refine a policy by adding addition constraints to the regular expression. For example, an expression that says all packets must go through a traffic logger (LOG) function:

.* log .*

can be modified to, additionally pass through a DPI function:

.* log .* dpi .*

one more example, global policy

( ipSrc = 192.168.1.1 and
	ipProto = 0x06)
  -> .* h3 at max(100Mb/s)

is refined by tenant: require waypoint a monitoring middlebox, allocate additional bandwidth to SSH traffic:

( ipSrc = 192.168.1.1 and
	ipProto = 0x06 and tcpDst = 80)
-> .* dpi .* h3 at max(50Mb/s)
( ipSrc = 192.168.1.1 and
	ipProto = 0x06 and tcpDst = 22)
-> .* dpi .* h3  at max(25Mb/s)
( ipSrc = 192.168.1.1 and
	ipProto = 0x06 and
	!(tcpDst = 22 | tcpDst = 80))
-> .* dpi .* h3  at max(25Mb/s)

verification

Merlin leverages the policy language representation to check policy inclusion.

4.3 Adaptation

Bandwidth re-allocation does not require recompilation of the global policy, and can thus happen quite rapidly.

Madhu

SAT vs MIP (difference)
SAT disjunction, this, that, …, or …

synthesis is when compilation does not work

packet rewriting

reference