17
OFf: Bugspray for Openflow Ram Durairajan, Joel Sommers, Paul Barford [email protected]

OFf: Bugspray for Openflow - WISDOMwisdom.cs.wisc.edu/workshops/spring-14/talks/RamDur.pdfOFf: Bugspray for Openflow !! Ram Durairajan, Joel Sommers, Paul Barford! [email protected]

Embed Size (px)

Citation preview

Page 1: OFf: Bugspray for Openflow - WISDOMwisdom.cs.wisc.edu/workshops/spring-14/talks/RamDur.pdfOFf: Bugspray for Openflow !! Ram Durairajan, Joel Sommers, Paul Barford! rkrish@cs.wisc.edu-

OFf: Bugspray for Openflow

Ram Durairajan, Joel Sommers, Paul Barford

[email protected]  

Page 2: OFf: Bugspray for Openflow - WISDOMwisdom.cs.wisc.edu/workshops/spring-14/talks/RamDur.pdfOFf: Bugspray for Openflow !! Ram Durairajan, Joel Sommers, Paul Barford! rkrish@cs.wisc.edu-

Motivation

•  Debugging SDN applications is hard •  “Runs as designed” may be insufficient •  Deployments must cope with wide range of

operating conditions •  How can we answer the following question: Will my SDN app run as designed when deployed in a live setting?

[email protected]  

Our  Solu2on:  OFf!  

Page 3: OFf: Bugspray for Openflow - WISDOMwisdom.cs.wisc.edu/workshops/spring-14/talks/RamDur.pdfOFf: Bugspray for Openflow !! Ram Durairajan, Joel Sommers, Paul Barford! rkrish@cs.wisc.edu-

Design Goals of OFf

•  A debugging and test environment for SDN developers

•  Default debugging options •  Stepping, breakpoints, watch variables, etc.

•  Comprehensive testing for SDN applications •  Packet replay, packet tracing, visualization, alerts, etc.

•  Tie unwanted network behavior to controller •  Simple, light-weight and no hardware support •  Facilitate transition to live environments

[email protected]  

Page 4: OFf: Bugspray for Openflow - WISDOMwisdom.cs.wisc.edu/workshops/spring-14/talks/RamDur.pdfOFf: Bugspray for Openflow !! Ram Durairajan, Joel Sommers, Paul Barford! rkrish@cs.wisc.edu-

Related work

•  Debuggers – ndb (Handigol et al., 2012) – NetSight (Handigol et al., 2014)

•  Replay tool – OFRewind (Wundsam et al., 2011)

•  Static analysis and symbolic execution tools – Veriflow (Kurshid et al., 2013) – Header Space Analysis (Kazemian et al., 2012) – NICE (Canini et al., 2012)

[email protected]  

Page 5: OFf: Bugspray for Openflow - WISDOMwisdom.cs.wisc.edu/workshops/spring-14/talks/RamDur.pdfOFf: Bugspray for Openflow !! Ram Durairajan, Joel Sommers, Paul Barford! rkrish@cs.wisc.edu-

OFf Architecture

[email protected]  

Page 6: OFf: Bugspray for Openflow - WISDOMwisdom.cs.wisc.edu/workshops/spring-14/talks/RamDur.pdfOFf: Bugspray for Openflow !! Ram Durairajan, Joel Sommers, Paul Barford! rkrish@cs.wisc.edu-

OFf Commands

•  longlist and shortlist source code •  pretty print expressions

•  hide and unhide frames •  interactive interpreter with all variables in scope •  track, watch, or unwatch variables •  edit source files during debugging •  enable or disable break points on the fly

•  sticky mode to visualize code

[email protected]  

Page 7: OFf: Bugspray for Openflow - WISDOMwisdom.cs.wisc.edu/workshops/spring-14/talks/RamDur.pdfOFf: Bugspray for Openflow !! Ram Durairajan, Joel Sommers, Paul Barford! rkrish@cs.wisc.edu-

OFf Additional Features

•  Trace packet through the network – Holistic view of flows, controller and switches – No additional hardware

•  Replay packets later – No OFP modification

•  Defect configuration changes – Topology changes – Rule/action changes – Performance variations

[email protected]  

Page 8: OFf: Bugspray for Openflow - WISDOMwisdom.cs.wisc.edu/workshops/spring-14/talks/RamDur.pdfOFf: Bugspray for Openflow !! Ram Durairajan, Joel Sommers, Paul Barford! rkrish@cs.wisc.edu-

OFf in Action

•  We demonstrate OFf in three scenarios –  Incorrect ordering of updates – Bad multi-app interaction

– Unexpected rule expiration

•  Goal: Identify logical bugs in the source code that lead to transient outages and losses

[email protected]  

