VeriFlow: Verifying Network-Wide Invariants in Real Time · April 3, 2013 NSDI 2013 ... 4/3/2013...

30
VeriFlow: Verifying Network-Wide Invariants in Real Time Ahmed Khurshid, Xuan Zou, Wenxuan Zhou, Matthew Caesar, P. Brighten Godfrey University of Illinois at Urbana-Champaign (UIUC) April 3, 2013 NSDI 2013 10th USENIX Symposium on Networked Systems Design and Implementation

Transcript of VeriFlow: Verifying Network-Wide Invariants in Real Time · April 3, 2013 NSDI 2013 ... 4/3/2013...

Page 1: VeriFlow: Verifying Network-Wide Invariants in Real Time · April 3, 2013 NSDI 2013 ... 4/3/2013 Department of Computer Science, UIUC 17. Performance Result 4/3/2013 Department of

VeriFlow: Verifying Network-Wide

Invariants in Real Time

Ahmed Khurshid, Xuan Zou, Wenxuan Zhou,

Matthew Caesar, P. Brighten Godfrey

University of Illinois at Urbana-Champaign (UIUC)

April 3, 2013

NSDI 201310th USENIX Symposium on Networked Systems Design and Implementation

Page 2: VeriFlow: Verifying Network-Wide Invariants in Real Time · April 3, 2013 NSDI 2013 ... 4/3/2013 Department of Computer Science, UIUC 17. Performance Result 4/3/2013 Department of

Challenges in Network Debugging

4/3/2013 Department of Computer Science, UIUC 2

http://groups.geni.net/geni/chrome/site/thumbnails/wiki

/TangoGENI/OF-VLAN3715_1000.jpg

Complex

interactions

Misconfigurations

Unforeseen bugs

Difficult to test

the entire

network state

space before

deployment

Page 3: VeriFlow: Verifying Network-Wide Invariants in Real Time · April 3, 2013 NSDI 2013 ... 4/3/2013 Department of Computer Science, UIUC 17. Performance Result 4/3/2013 Department of

Effects of Network Errors

• Allow unauthorized

packets to enter a secured

zone in a network

• Make services and the

infrastructure prone to

attacks

• Make critical services

unavailable

• Affect network

performance

4/3/2013 Department of Computer Science, UIUC 3

?

Network

Page 4: VeriFlow: Verifying Network-Wide Invariants in Real Time · April 3, 2013 NSDI 2013 ... 4/3/2013 Department of Computer Science, UIUC 17. Performance Result 4/3/2013 Department of

Network Debugging Techniques

4/3/2013 Department of Computer Science, UIUC 4

Configuration VerificationTraffic/Flow Monitoring

Software using Cisco NetFlowhttp://snmp.co.uk/scrutinizer/

Page 5: VeriFlow: Verifying Network-Wide Invariants in Real Time · April 3, 2013 NSDI 2013 ... 4/3/2013 Department of Computer Science, UIUC 17. Performance Result 4/3/2013 Department of

Limitations of Configuration Verification

• Prediction is difficult

– Various configuration

languages

– Dynamic distributed

protocols

• Prediction misses

implementation bugs

in control plane

4/3/2013 Department of Computer Science, UIUC 5

Configuration

Control plane

Data-plane

state

Network

behavior

Input

Predicted

Page 6: VeriFlow: Verifying Network-Wide Invariants in Real Time · April 3, 2013 NSDI 2013 ... 4/3/2013 Department of Computer Science, UIUC 17. Performance Result 4/3/2013 Department of

Our Approach: Data-plane Verification

• Less prediction

• Closer to actual network behavior

• Unified analysis for multiple control-plane protocols

• Can catch control-plane implementation bugs

4/3/2013 Department of Computer Science, UIUC 6

Configuration

Control plane

Data-plane

state

Network

behavior

Input

Predicted

Page 7: VeriFlow: Verifying Network-Wide Invariants in Real Time · April 3, 2013 NSDI 2013 ... 4/3/2013 Department of Computer Science, UIUC 17. Performance Result 4/3/2013 Department of

Data Plane Verification in Action

• FlowChecker [Al-Shaer et al., SafeConfig 2010]

