towards correct-by-construction...

24
TOWARDS CORRECT-BY-CONSTRUCTION SDN Leonid Ryzhyk Nikolaj Bjorner Marco Canini Jean-Bapste Jeannin Nina Narodytska Cole Schlesinger Douglas Terry George Varghese 22 August 2016

Upload: others

Post on 17-Jul-2020

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: TOWARDS CORRECT-BY-CONSTRUCTION SDNconferences.sigcomm.org/sigcomm/2016/files/program/netpl/netpl16-ryzhyk.pdfSales Presentation Author: Leonid Ryzhyk Subject: To see the entire sales

TOWARDS CORRECT-BY-CONSTRUCTION SDNLeonid Ryzhyk Nikolaj Bjorner Marco Canini Jean-Baptiste Jeannin Nina NarodytskaCole Schlesinger Douglas Terry George Varghese

22 August 2016

Page 2: TOWARDS CORRECT-BY-CONSTRUCTION SDNconferences.sigcomm.org/sigcomm/2016/files/program/netpl/netpl16-ryzhyk.pdfSales Presentation Author: Leonid Ryzhyk Subject: To see the entire sales

2

INTRODUCTION

● Cocoon is a

– high-level SDN programming language

– verification tool

– SDN programming methodology

● … based on the principle of correctness by construction

Page 3: TOWARDS CORRECT-BY-CONSTRUCTION SDNconferences.sigcomm.org/sigcomm/2016/files/program/netpl/netpl16-ryzhyk.pdfSales Presentation Author: Leonid Ryzhyk Subject: To see the entire sales

3

COCOON IN A NUTSHELL

Design Implement Run on thecontroller

Verify generatednetwork configuration

refine

implementation

refine refine

specCorrect by construction

Traditional SDN Verification Workflow

SDN verification with Cocoon

Page 4: TOWARDS CORRECT-BY-CONSTRUCTION SDNconferences.sigcomm.org/sigcomm/2016/files/program/netpl/netpl16-ryzhyk.pdfSales Presentation Author: Leonid Ryzhyk Subject: To see the entire sales

4

EXAMPLE: CAMPUS NETWORK

vlan-1

vlan-2

vlan-3

vlan-1 gw router

vlan-2 gw router

vlan-3 gw router

switch router

[Sung et al. Towards Systematic Design of Enterprise Networks]

L2 segment

Router

Switch

VLAN Gateway

Page 5: TOWARDS CORRECT-BY-CONSTRUCTION SDNconferences.sigcomm.org/sigcomm/2016/files/program/netpl/netpl16-ryzhyk.pdfSales Presentation Author: Leonid Ryzhyk Subject: To see the entire sales

5

INTER-VLAN ROUTING: HOP1

vlan-1

vlan-2

vlan-3

vlan-1 gw router

vlan-2 gw router

vlan-3 gw router

switch router

ACL

Page 6: TOWARDS CORRECT-BY-CONSTRUCTION SDNconferences.sigcomm.org/sigcomm/2016/files/program/netpl/netpl16-ryzhyk.pdfSales Presentation Author: Leonid Ryzhyk Subject: To see the entire sales

6

INTER-VLAN ROUTING: HOP2

vlan-1

vlan-2

vlan-3

vlan-1 gw router

vlan-2 gw router

vlan-3 gw router

switch router

ACL

Page 7: TOWARDS CORRECT-BY-CONSTRUCTION SDNconferences.sigcomm.org/sigcomm/2016/files/program/netpl/netpl16-ryzhyk.pdfSales Presentation Author: Leonid Ryzhyk Subject: To see the entire sales

7

INTER-VLAN ROUTING: HOP3

vlan-1

vlan-2

vlan-3

vlan-1 gw router

vlan-2 gw router

vlan-3 gw router

switch router

This is messy:● Large, ad hoc topology● L2/L3 routing are mixed up● Complex distributed security policies

Typical bugs:● ACL distribution● Routing loops ● Black holes

Let’s try to untangle this design …

Page 8: TOWARDS CORRECT-BY-CONSTRUCTION SDNconferences.sigcomm.org/sigcomm/2016/files/program/netpl/netpl16-ryzhyk.pdfSales Presentation Author: Leonid Ryzhyk Subject: To see the entire sales