Page 9: OFf: Bugspray for Openflow - WISDOMwisdom.cs.wisc.edu/workshops/spring-14/talks/RamDur.pdfOFf: Bugspray for Openflow !! Ram Durairajan, Joel Sommers, Paul Barford! rkrish@cs.wisc.edu-

Incorrect Ordering of Updates

[email protected]  

Page 10: OFf: Bugspray for Openflow - WISDOMwisdom.cs.wisc.edu/workshops/spring-14/talks/RamDur.pdfOFf: Bugspray for Openflow !! Ram Durairajan, Joel Sommers, Paul Barford! rkrish@cs.wisc.edu-

Solution: Incorrect ordering

•  Installation order - C, B, and then A •  Handle barrier messages

•  Using OFf – Replay packets

•  find packets that are dropped at B as rules are not installed

–  Set a break point => sticky mode => watch at B

–  Infer ordering problem and fix – Trace and Diff Reports to verify fix

[email protected]  

3020

3040

3060

3080

3100

3120

3140

5 10 15 20

Bytes Processed (KB)

Time (s)

BeforeAfter

Page 11: OFf: Bugspray for Openflow - WISDOMwisdom.cs.wisc.edu/workshops/spring-14/talks/RamDur.pdfOFf: Bugspray for Openflow !! Ram Durairajan, Joel Sommers, Paul Barford! rkrish@cs.wisc.edu-

Bad Multi-app Interaction

[email protected]  

Block:  10.0.0.1  to  10.0.0.4  Modify:  From:10.0.0.1                                  SrcIP:10.0.0.2  Modify:  To:  10.0.0.3                                DstIP:  10.0.0.4  Allow:  10.0.0.2  to  10.0.0.3  

Page 12: OFf: Bugspray for Openflow - WISDOMwisdom.cs.wisc.edu/workshops/spring-14/talks/RamDur.pdfOFf: Bugspray for Openflow !! Ram Durairajan, Joel Sommers, Paul Barford! rkrish@cs.wisc.edu-

Solution: Bad Multi-app Interaction

•  Using Off developer 2 can – collect network traces (T1) – prototype routing app using fs-sdn

– collect traces again (T2) – runs diff reports (T1 and T2)

•  Rule set conflicts are found

– Change and iterate – Verify firewall invariants

[email protected]  

0

500

1000

1500

2000

2500

3000

3500

5 10 15 20 25 30 35 40 45 50 55

Bytes Processed (KB)

Time (s)

Page 13: OFf: Bugspray for Openflow - WISDOMwisdom.cs.wisc.edu/workshops/spring-14/talks/RamDur.pdfOFf: Bugspray for Openflow !! Ram Durairajan, Joel Sommers, Paul Barford! rkrish@cs.wisc.edu-

Conclusion

•  OFf – a debugging and test environment for SDN developers

•  OFf is simple, flexible, and light-weight •  We demonstrate OFf using three scenarios

[email protected]  

Page 14: OFf: Bugspray for Openflow - WISDOMwisdom.cs.wisc.edu/workshops/spring-14/talks/RamDur.pdfOFf: Bugspray for Openflow !! Ram Durairajan, Joel Sommers, Paul Barford! rkrish@cs.wisc.edu-

Thank you!

[email protected]  

Source Code https://github.com/52-41-4d/fs-master

Questions?

Page 15: OFf: Bugspray for Openflow - WISDOMwisdom.cs.wisc.edu/workshops/spring-14/talks/RamDur.pdfOFf: Bugspray for Openflow !! Ram Durairajan, Joel Sommers, Paul Barford! rkrish@cs.wisc.edu-

Backup Slides

[email protected]  

Page 16: OFf: Bugspray for Openflow - WISDOMwisdom.cs.wisc.edu/workshops/spring-14/talks/RamDur.pdfOFf: Bugspray for Openflow !! Ram Durairajan, Joel Sommers, Paul Barford! rkrish@cs.wisc.edu-

Unexpected Rule Expiration

[email protected]  

10.0.0.0/8  

10.5.0.0/16  t=30  

Page 17: OFf: Bugspray for Openflow - WISDOMwisdom.cs.wisc.edu/workshops/spring-14/talks/RamDur.pdfOFf: Bugspray for Openflow !! Ram Durairajan, Joel Sommers, Paul Barford! rkrish@cs.wisc.edu-

Solution: Unexpected Rule Expiration

•  Using OFf – prototype using fs-sdn and replay trace –  trace flow and rules

•  wrong rule triggered

– Change the timeout behavior – Verify using diff reports

[email protected]  

0 200 400 600 800

1000 1200 1400 1600 1800 2000

5 10 15 20 25 30 35 40 45 50 55

Bytes Processed (KB)

Time (s)