causal reasoning in sdns netkat
play

Causal Reasoning in SDNs (NetKAT) Georgiana Caltais, University of - PowerPoint PPT Presentation

Causal Reasoning in SDNs (NetKAT) Georgiana Caltais, University of Konstanz Shonan Seminar -Causal Reasoning in Systems 24-27 June, 2019 1 Outline 1. NetKAT - the Language 2. Reasoning & Verification 3. Towards a Framework for


  1. Causal Reasoning in SDNs (NetKAT) Georgiana Caltais, University of Konstanz Shonan Seminar -“Causal Reasoning in Systems” 24-27 June, 2019 � 1

  2. Outline 1. NetKAT - the Language 2. Reasoning & Verification 3. Towards a Framework for Causality Sources: “Programming, Modeling & Reasoning about Networks” (online tutorial by S.Smolka) “NetKAT: Semantic Foundation for Networks” [C.J.Anderson et. al.], POPL’14 “A Fast Complier for NetKAT” [S.Smolka et. al.], ICFP’15 � 2

  3. 1. NetKAT - the Language � 3

  4. NetKAT Program - Example � 4

  5. NetKAT Syntax & Semantics

  6. Encoding Switch Forwarding Tables � 6

  7. Encoding Network Topologies (I) � 7

  8. Encoding Network Topologies (II) � 8

  9. Encoding Networks � 9

  10. Encoding Networks � 10

  11. Encoding Networks � 11

  12. Encoding Networks � 12

  13. Encoding Networks � 13

  14. 2. Reasoning & Verification � 14

  15. Network Verification • Sound & Complete Axiomatisation [C.J.Anderson et. al.] � 15

  16. Network Verification • Sound & Complete Axiomatisation [C.J.Anderson et. al.] � 16

  17. Network Verification • Sound & Complete Axiomatisation [C.J.Anderson et. al.] � 17

  18. Network Verification • Sound & Complete Axiomatisation [C.J.Anderson et. al.] [[p]] = [[q]] i ff |— p = q • E.g., Reachability: “Does the network forward from ingress (in) to egress (out)”? NO i ff |— in . (switch.topology)* . out = 0 YES i ff |— in . (switch.topology)* . out =/= 0 � 18

  19. Reasoning About Correctness of NetKAT Programs • Programmer 1 has to implement a switch policy s.t.: “H1 can only forward to H2” • Correctness: • H1 can forward to H2 (H1 —>> H2) • H1 cannot forward to H3 or H4 (H1 -/->> H3,4) � 19

  20. Reasoning About Correctness of NetKAT Programs H1 —>> H2 H1 -/->> H3,4 “H1 can only forward to H2” Proven correct based on the axioms! • Policy p1 : (pt = 1 . pt <— 5) + (pt = 6 . pt <— 2) H1 can forward to H2 (H1 —>> H2) • |— (pt = 1) . (p1 . t)* . (pt = 2) =/= 0 H1 cannot forward to H3 or H4 (H1 -/->> H3,4) • |— (pt = 1) . (p1 . t)* . (pt = 3 + pt = 4) = 0 � 20

  21. Reasoning About Correctness of NetKAT Programs • Programmer 2 has to implement a switch policy s.t.: “H3 can only forward to H4” • Correctness: … shown in a similar fashion… • H3 can forward to H4 (H3 —>> H4) • H3 cannot forward to H1 or H2 (H3 -/->> H1,2) � 21

  22. Reasoning About Correctness of NetKAT Programs • Programmer 1: “H1 can only forward to H2” / switch policy p1 • Programmer 2: “H3 can only forward to H4” / switch policy p2 • Assume Programmer 3 implements p as the union of the two correct policies p1 and p2 p = p1 + p2 • Network becomes (p . t)* = ((p1 + p2) . t)* • Does H1 -/->> H3,4 still hold? � 22

  23. Reasoning About Correctness of NetKAT Programs H1 -/->> H3,4 holds i ff |— pt = 1 . ((p1 + p2) . t)* . (pt = 3 + pt = 4) = 0 i ff (acc. to NetKAT axioms) What is the cause? |— pt = 1 . pt <— 4 + P = 0 � 23

  24. 3. Towards a Framework for Causality � 24

  25. What Is the Cause? - Obvious Challenges - H1 -/->> H3,4 holds i ff |— pt = 1 . ((p1 + p2) . t)* . (pt = 3 + pt = 4) = 0 i ff (acc. to NetKAT axioms) |— pt = 1 . pt <— 4 + P = 0 provides too contains * little information � 25

  26. What Is the Cause? - Obvious Challenges - H1 -/->> H3,4 holds i ff |— pt = 1 . ((p1 + p2) . t)* . (pt = 3 + pt = 4) = 0 i ff (acc. to NetKAT axioms) |— pt = 1 . pt <— 4 + P = 0 provides too “Star Elimination” little information in [C.J.Anderson et. al] assumption: no dup, no sw <— uses all axioms to build the Normal Form of P , NF (P) |— P ~ NF(P) … provides too little information as well… � 26

  27. What Is the Cause? - Possible Solution - |— pt = 1 . ((p1 + p2) . t)* . (pt = 3 + pt = 4) = 0 i ff (… axioms) |— pt = 1 . pt <— 1 . pt <— 5 . pt <— 6 . pt <— 4 + P sf = 0 Inhibit some of the axioms, e.g.: “Approximate” * f <— n . f <— n’ = f <— n’ [PA-MOD-MOD] (p.t)* = (1 + p.t)^n for some n… and remove *-unfolding axioms � 27

  28. * “Approximation” � 28

  29. Some Terminology… � 29

  30. � 30

  31. Questions? • Current & Future Work: • Trace back the cause into the original code • How does the counterfactual look like? • Handling other interesting network properties • E.g., waypointing… • Responsibility, blame � 31

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend