an assertion language for debugging sdn applications
play

An Assertion Language for Debugging SDN Applications Ryan Beckett - PowerPoint PPT Presentation

An Assertion Language for Debugging SDN Applications Ryan Beckett with X. Kelvin Zou, Shuyuan Zhang, Sharad Malik, Jennifer Rexford, David Walker Princeton University 1 Data Plane Verification Controller Find


  1. An Assertion Language for Debugging SDN Applications � Ryan Beckett � with � X. Kelvin Zou, Shuyuan Zhang, � Sharad Malik, Jennifer Rexford, David Walker � Princeton University � 1 �

  2. Data Plane Verification � Controller � • Find common misconfigurations � • Operate in real time � Data Plane Verifier � • Check fixed network properties � • Can report false positives during transitions � 2 �

  3. Stateful Firewall � client client � server server � State � Table � c 1 � A � B � s 1 � c 2 � 3 �

  4. Stateful Firewall � client client � server server � State � Table � Firewall Property: Firewall Property: � c 1 � “A server can only reach a client if the client has communicated A � B � with the server” � s 1 � c 2 � 3 �

  5. Stateful Firewall � client client � server server � State � Table � X � Firewall Property: Firewall Property: � c 1 � “A server can only reach a client if the client has communicated A � B � with the server” � s 1 � c 2 � 3 �

  6. Stateful Firewall � client client � server server � State � Table � Firewall Property: Firewall Property: � c 1 � “A server can only reach a client if the client has communicated A � B � with the server” � s 1 � c 2 � 3 �

  7. Stateful Firewall � client client � server server � c 1 � s 1 � State � Table � Firewall Property: � Firewall Property: c 1 � reachable(s 1, c 1 ) � A � B � s 1 � c 2 � 3 �

  8. Stateful Firewall � client client � server server � c 1 � s 1 � State � Table � c 2 � s 1 � Firewall Property: Firewall Property: � c 1 � reachable(s 1, c 1 ) ∧ � A � B � reachable(s 1, c 2 ) � s 1 � c 2 � 3 �

  9. Stateful Firewall � client client � server server � c 1 � s 1 � State � Table � c 2 � s 1 � Firewall Property: Firewall Property: � c 1 � ∀ (c,s) ∈ table, reachable(s , c) � A � B � s 1 � c 2 � 3 �

  10. Stateful Firewall � client � client server server � c 1 � s 1 � State � Table � c 2 � s 1 � Firewall Property: Firewall Property: � c 1 � ∀ c ∈ clients, ∀ s ∈ servers, � A � B � reachable(s , c) ↔ (c,s) ∈ table � s 1 � c 2 � 3 �

  11. � Stateful Firewall � client � client server server � c 1 � s 1 � State � Table � c 2 � s 1 � Controller Code: Controller Code: � c 1 � assert_continuously assert_continuously(f) � A � B � def packet_in(event): � s 1 � pkt = event.parsed � if pkt.typ != eth.IP_TYP: � return � c 2 � … � 3 �

  12. Stateful Firewall � client client � server server � State � Table � Controller Code: Controller Code: � c 1 � assert_continuously(f) � A � B � s 1 � c 2 � 3 �

  13. Stateful Firewall � client � client server server � c 1 � s 1 � State � Table � r 1 � r 2 � Controller Code: � Controller Code: c 1 � assert_continuously(f) � A � B � s 1 � c 2 � 3 �

  14. Stateful Firewall � client � client server server � c 1 � s 1 � State � Table � r 1 � r 2 � Controller Code: � Controller Code: c 1 � assert_continuously(f) � A � B � s 1 � stop(f) � install(r 1 ) � c 2 � install(r 2 ) � assert_continuously(f) � 3 �

  15. Design Overview � Controller � specification � Data Plane Verifier � 4 �

  16. Design Overview � Controller � Assertion Library � Controller � specification � specification � Data Plane Verifier � Property Generator � verification � conditions � Data Plane Verifier � 4 �

  17. Design Overview � Controller � Assertion Library � Property Generator � Data Plane Verifier � 5 �

  18. Design Overview � Controller � Assertion Library � event � Property Generator � Data Plane Verifier � 5 �

  19. Design Overview � Controller � Assertion Library � event � rule � Property Generator � Data Plane Verifier � 5 �

  20. Design Overview � Controller � Assertion Library � event � state � assertion � update � Property Generator � verification � conditions � Data Plane Verifier � 5 �

  21. Design Overview � Controller � Assertion Library � event � exception � Property Generator � verification � results � Data Plane Verifier � 5 �

  22. Incremental Verification � • Change in data plane (existing tools handle this) � • Change in assertion property � 6 �

  23. Incremental Verification � • Change in data plane (existing tools handle this) � • Change in assertion property � • Incrementally generate new verification conditions � 6 �

  24. Incremental Verification � • Change in data plane (existing tools handle this) � • Change in assertion property � • Incrementally generate new verification conditions � Firewall Property: Firewall Property: � c 1 � reachable(s 1, c 1 ) � A � B � s 1 � c 2 � 6 �

  25. Incremental Verification � • Change in data plane (existing tools handle this) � • Change in assertion property � • Incrementally generate new verification conditions � Firewall Property: Firewall Property: � c 1 � reachable(s 1, c 1 ) ∧ � A � B � reachable(s 1, c 2 ) � s 1 � c 2 � 6 �

  26. Incremental Verification � • Change in data plane (existing tools handle this) � • Change in assertion property � • Incrementally generate new verification conditions � • Precompute and cache intermediate results � Firewall Property: Firewall Property: � c 1 � reachable(s 1, c 1 ) � A � B � s 1 � c 2 � 6 �

  27. Incremental Verification � • Change in data plane (existing tools handle this) � • Change in assertion property � • Incrementally generate new verification conditions � • Precompute and cache intermediate results � Firewall Property: Firewall Property: � c 1 � reachable(s 1, c 1 ) ∧ � A � B � reachable(s 1, c 2 ) � s 1 � c 2 � 6 �

  28. Incremental Data Structure � Firewall Property: Firewall Property: � ∀ c ∈ clients, ∀ s ∈ servers, � reachable(s,c) ↔ (c,s) ∈ table � ∀ c � c=c 1 � c=c 2 � ∀ s � ∀ s � True � s=s 1 � s=s 1 � False � reachable(s 1, c 1 ) ↔ (c 1 ,s 1 ) ∈ table � 7 �

  29. Incremental Data Structure � Firewall Property: � Firewall Property: ∀ c ∈ clients, ∀ s ∈ servers, � reachable(s,c) ↔ (c,s) ∈ table � ∀ c � c=c 1 � c=c 2 � ∀ s � ∀ s � True � s=s 1 � s=s 1 � s=s 2 � s=s 2 � False � 7 �

  30. Incremental Data Structure � Firewall Property: � Firewall Property: ∀ c ∈ clients, ∀ s ∈ servers, � reachable(s,c) ↔ (c,s) ∈ table � ∀ c � c=c 1 � c=c 2 � c=c 3 � ∀ s � ∀ s � ∀ s � True � s=s 1 � s=s 1 � s=s 2 � s=s 2 � s=s 1 � s=s 2 � False � 7 �

  31. Incremental Data Structure � Firewall Property: Firewall Property: � ∀ c ∈ clients, ∀ s ∈ servers, � reachable(s,c) ↔ (c,s) ∈ table � ∀ c � c=c 1 � c=c 2 � c=c 3 � ∀ s � ∀ s � ∀ s � True � s=s 1 � s=s 1 � s=s 2 � s=s 2 � s=s 1 � s=s 2 � False � Query data-plane verifier � 7 �

  32. Incremental Data Structure � Firewall Property: � Firewall Property: ∀ c ∈ clients, ∀ s ∈ servers, � reachable(s,c) ↔ (c,s) ∈ table � ∀ c � c=c 1 � c=c 2 � c=c 3 � ∀ s � ∀ s � ∀ s � True � s=s 1 � s=s 1 � s=s 2 � s=s 2 � s=s 1 � s=s 2 � False � 7 �

  33. Incremental Data Structure � Firewall Property: � Firewall Property: ∀ c ∈ clients, ∀ s ∈ servers, � reachable(s,c) ↔ (c,s) ∈ table � ∀ c � c=c 1 � c=c 2 � c=c 3 � ∀ s � ∀ s � ∀ s � True � s=s 1 � s=s 1 � s=s 2 � s=s 2 � s=s 1 � s=s 2 � False � 7 �

  34. Incremental Data Structure � Firewall Property: � Firewall Property: ∀ c ∈ clients, ∀ s ∈ servers, � reachable(s,c) ↔ (c,s) ∈ table � ∀ c � c=c 1 � c=c 2 � c=c 3 � ∀ s � ∀ s � ∀ s � True � s=s 1 � s=s 1 � s=s 2 � s=s 2 � s=s 1 � s=s 2 � False � 7 �

  35. Prototype Implementation � Stateful Firewall (incremental vs naive) � 100 � • Python assertion debugging library � 75 � VC % Reduction � • Support for Pyretic, Pox, Ryu � 50 � • Uses the VeriFlow verification tool � 25 � • Initial performance is promising � 0 � 10 � 20 � 30 � 40 � 50 � active hosts (clients) � 8 �

  36. Conclusion � • Assertions to verify dynamic properties � • Programmatic control over verification timing � • Incremental algorithm to verify dynamic assertion properties � • Prototype with reasonable performance � 9 �

Recommend


More recommend