– Uses BDD-based model checker

• Anteater [Mai et al., SIGCOMM 2011]

– Uses SAT-based model checking

– Revealed 23 real bugs in the UIUC campus network

• Header Space Analysis [Kazemian et al., NSDI 2012]

– Uses set-based custom algorithm

– Found multiple loops in the Stanford backbone network

4/3/2013 Department of Computer Science, UIUC 7

Find problems

after they occur

and (potentially)

cause damage

Running time: Several seconds to a few hours

Page 8: VeriFlow: Verifying Network-Wide Invariants in Real Time · April 3, 2013 NSDI 2013 ... 4/3/2013 Department of Computer Science, UIUC 17. Performance Result 4/3/2013 Department of

Can we run verification in real time?

4/3/2013 Department of Computer Science, UIUC 8

Checking network-wide invariants in real time as the

network evolves

Need to verify new updates at high speeds

Block dangerous changes

Provide immediate warning

Page 9: VeriFlow: Verifying Network-Wide Invariants in Real Time · April 3, 2013 NSDI 2013 ... 4/3/2013 Department of Computer Science, UIUC 17. Performance Result 4/3/2013 Department of

Challenges in Real-Time Verification

• Challenge 1: Obtaining real-time view of

network

– Solution: Utilize the centralized data-plane view

available in an SDN (Software-Defined Network)

• Challenge 2: Verification speed

– Solution: Off-the-shelf techniques?

4/3/2013 Department of Computer Science, UIUC 9

No, too slow!

Page 10: VeriFlow: Verifying Network-Wide Invariants in Real Time · April 3, 2013 NSDI 2013 ... 4/3/2013 Department of Computer Science, UIUC 17. Performance Result 4/3/2013 Department of

Our Tool: VeriFlow

• VeriFlow checks network-wide invariants in real time using data-plane state

– Absence of routing loops and black holes, access control violations, etc.

• VeriFlow functions by

– Monitoring dynamic changes in the network

– Constructing a model of the network behavior

– Using custom algorithms to automatically derive whether the network contains errors

4/3/2013 Department of Computer Science, UIUC 10

Page 11: VeriFlow: Verifying Network-Wide Invariants in Real Time · April 3, 2013 NSDI 2013 ... 4/3/2013 Department of Computer Science, UIUC 17. Performance Result 4/3/2013 Department of

VeriFlow

New rules

VeriFlow Operation

4/3/2013 Department of Computer Science, UIUC 11

Network Controller

Generate

equivalence

classes

Generate

forwarding

graphs

Run queries

Diagnosis report

• Type of invariant

violation

• Affected set of

packets

Rules violating

network invariant(s)Good rules

Page 12: VeriFlow: Verifying Network-Wide Invariants in Real Time · April 3, 2013 NSDI 2013 ... 4/3/2013 Department of Computer Science, UIUC 17. Performance Result 4/3/2013 Department of

1. Limit the Search Space

4/3/2013 Department of Computer Science, UIUC 12

VeriFlow

Generate

Equivalence

Classes

Updates

Equivalence class:

Packets experiencing

the same forwarding

actions throughout the

network.

Fwd’ing rules

Equiv. classes

0.0.0.0/1 64.0.0.0/3

1 2 3 4

0.0.0.0/0

Page 13: VeriFlow: Verifying Network-Wide Invariants in Real Time · April 3, 2013 NSDI 2013 ... 4/3/2013 Department of Computer Science, UIUC 17. Performance Result 4/3/2013 Department of

Computing Equivalence Classes

4/3/2013 Department of Computer Science, UIUC 13

(device, rule) pairs

(don’t care/wildcard)

Page 14: VeriFlow: Verifying Network-Wide Invariants in Real Time · April 3, 2013 NSDI 2013 ... 4/3/2013 Department of Computer Science, UIUC 17. Performance Result 4/3/2013 Department of

2. Represent Forwarding Behavior

4/3/2013 Department of Computer Science, UIUC 14

VeriFlow

Generate

Forwarding

Graphs

Generate

Equivalence

Classes

Updates

All the info to answer

queries!

Equivalence Class 1

Equivalence Class 2