8

STEP 1: HIGH-LEVEL SPECIFICATION

acl()

193.62.*.* 193.63.*.* 193.64.1.*

Page 9: TOWARDS CORRECT-BY-CONSTRUCTION SDNconferences.sigcomm.org/sigcomm/2016/files/program/netpl/netpl16-ryzhyk.pdfSales Presentation Author: Leonid Ryzhyk Subject: To see the entire sales

9

STEP 2: DISTRIBUTED ACLs

acl()

193.62.*.* 193.63.*.* 193.64.1.*

Page 10: TOWARDS CORRECT-BY-CONSTRUCTION SDNconferences.sigcomm.org/sigcomm/2016/files/program/netpl/netpl16-ryzhyk.pdfSales Presentation Author: Leonid Ryzhyk Subject: To see the entire sales

10

STEP 2: DISTRIBUTED ACLs

193.62.*.* 193.63.*.* 193.64.1.*

aclOut() aclIn()

Assumption: acl() ≡ aclOut() Λ aclIn()

Gateways

Page 11: TOWARDS CORRECT-BY-CONSTRUCTION SDNconferences.sigcomm.org/sigcomm/2016/files/program/netpl/netpl16-ryzhyk.pdfSales Presentation Author: Leonid Ryzhyk Subject: To see the entire sales

11

STEP 3: L3 ROUTING

193.62.*.* 193.63.*.* 193.64.1.*

Page 12: TOWARDS CORRECT-BY-CONSTRUCTION SDNconferences.sigcomm.org/sigcomm/2016/files/program/netpl/netpl16-ryzhyk.pdfSales Presentation Author: Leonid Ryzhyk Subject: To see the entire sales

12

STEP 3: L3 ROUTING

193.62.*.* 193.63.*.* 193.64.1.*

L3NextHop()

Assumption: L3NextHop(pkt)* = Gateway(pkt)

Routers

Page 13: TOWARDS CORRECT-BY-CONSTRUCTION SDNconferences.sigcomm.org/sigcomm/2016/files/program/netpl/netpl16-ryzhyk.pdfSales Presentation Author: Leonid Ryzhyk Subject: To see the entire sales

13

STEP 4: L2 SWITCHING

193.62.*.* 193.63.*.* 193.64.1.*

Page 14: TOWARDS CORRECT-BY-CONSTRUCTION SDNconferences.sigcomm.org/sigcomm/2016/files/program/netpl/netpl16-ryzhyk.pdfSales Presentation Author: Leonid Ryzhyk Subject: To see the entire sales

14

STEP 4: L2 SWITCHING

193.62.*.* 193.63.*.* 193.64.1.*

Page 15: TOWARDS CORRECT-BY-CONSTRUCTION SDNconferences.sigcomm.org/sigcomm/2016/files/program/netpl/netpl16-ryzhyk.pdfSales Presentation Author: Leonid Ryzhyk Subject: To see the entire sales

15

STEP 4: L2 SWITCHING

Assumption: L2NextHop(pkt)* = L3NextHop(pkt)

L2 switches

Page 16: TOWARDS CORRECT-BY-CONSTRUCTION SDNconferences.sigcomm.org/sigcomm/2016/files/program/netpl/netpl16-ryzhyk.pdfSales Presentation Author: Leonid Ryzhyk Subject: To see the entire sales

16

STEP 4: L2 SWITCHING

L2NextHop(pkt.vlan=0) L2NextHop(pkt.vlan=green)

L2NextHop(pkt.vlan=red) L2NextHop(pkt.vlan=blue)

Page 17: TOWARDS CORRECT-BY-CONSTRUCTION SDNconferences.sigcomm.org/sigcomm/2016/files/program/netpl/netpl16-ryzhyk.pdfSales Presentation Author: Leonid Ryzhyk Subject: To see the entire sales

17

SEPARATION OF CONCERNS

Distributed access control

L3 routing

L2 switching

High-level spec

