• No results found

Software–Defined Networking and Policy Management

2.1 Software–Defined Networking

2.1.2 Software for Software–Defined Networking

One of the main advantages of SDN is that they are supported in programming languages and frameworks. Declarative programming proved to be a suitable candidate to

aIETF RFC 4655 defines the path computation element (PCE), path computation client (PCC), and the protocol.

program network functionality.

Network Operating Systems

Diverse controller platforms as NOS have been developed. This concept was originated from the 4D project that aims at a new, more manageable, system that facilitates configuration and control [Fea+04; Gre+05; Mal+04]. NOX [Gud+08] was a pioneer approach of a network operating system; the first OpenFlow controller. NOX was designed as a centralized system that maintains the network state, on a database, and would allow to program using high-level abstractions. Multiple works followed NOX and new approaches were implemented for specific features [Kim+12]. Beacon [Eri13] and Floodlight [Big12]

are network controllers implemented with Java, which support event–based and threaded operations. However having a centralized controller causes a scalability issue. Onix [Kop+10] and HyperFlow [TG10] distributed the controller and defined methods to maintain consistency. On the other hand Maestro [CCN11] exploited parallelism on a single machine and reduced the overhead, thus reduced the bottleneck, compared with NOX [Gud+08].

Maestro is also modular and allows to programmer to build personalized views of the network state. Recently, other platforms have gained popularity, for example IRIS [LPSY14]

which offers a more scalable and available controller.

As testing tools, software for network functionality had a significant rise with easy prototype platforms such as Mininet [LHM10], which offers run, debug, and test software for networks with limited resources.

Programming languages and compilers for SDN

Programming languages for networking showed an important evolution in recent years.

After the advent of SDN, many programming languages for networks were created. All new programming languages have the high-level abstraction in common instead of flow or forwarding–level. In this section, multiple programming languages are presented, and their features are highlighted.

Declarative programming allows building program elements and structures in terms of computation logic, rather than the flow control, for this reason, it is the trendy paradigm for these languages. One of the most representative is Frenetic [Fos+11], which is a declarative programming language based on NOX. The network administrator composes network policies in the Frenetic language, then the compiler translates policies into stream queries and transformations. With Frenetic it is possible to install low–level rules at datapaths and its performance is comparable with NOX over OpenFlow implementations. Rule composition was one of the most important advancements on network programming.

A packet is perceived as an input, whereas a network functionality, routing for example, is a composition of functions of a datapath after another. NetCore offers foundations for supporting parallel composition, uses predicates for filtering, and actions modify the packets [MFHW12]. NetCore is a high-level declarative language that describes the desired behavior of the network but does not detail the implementation of that behavior. With NetCore it is possible to express packet forwarding policies for SDN. Pyretic [Mon+13] was a language that developed parallel and sequential composition of network modules. Pyretic abstracted high-level modules and operates in parallel where multiple policies can act over the same packet. Merlin is another declarative language based on logical predicates and regular expressions with which a network administrator can write network policies [Sou+13].

Merlin compiler uses a constraint solver and heuristics to allocate network resources, find paths and assign bandwidth. Regular expressions includes union, concatenation, and Kleene star. NetKAT [And+14] has axiomatic semantics and compiler based on Kleene algebra for reasoning about networks, and Boolean algebra about predicates. Network is viewed as an automaton that moves packets from a node to another within its topology. NetKAT defined a finite automaton, and used regular expressions to represent network infrastructure and Boolean reasoning of predicates with Kleene algebra with test (KAT). Other tools to simplify programming for SDN is a language independent system called Maple [Voe+13]. With Maple, an administrator writes general network forwarding as functions f in a general-purpose programming language; those are called algorithmic policies. In theory, the function f is applicable to every packet, but in praxis Maple identified reusable forwarding instructions, recorded the invocation of the function f , and generalized outcomes and dependencies to other packets. Flowlog [NFSK14] is a tireless language for controllers and represents all three layers into a single abstraction. Its syntax is a mixture of SQL and rule–based languages that describes forwarding tables. Flowlog runs verification based on Alloy to check program correctness and topology properties.

Debugging the network

Debugging network applications is also a critical procedure for SDN. OFRewind [WLSF11] is a network debugger that stores and replies network events to reproduce errors and failures, and helps to identify root causes. NetSight [Han+12] is a network debugger, analog to gdb for programming. OFf [DSB14] is a debugger for SDN, as a regular programming tool, moreover it included packet tracing, replay, alerts and other visualizations of network behavior. More information about languages, debuggers and tools for network programming can be found on the survey of languages for SDN [Fos+13].

Handigol et al. proposes a debugger for SDN called ndb that traces sequences of events, backtracks errant packets, and implements breakpoints [Han+14]. The packet backtrack

computes the forwarding sequence where a packet goes through once it reaches the breakpoint line. In this way, the network programmer is able to identify all forwarding details for each node, including flow-table states, flow matching, and ports. Moreover, it can check the correctness of forwarding.

SDN architecture has three layers: control plane, data plane and controller state.

Flowlog is a language that abstracts all three layers into a unique abstraction. It is based on SQL and rule-based languages. Flowlog programs are compiled to a lightweight formal modeling and verification tool called Alloy.