Page 15: VeriFlow: Verifying Network-Wide Invariants in Real Time · April 3, 2013 NSDI 2013 ... 4/3/2013 Department of Computer Science, UIUC 17. Performance Result 4/3/2013 Department of

3. Run Query to Check Invariants

4/3/2013 Department of Computer Science, UIUC 15

VeriFlow

Generate

Forwarding

Graphs

Generate

Equivalence

Classes

Run QueriesUpdates

Black holes,

Routing loops,

Isolation of multiple VLANs,

Access control policies

Good rules Bad rules

Diagnosis report

•Type of invariant

violation

•Affected set of

packets

Page 16: VeriFlow: Verifying Network-Wide Invariants in Real Time · April 3, 2013 NSDI 2013 ... 4/3/2013 Department of Computer Science, UIUC 17. Performance Result 4/3/2013 Department of

API to write custom invariants

• VeriFlow provides a set of functions to write custom query algorithms

– Gives access to the affected set of equivalence classes and their forwarding graphs

– Verification becomes a standard graph traversal algorithm

• Can be used to

– Check forwarding behavior of specific packet sets

– Verify effects of potential changes

4/3/2013 Department of Computer Science, UIUC 16

Page 17: VeriFlow: Verifying Network-Wide Invariants in Real Time · April 3, 2013 NSDI 2013 ... 4/3/2013 Department of Computer Science, UIUC 17. Performance Result 4/3/2013 Department of

Experiment

• Simulated an IP network using a Rocketfueltopology– 172 routers

• Replayed Route Views BGP traces– 5 million RIB entries

– 90K BGP updates

• Checked for loops and black holes

• Microbenchmarked each phase of VeriFlow’soperation

4/3/2013 Department of Computer Science, UIUC 17

Page 18: VeriFlow: Verifying Network-Wide Invariants in Real Time · April 3, 2013 NSDI 2013 ... 4/3/2013 Department of Computer Science, UIUC 17. Performance Result 4/3/2013 Department of

Performance Result

4/3/2013 Department of Computer Science, UIUC 18

97.8% of the updates were

verified within 1 millisecond

Page 19: VeriFlow: Verifying Network-Wide Invariants in Real Time · April 3, 2013 NSDI 2013 ... 4/3/2013 Department of Computer Science, UIUC 17. Performance Result 4/3/2013 Department of

Effect of Equivalence Class Count

4/3/2013 Department of Computer Science, UIUC 19

Number of ECs strongly

influences verification time

Number of ECs affected by new rule

Page 20: VeriFlow: Verifying Network-Wide Invariants in Real Time · April 3, 2013 NSDI 2013 ... 4/3/2013 Department of Computer Science, UIUC 17. Performance Result 4/3/2013 Department of

Experiment (cont.)

• Mininet OpenFlow network

– Rocketfuel topology with 172 switches, one host per switch

• NOX controller, learning switch app

• TCP connections between random pairs of hosts

4/3/2013 Department of Computer Science, UIUC 20

NOX Controller

VeriFlowTCP SYN

Page 21: VeriFlow: Verifying Network-Wide Invariants in Real Time · April 3, 2013 NSDI 2013 ... 4/3/2013 Department of Computer Science, UIUC 17. Performance Result 4/3/2013 Department of

Effect on Flow Table Update Throughput

4/3/2013 Department of Computer Science, UIUC 21

Up

da

te t

hro

ug

hp

ut

(msg

/se

c)

Overhead of VeriFlow is low

Page 22: VeriFlow: Verifying Network-Wide Invariants in Real Time · April 3, 2013 NSDI 2013 ... 4/3/2013 Department of Computer Science, UIUC 17. Performance Result 4/3/2013 Department of

Effect of Multiple Header Fields

4/3/2013 Department of Computer Science, UIUC 22

Data link source

Data link destination

Network source

Network destination

Data link type

More fields -> More

equivalence classes ->

Longer verification

time

Page 23: VeriFlow: Verifying Network-Wide Invariants in Real Time · April 3, 2013 NSDI 2013 ... 4/3/2013 Department of Computer Science, UIUC 17. Performance Result 4/3/2013 Department of