Page 18: TOWARDS CORRECT-BY-CONSTRUCTION SDNconferences.sigcomm.org/sigcomm/2016/files/program/netpl/netpl16-ryzhyk.pdfSales Presentation Author: Leonid Ryzhyk Subject: To see the entire sales

18

WOULDN’T IT BE GREAT TO BUILD SDNs THIS WAY?

acl()

193.62.*.* 193.63.*.* 193.64.1.* 193.62.*.* 193.63.*.* 193.64.1.*

aclOut() aclIn()

193.62.*.* 193.63.*.* 193.64.1.*

l3NextHop()

With Cocoon, you can!

● Language support for refinement-based programming

● Automatic compositional verification

● P4 and OpenFlow (via NetKAT) backends

Page 19: TOWARDS CORRECT-BY-CONSTRUCTION SDNconferences.sigcomm.org/sigcomm/2016/files/program/netpl/netpl16-ryzhyk.pdfSales Presentation Author: Leonid Ryzhyk Subject: To see the entire sales

19

PARAMETERIZED SPECIFICATIONS

● Parameterized specifications

– Spec may contain undefined functions, e.g., acl(), l2NextHop(), l3NextHop()

– Verification relies on assumptions

– These functions are defined when the network design is instantiated

– They can also change at runtime, e.g., in response to link failures

– Assumptions are validated when concrete definitions are provided (statically or at runtime)

Page 20: TOWARDS CORRECT-BY-CONSTRUCTION SDNconferences.sigcomm.org/sigcomm/2016/files/program/netpl/netpl16-ryzhyk.pdfSales Presentation Author: Leonid Ryzhyk Subject: To see the entire sales

20

CASE STUDIES

● Campus network[Sung et al. Towards Systematic Design of Enterprise Networks]

● F10[Liu et al. F10: A Fault-Tolerant Engineered Network]

● B4-style WAN[Jain et al. B4: Experience with a Globally-Deployed Software Defined WAN]

● iSDX (Software-defined Internet Exchange)[Gupta et al. An Industrial-Scale Software Defined Internet Exchange Point]

● NSX-style network virtualization framework[Koponen et al. Network Virtualization in Multi-tenant Datacenters]

● Stag (source-based routing + security labels for fat-tree topology)

Page 21: TOWARDS CORRECT-BY-CONSTRUCTION SDNconferences.sigcomm.org/sigcomm/2016/files/program/netpl/netpl16-ryzhyk.pdfSales Presentation Author: Leonid Ryzhyk Subject: To see the entire sales

21

PERFORMANCE

● All case studies verified in ~10 sec,

– Compositional verification (1 refinement at a time)

– Parameterized verification amplifies the power of symbolic reasoning

● No direct comparison (yet) with existing tools like NetKAT, HSA, but expect them to slow down for larger topologies

Page 22: TOWARDS CORRECT-BY-CONSTRUCTION SDNconferences.sigcomm.org/sigcomm/2016/files/program/netpl/netpl16-ryzhyk.pdfSales Presentation Author: Leonid Ryzhyk Subject: To see the entire sales

22

COCOON VS TRADITIONAL NETWORK VERIFICATION

HSA/NetKAT/...

Correctness spec

Page 23: TOWARDS CORRECT-BY-CONSTRUCTION SDNconferences.sigcomm.org/sigcomm/2016/files/program/netpl/netpl16-ryzhyk.pdfSales Presentation Author: Leonid Ryzhyk Subject: To see the entire sales

24

CONCLUSIONS

● Correct-by-construction SDN via iterative refinement:

– Enforces modular design

– Enables strong static correctness guarantees

– Scales to complex realistic networks

Page 24: TOWARDS CORRECT-BY-CONSTRUCTION SDNconferences.sigcomm.org/sigcomm/2016/files/program/netpl/netpl16-ryzhyk.pdfSales Presentation Author: Leonid Ryzhyk Subject: To see the entire sales

25

EXAMPLE ASSUMPTION

assume (hid_t sid, vid_t vid, MAC dst)    (l2distance(sid, vid, dst) > 1)  =>     l2distance(link(sid, l2NextHop(sid, vid, dst)), dst) 

     == (l2distance(sid, vid, dst) ­ 1)