Conclusion

• VeriFlow achieves real-time verification

– A layer between SDN controller and network devices

– Handles multiple packet header fields efficiently

– Runs queries within hundreds of microseconds

– Exposes an API for writing custom invariants

• Future work

– Handling packet transformations efficiently

– Dealing with multiple controllers

4/3/2013 Department of Computer Science, UIUC 23

Page 24: VeriFlow: Verifying Network-Wide Invariants in Real Time · April 3, 2013 NSDI 2013 ... 4/3/2013 Department of Computer Science, UIUC 17. Performance Result 4/3/2013 Department of

Thank you

[email protected]

http://www.cs.illinois.edu/~khurshi1

Page 25: VeriFlow: Verifying Network-Wide Invariants in Real Time · April 3, 2013 NSDI 2013 ... 4/3/2013 Department of Computer Science, UIUC 17. Performance Result 4/3/2013 Department of

Backup Slides

Page 26: VeriFlow: Verifying Network-Wide Invariants in Real Time · April 3, 2013 NSDI 2013 ... 4/3/2013 Department of Computer Science, UIUC 17. Performance Result 4/3/2013 Department of

Related Work

• Header space analysis: Static checking for networks, NSDI 2012

• A NICE way to test OpenFlow applications, NSDI 2012

• Abstractions for network update, SIGCOMM 2012

• Debugging the data plane with Anteater, SIGCOMM 2011

• Can the production network be the testbed?, OSDI 2010

• FlowChecker: Configuration analysis and verification of federated OpenFlow infrastructures, SafeConfig 2010

• Network configuration in a box: Towards end-to-end verification of network reachability and security, ICNP 2009

4/3/2013 Department of Computer Science, UIUC 26

Page 27: VeriFlow: Verifying Network-Wide Invariants in Real Time · April 3, 2013 NSDI 2013 ... 4/3/2013 Department of Computer Science, UIUC 17. Performance Result 4/3/2013 Department of

Demo Network

Page 28: VeriFlow: Verifying Network-Wide Invariants in Real Time · April 3, 2013 NSDI 2013 ... 4/3/2013 Department of Computer Science, UIUC 17. Performance Result 4/3/2013 Department of

4/3/2013 Department of Computer Science, UIUC 28

A(1)

10.0.0.33

10.0.0.32

10.0.0.64 10.0.0.128

10.0.0.129

10.0.0.65 10.0.0.66

B(2)

C(3)

D(4)

E(5)

F(6)

G(7) H(8)

J(10)

I(9)

1

2

3

4

1

2

3

1 2

1

23

4

1

2

3

4

2

1 1

2

12

3

3

1

241

2

3

Name(ID)

Intfn

Intf1

Page 29: VeriFlow: Verifying Network-Wide Invariants in Real Time · April 3, 2013 NSDI 2013 ... 4/3/2013 Department of Computer Science, UIUC 17. Performance Result 4/3/2013 Department of

4/3/2013 Department of Computer Science, UIUC 29

A(1)

10.0.0.33

10.0.0.32

10.0.0.64 10.0.0.128

10.0.0.129

10.0.0.65 10.0.0.66

B(2)

C(3)

D(4)

E(5)

F(6)

G(7) H(8)

J(10)

I(9)

1

2

3

4

1

2

3

1 2

1

23

4

1

2

3

4

2

1 1

2

12

3

3

1

241

2

3

Name(ID)

Intfn

Intf1

Page 30: VeriFlow: Verifying Network-Wide Invariants in Real Time · April 3, 2013 NSDI 2013 ... 4/3/2013 Department of Computer Science, UIUC 17. Performance Result 4/3/2013 Department of

4/3/2013 Department of Computer Science, UIUC 30

A(1)

10.0.0.33

10.0.0.32

10.0.0.64 10.0.0.128

10.0.0.129

10.0.0.65 10.0.0.66

B(2)

C(3)

D(4)

E(5)

F(6)

G(7) H(8)

J(10)

I(9)

1

2

3

4

1

2

3

1 2

1

23

4

1

2

3

4

2

1 1

2

12

3

3

1

241

2

3

Name(ID)

Intfn

Intf1