machine verified controllers
play

Machine-Verified Controllers Arjun Guha, Mark Reitblatt, and Nate - PowerPoint PPT Presentation

Machine-Verified Controllers Arjun Guha, Mark Reitblatt, and Nate Foster Cornell University 1 Networks in the News 2 Networks in the News a network change was performed [] executed incorrectly [] more stuck volumes and added


  1. def ¡switch_join(sw): ¡ ¡sw.flow_mod(10, ¡{ ¡dstPort: ¡22 ¡}, ¡[]) ¡ ¡sw.flow_mod(9, ¡{ ¡dstIP: ¡H1, ¡dstPort: ¡80 ¡}, ¡[Fwd ¡1, ¡Fwd ¡3]) ¡ ¡sw.flow_mod(9, ¡{ ¡dstIP: ¡H2, ¡dstPort: ¡80 ¡}, ¡[Fwd ¡2, ¡Fwd ¡3]) ¡ ¡sw.flow_mod(8, ¡{ ¡dstIP: ¡H1 ¡}, ¡[Fwd ¡1]) ¡ ¡sw.flow_mod(8, ¡{ ¡dstIP: ¡H2 ¡}, ¡[Fwd ¡2]) Block SSH traffic dstPort == 22 ⟹ Drop What if ... Forward other traffic normally dstIP == H1 ⟹ Fwd 1 dstIP == H2 ⟹ Fwd 2 flow_mod flow_mod Log Web requests flow_mod dstPort == 80 ⟹ Fwd 3 7

  2. def ¡switch_join(sw): ¡ ¡sw.flow_mod(10, ¡{ ¡dstPort: ¡22 ¡}, ¡[]) ¡ ¡sw.flow_mod(9, ¡{ ¡dstIP: ¡H1, ¡dstPort: ¡80 ¡}, ¡[Fwd ¡1, ¡Fwd ¡3]) ¡ ¡sw.flow_mod(9, ¡{ ¡dstIP: ¡H2, ¡dstPort: ¡80 ¡}, ¡[Fwd ¡2, ¡Fwd ¡3]) ¡ ¡sw.flow_mod(8, ¡{ ¡dstIP: ¡H1 ¡}, ¡[Fwd ¡1]) ¡ ¡sw.flow_mod(8, ¡{ ¡dstIP: ¡H2 ¡}, ¡[Fwd ¡2]) Block SSH traffic dstPort == 22 ⟹ Drop What if ... Forward other traffic normally dstIP == H1 ⟹ Fwd 1 dstIP == H2 ⟹ Fwd 2 packet_in flow_mod flow_mod Log Web requests flow_mod dstPort == 80 ⟹ Fwd 3 7

  3. def ¡switch_join(sw): ¡ ¡sw.flow_mod(10, ¡{ ¡dstPort: ¡22 ¡}, ¡[]) ¡ ¡sw.flow_mod(9, ¡{ ¡dstIP: ¡H1, ¡dstPort: ¡80 ¡}, ¡[Fwd ¡1, ¡Fwd ¡3]) ¡ ¡sw.flow_mod(9, ¡{ ¡dstIP: ¡H2, ¡dstPort: ¡80 ¡}, ¡[Fwd ¡2, ¡Fwd ¡3]) ¡ ¡sw.flow_mod(8, ¡{ ¡dstIP: ¡H1 ¡}, ¡[Fwd ¡1]) ¡ ¡sw.flow_mod(8, ¡{ ¡dstIP: ¡H2 ¡}, ¡[Fwd ¡2]) def ¡ packet_in (sw, ¡pkt): ¡ ¡actions ¡= ¡[] ¡ ¡if ¡pkt.dstPort ¡== ¡22: Block SSH traffic ¡ ¡ ¡ ¡return dstPort == 22 ⟹ Drop ¡ ¡if ¡pkt.dstPort ¡== ¡80: ¡ ¡ ¡ ¡actions ¡= ¡actions ¡+ ¡[Fwd ¡3] Forward other traffic normally ¡ ¡if ¡pkt.dstIP ¡== ¡H1: ¡ ¡ ¡ ¡actions ¡= ¡actions ¡+ ¡[Fwd ¡1] dstIP == H1 ⟹ Fwd 1 ¡ ¡if ¡pkt.dstIP ¡== ¡H2: ¡ ¡ ¡ ¡actions ¡= ¡actions ¡+ ¡[Fwd ¡2] dstIP == H2 ⟹ Fwd 2 ¡ ¡sw.packet_out(pkt, ¡actions) Log Web requests dstPort == 80 ⟹ Fwd 3 8

  4. def ¡switch_join(sw): ¡ ¡sw.flow_mod(10, ¡{ ¡dstPort: ¡22 ¡}, ¡[]) ¡ ¡sw.flow_mod(9, ¡{ ¡dstIP: ¡H1, ¡dstPort: ¡80 ¡}, ¡[Fwd ¡1, ¡Fwd ¡3]) ¡ ¡sw.flow_mod(9, ¡{ ¡dstIP: ¡H2, ¡dstPort: ¡80 ¡}, ¡[Fwd ¡2, ¡Fwd ¡3]) ¡ ¡sw.flow_mod(8, ¡{ ¡dstIP: ¡H1 ¡}, ¡[Fwd ¡1]) ¡ ¡sw.flow_mod(8, ¡{ ¡dstIP: ¡H2 ¡}, ¡[Fwd ¡2]) must be equivalent def ¡ packet_in (sw, ¡pkt): ¡ ¡actions ¡= ¡[] ¡ ¡if ¡pkt.dstPort ¡== ¡22: Block SSH traffic ¡ ¡ ¡ ¡return dstPort == 22 ⟹ Drop ¡ ¡if ¡pkt.dstPort ¡== ¡80: ¡ ¡ ¡ ¡actions ¡= ¡actions ¡+ ¡[Fwd ¡3] Forward other traffic normally ¡ ¡if ¡pkt.dstIP ¡== ¡H1: ¡ ¡ ¡ ¡actions ¡= ¡actions ¡+ ¡[Fwd ¡1] dstIP == H1 ⟹ Fwd 1 ¡ ¡if ¡pkt.dstIP ¡== ¡H2: ¡ ¡ ¡ ¡actions ¡= ¡actions ¡+ ¡[Fwd ¡2] dstIP == H2 ⟹ Fwd 2 ¡ ¡sw.packet_out(pkt, ¡actions) Log Web requests dstPort == 80 ⟹ Fwd 3 8

  5. def ¡switch_join(sw): ¡ ¡sw.flow_mod(10, ¡{ ¡dstPort: ¡22 ¡}, ¡[]) ¡ ¡sw.flow_mod(9, ¡{ ¡dstIP: ¡H1, ¡dstPort: ¡80 ¡}, ¡[Fwd ¡1, ¡Fwd ¡3]) ¡ ¡sw.flow_mod(9, ¡{ ¡dstIP: ¡H2, ¡dstPort: ¡80 ¡}, ¡[Fwd ¡2, ¡Fwd ¡3]) ¡ ¡sw.flow_mod(8, ¡{ ¡dstIP: ¡H1 ¡}, ¡[Fwd ¡1]) ¡ ¡sw.flow_mod(8, ¡{ ¡dstIP: ¡H2 ¡}, ¡[Fwd ¡2]) 9

  6. def ¡switch_join(sw): ¡ ¡sw.flow_mod(10, ¡{ ¡dstPort: ¡22 ¡}, ¡[]) ¡ ¡sw.flow_mod(9, ¡{ ¡dstIP: ¡H1, ¡dstPort: ¡80 ¡}, ¡[Fwd ¡1, ¡Fwd ¡3])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{ ¡dstPort: ¡22 ¡}, ¡[]) ¡ ¡sw.flow_mod(9, ¡{ ¡dstIP: ¡H1, ¡dstPort: ¡80 ¡}, ¡[Fwd ¡1, ¡Fwd ¡3]) ¡ ¡sw.flow_mod(9, ¡{ ¡dstIP: ¡H2, ¡dstPort: ¡80 ¡}, ¡[Fwd ¡2, ¡Fwd ¡3]) ¡ ¡sw.flow_mod(8, ¡{ ¡dstIP: ¡H1 ¡}, ¡[Fwd ¡1]) ¡ ¡sw.flow_mod(8, ¡{ ¡dstIP: ¡H2 ¡}, ¡[Fwd ¡2]) dstPort: ¡22 [] dstPort: ¡22 [] dstPort: ¡22 [] dstIP: ¡H1, ¡dstPort: ¡80 Fwd ¡1, ¡Fwd ¡3 dstIP: ¡H1, ¡dstPort: ¡80 Fwd ¡1, ¡Fwd ¡3 dstIP: ¡H2, ¡dstPort: ¡80 Fwd ¡2, ¡Fwd ¡3 Transient policy violation dstIP: ¡H1 Fwd ¡1 dstPort: ¡22 [] dstIP: ¡H2 Fwd ¡2 dstIP: ¡H1, ¡dstPort: ¡80 Fwd ¡1, ¡Fwd ¡3 dstIP: ¡H2, ¡dstPort: ¡80 Fwd ¡2, ¡Fwd ¡3 dstIP: ¡H1 Fwd ¡1 dstIP: ¡H2 Fwd ¡2 9

  9. def ¡switch_join(sw): ¡ ¡sw.flow_mod(10, ¡{ ¡dstPort: ¡22 ¡}, ¡[]) ¡ ¡sw.barrier_request() ¡ ¡sw.flow_mod(9, ¡{ ¡dstIP: ¡H1, ¡dstPort: ¡80 ¡}, ¡[Fwd ¡1, ¡Fwd ¡3]) ¡ ¡sw.barrier_request() ¡ ¡sw.flow_mod(9, ¡{ ¡dstIP: ¡H2, ¡dstPort: ¡80 ¡}, ¡[Fwd ¡2, ¡Fwd ¡3]) ¡ ¡sw.barrier_request() ¡ ¡sw.flow_mod(8, ¡{ ¡dstIP: ¡H1 ¡}, ¡[Fwd ¡1]) ¡ ¡sw.barrier_request() ¡ ¡sw.flow_mod(8, ¡{ ¡dstIP: ¡H2 ¡}, ¡[Fwd ¡2]) def ¡packet_in(sw, ¡pkt): ¡ ¡actions ¡= ¡[] ¡ ¡if ¡pkt.dstPort ¡== ¡22: ¡ ¡ ¡ ¡return ¡ ¡if ¡pkt.dstPort ¡== ¡80: ¡ ¡ ¡ ¡actions ¡= ¡actions ¡+ ¡[Fwd ¡3] ¡ ¡if ¡pkt.dstIP ¡== ¡H1: ¡ ¡ ¡ ¡actions ¡= ¡actions ¡+ ¡[Fwd ¡1] ¡ ¡if ¡pkt.dstIP ¡== ¡H2: ¡ ¡ ¡ ¡actions ¡= ¡actions ¡+ ¡[Fwd ¡2] ¡ ¡sw.packet_out(pkt, ¡actions) 10

  10. def ¡switch_join(sw): ¡ ¡sw.flow_mod(10, ¡ { ¡dstPort: ¡22 ¡} , ¡[]) ¡ ¡sw.barrier_request() ¡ ¡sw.flow_mod(9, ¡ { ¡dstIP: ¡H1, ¡dstPort: ¡80 ¡} , ¡[Fwd ¡1, ¡Fwd ¡3]) ¡ ¡sw.barrier_request() ¡ ¡sw.flow_mod(9, ¡ { ¡dstIP: ¡H2, ¡dstPort: ¡80 ¡} , ¡[Fwd ¡2, ¡Fwd ¡3]) ¡ ¡sw.barrier_request() ¡ ¡sw.flow_mod(8, ¡ { ¡dstIP: ¡H1 ¡} , ¡[Fwd ¡1]) ¡ ¡sw.barrier_request() ¡ ¡sw.flow_mod(8, ¡ { ¡dstIP: ¡H2 ¡} , ¡[Fwd ¡2]) def ¡packet_in(sw, ¡pkt): ¡ ¡actions ¡= ¡[] ¡ ¡if ¡pkt.dstPort ¡== ¡22: ¡ ¡ ¡ ¡return ¡ ¡if ¡pkt.dstPort ¡== ¡80: ¡ ¡ ¡ ¡actions ¡= ¡actions ¡+ ¡[Fwd ¡3] ¡ ¡if ¡pkt.dstIP ¡== ¡H1: ¡ ¡ ¡ ¡actions ¡= ¡actions ¡+ ¡[Fwd ¡1] ¡ ¡if ¡pkt.dstIP ¡== ¡H2: ¡ ¡ ¡ ¡actions ¡= ¡actions ¡+ ¡[Fwd ¡2] ¡ ¡sw.packet_out(pkt, ¡actions) 11

  11. def ¡switch_join(sw): ¡ ¡sw.flow_mod(10, ¡ { ¡dstPort: ¡22 ¡} , ¡[]) ¡ ¡sw.barrier_request() ¡ ¡sw.flow_mod(9, ¡ { ¡dstIP: ¡H1, ¡dstPort: ¡80 ¡} , ¡[Fwd ¡1, ¡Fwd ¡3]) ¡ ¡sw.barrier_request() ¡ ¡sw.flow_mod(9, ¡ { ¡dstIP: ¡H2, ¡dstPort: ¡80 ¡} , ¡[Fwd ¡2, ¡Fwd ¡3]) Match all ¡ ¡sw.barrier_request() packets!? ¡ ¡sw.flow_mod(8, ¡ { ¡dstIP: ¡H1 ¡} , ¡[Fwd ¡1]) ¡ ¡sw.barrier_request() ¡ ¡sw.flow_mod(8, ¡ { ¡dstIP: ¡H2 ¡} , ¡[Fwd ¡2]) def ¡packet_in(sw, ¡pkt): ¡ ¡actions ¡= ¡[] ¡ ¡if ¡pkt.dstPort ¡== ¡22: ¡ ¡ ¡ ¡return ¡ ¡if ¡pkt.dstPort ¡== ¡80: ¡ ¡ ¡ ¡actions ¡= ¡actions ¡+ ¡[Fwd ¡3] ¡ ¡if ¡pkt.dstIP ¡== ¡H1: ¡ ¡ ¡ ¡actions ¡= ¡actions ¡+ ¡[Fwd ¡1] ¡ ¡if ¡pkt.dstIP ¡== ¡H2: ¡ ¡ ¡ ¡actions ¡= ¡actions ¡+ ¡[Fwd ¡2] ¡ ¡sw.packet_out(pkt, ¡actions) 11

  12. def ¡switch_join(sw): ¡ ¡sw.flow_mod(10, ¡{ ¡eth: ¡0x800, ¡proto: ¡6 , ¡dstPort: ¡22 ¡}, ¡[]) ¡ ¡sw.barrier_request() ¡ ¡sw.flow_mod(9, ¡{ ¡ eth: ¡0x800, ¡proto: ¡6, ¡dstIP: ¡H1, ¡dstPort: ¡80 ¡}, ¡[Fwd ¡1, ¡Fwd ¡3]) ¡ ¡sw.barrier_request() ¡ ¡sw.flow_mod(9, ¡{ ¡ eth: ¡0x800, ¡proto: ¡6, ¡ dstIP: ¡H2, ¡dstPort: ¡80 ¡}, ¡[Fwd ¡2, ¡Fwd ¡3]) ¡ ¡sw.barrier_request() ¡ ¡sw.flow_mod(8, ¡{ ¡ eth: ¡0x800, ¡ dstIP: ¡H1 ¡}, ¡[Fwd ¡1]) ¡ ¡sw.barrier_request() ¡ ¡sw.flow_mod(8, ¡{ ¡ eth: ¡0x800, ¡ dstIP: ¡H2 ¡}, ¡[Fwd ¡2]) def ¡packet_in(sw, ¡pkt): ¡ ¡actions ¡= ¡[] ¡ ¡if ¡pkt.dstPort ¡== ¡22: ¡ ¡ ¡ ¡return ¡ ¡if ¡pkt.dstPort ¡== ¡80: ¡ ¡ ¡ ¡actions ¡= ¡actions ¡+ ¡[Fwd ¡3] ¡ ¡if ¡pkt.dstIP ¡== ¡H1: ¡ ¡ ¡ ¡actions ¡= ¡actions ¡+ ¡[Fwd ¡1] ¡ ¡if ¡pkt.dstIP ¡== ¡H2: ¡ ¡ ¡ ¡actions ¡= ¡actions ¡+ ¡[Fwd ¡2] ¡ ¡sw.packet_out(pkt, ¡actions) 12

  13. def ¡switch_join(sw): ¡ ¡sw.flow_mod(10, ¡{ ¡eth: ¡0x800, ¡proto: ¡6 , ¡dstPort: ¡22 ¡}, ¡[]) ¡ ¡sw.barrier_request() ¡ ¡sw.flow_mod(9, ¡{ ¡ eth: ¡0x800, ¡proto: ¡6, ¡dstIP: ¡H1, ¡dstPort: ¡80 ¡}, ¡[Fwd ¡1, ¡Fwd ¡3]) ¡ ¡sw.barrier_request() ¡ ¡sw.flow_mod(9, ¡{ ¡ eth: ¡0x800, ¡proto: ¡6, ¡ dstIP: ¡H2, ¡dstPort: ¡80 ¡}, ¡[Fwd ¡2, ¡Fwd ¡3]) ¡ ¡sw.barrier_request() ¡ ¡sw.flow_mod(8, ¡{ ¡ eth: ¡0x800, ¡ dstIP: ¡H1 ¡}, ¡[Fwd ¡1]) ¡ ¡sw.barrier_request() ¡ ¡sw.flow_mod(8, ¡{ ¡ eth: ¡0x800, ¡ dstIP: ¡H2 ¡}, ¡[Fwd ¡2]) def ¡packet_in(sw, ¡pkt): ¡ ¡actions ¡= ¡[] ¡ ¡if ¡pkt.dstPort ¡== ¡22: ¡ ¡ ¡ ¡return ¡ ¡if ¡pkt.dstPort ¡== ¡80: ¡ ¡ ¡ ¡actions ¡= ¡actions ¡+ ¡[Fwd ¡3] ¡ ¡if ¡pkt.dstIP ¡== ¡H1: ¡ ¡ ¡ ¡actions ¡= ¡actions ¡+ ¡[Fwd ¡1] ¡ ¡if ¡pkt.dstIP ¡== ¡H2: ¡ ¡ ¡ ¡actions ¡= ¡actions ¡+ ¡[Fwd ¡2] ¡ ¡sw.packet_out(pkt, ¡actions) 12

  14. Recap: Bugs in Controllers 13

  15. Recap: Bugs in Controllers Violation Guilty Controllers 13

  16. Recap: Bugs in Controllers Violation Guilty Controllers handles packet_in incorrectly 13

  17. Recap: Bugs in Controllers Violation Guilty Controllers handles packet_in incorrectly PANE (absolved) 13

  18. Recap: Bugs in Controllers Violation Guilty Controllers handles packet_in incorrectly PANE (absolved) does not use barriers 13

  19. Recap: Bugs in Controllers Violation Guilty Controllers handles packet_in incorrectly PANE (absolved) does not use barriers NetCore, PANE, Nettle-FRP 13

  20. Recap: Bugs in Controllers Violation Guilty Controllers handles packet_in incorrectly PANE (absolved) does not use barriers NetCore, PANE, Nettle-FRP synthesizes malformed patterns NetCore, PANE, Nettle-FRP † † Nettle is only affected by missing protocol numbers 13

  21. Recap: Bugs in Controllers Violation Guilty Controllers handles packet_in incorrectly PANE (absolved) does not use barriers NetCore, PANE, Nettle-FRP synthesizes malformed patterns NetCore, PANE, Nettle-FRP † optimizer breaks flow tables NetCore (absolved) † Nettle is only affected by missing protocol numbers 13

  22. Recap: Bugs in Controllers Violation Guilty Controllers handles packet_in incorrectly PANE (absolved) does not use barriers NetCore, PANE, Nettle-FRP discovered by formalizing OpenFlow synthesizes malformed patterns NetCore, PANE, Nettle-FRP † optimizer breaks flow tables NetCore (absolved) † Nettle is only affected by missing protocol numbers 13

  23. SDN Facilitates Formal Methods Run-time Monitoring: Static Bug-Finding: Verified Controllers: VeriFlow NICE this talk by Khurshid, Zhou, Caesar, and by Canini, Venzano, Pere š íni, Kosti ć , Godfrey and Rexford • runtime property • program verification • symbolic execution / checking model checking • proof of correctness • detects errors • finds several bugs • no runtime cost dynamically statically • proof w.r.t. a detailed • small runtime • seconds to days to model of OpenFlow overhead test, no runtime cost • fixes must be out-of- • cannot prove the band absence of bugs 14

  24. VeriFlow: Reachability Violation Guilty Controllers handles packet_in incorrectly PANE (absolved) does not use barriers NetCore, PANE, Nettle-FRP synthesizes malformed patterns NetCore, PANE, Nettle-FRP † optimizer breaks flow tables NetCore (absolved) † Nettle is only affected by missing protocol numbers 15

  25. VeriFlow: Reachability Violation Guilty Controllers liveness: eventually produces packet_out handles packet_in incorrectly PANE (absolved) does not use barriers NetCore, PANE, Nettle-FRP synthesizes malformed patterns NetCore, PANE, Nettle-FRP † optimizer breaks flow tables NetCore (absolved) † Nettle is only affected by missing protocol numbers 15

  26. VeriFlow: Reachability Violation Guilty Controllers liveness: eventually produces packet_out handles packet_in incorrectly PANE (absolved) “acceptable does not use barriers NetCore, PANE, Nettle-FRP violation”? synthesizes malformed patterns NetCore, PANE, Nettle-FRP † optimizer breaks flow tables NetCore (absolved) † Nettle is only affected by missing protocol numbers 15

  27. NICE: Library of Properties Violation Guilty Controller handles packet_in incorrectly PANE (absolved) does not use barriers NetCore, PANE, Nettle-FRP synthesizes malformed patterns NetCore, PANE, Nettle-FRP † optimizer breaks flow tables NetCore (absolved) † Nettle is only affected by missing protocol numbers 16

  28. NICE: Library of Properties Violation Guilty Controller handles packet_in incorrectly PANE (absolved) assumes FIFO does not use barriers NetCore, PANE, Nettle-FRP message processing synthesizes malformed patterns NetCore, PANE, Nettle-FRP † optimizer breaks flow tables NetCore (absolved) † Nettle is only affected by missing protocol numbers 16

  29. NICE: Library of Properties Violation Guilty Controller handles packet_in incorrectly PANE (absolved) assumes FIFO does not use barriers NetCore, PANE, Nettle-FRP message processing synthesizes malformed patterns NetCore, PANE, Nettle-FRP † requires high-level policy optimizer breaks flow tables NetCore (absolved) † Nettle is only affected by missing protocol numbers 16

  30. 17

  31. A Sample of Recent Verification Successes: Tools: Textbooks: 17

  32. A Sample of Recent Verification Operating Systems Compilers seL4 CompCert Successes: SOSP 2009 CACM, July 2009 Verve F* PLDI 2010 POPL 2012 Tools: Textbooks: 17

  33. A Sample of Recent Verification Operating Systems Compilers seL4 CompCert Successes: SOSP 2009 CACM, July 2009 Verve F* PLDI 2010 POPL 2012 Tools: Textbooks: 17

  34. A Sample of Recent Verification Operating Systems Compilers seL4 CompCert Successes: SOSP 2009 CACM, July 2009 Verve F* PLDI 2010 POPL 2012 Tools: Certified Programming Textbooks: with Dependent Types 17

  35. Mathematical Foundations of SDN 18

  36. OpenFlow 1.0 specification 42 pages of prose and C structs ... 19

  37. OpenFlow 1.0 specification 42 pages of prose and C structs ... Definition ¡ Switch ¡ := ¡ Id ¡ * ¡ Ports ¡ * ¡ FlowTbl ¡ * ¡ InBuf ¡ * ¡ OutBuf ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ * ¡ OFInBuf ¡ * ¡ OFOutBuf. 19

  38. OpenFlow 1.0 specification 42 pages of prose and C structs ... Definition ¡ Switch ¡ := ¡ Id ¡ * ¡ Ports ¡ * ¡ FlowTbl ¡ * ¡ InBuf ¡ * ¡ OutBuf ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ * ¡ OFInBuf ¡ * ¡ OFOutBuf. Definition ¡ Controller ¡ := ¡ State ¡* ¡InFunc ¡* ¡OutFunc. 19

  39. OpenFlow 1.0 specification 42 pages of prose and C structs ... Definition ¡ Switch ¡ := ¡ Id ¡ * ¡ Ports ¡ * ¡ FlowTbl ¡ * ¡ InBuf ¡ * ¡ OutBuf ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ * ¡ OFInBuf ¡ * ¡ OFOutBuf. Definition ¡ Controller ¡ := ¡ State ¡* ¡InFunc ¡* ¡OutFunc. Definition ¡ Link ¡ := ¡ (Switch ¡* ¡Port) ¡ * ¡ list ¡ Packet ¡ * ¡ (Switch ¡* ¡Port) . 19

  40. OpenFlow 1.0 specification 42 pages of prose and C structs ... Definition ¡ Switch ¡ := ¡ Id ¡ * ¡ Ports ¡ * ¡ FlowTbl ¡ * ¡ InBuf ¡ * ¡ OutBuf ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ * ¡ OFInBuf ¡ * ¡ OFOutBuf. Definition ¡ Controller ¡ := ¡ State ¡* ¡InFunc ¡* ¡OutFunc. Definition ¡ Link ¡ := ¡ (Switch ¡* ¡Port) ¡ * ¡ list ¡ Packet ¡ * ¡ (Switch ¡* ¡Port) . Definition ¡ OpenFlowLink ¡ := ¡ Id ¡ * ¡ list ¡SwitchMsg ¡ * ¡ list ¡CtrlMsg . 19

  41. /* ¡Fields ¡to ¡match ¡against ¡flows ¡*/ struct ¡ofp_match ¡{ ¡ ¡ ¡ ¡uint32_t ¡wildcards; ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ /* ¡Wildcard ¡fields. ¡*/ ¡ ¡ ¡ ¡uint16_t ¡in_port; ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ /* ¡Input ¡switch ¡port. ¡*/ ¡ ¡ ¡ ¡ uint8_t ¡dl_src[OFP_ETH_ALEN]; ¡ /* ¡Ethernet ¡source ¡address. ¡*/ ¡ ¡ ¡ ¡ uint8_t ¡dl_dst[OFP_ETH_ALEN]; ¡ /* ¡Ethernet ¡destination ¡address. ¡*/ ¡ ¡ ¡ ¡uint16_t ¡dl_vlan; ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ /* ¡Input ¡VLAN. ¡*/ ¡ ¡ ¡ ¡ uint8_t ¡dl_vlan_pcp; ¡ ¡ ¡ ¡ ¡ ¡ ¡ /* ¡Input ¡VLAN ¡priority. ¡*/ ¡ ¡ ¡ ¡ uint8_t ¡pad1[1]; ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ /* ¡Align ¡to ¡64-­‑bits. ¡*/ ¡ ¡ ¡ ¡uint16_5 ¡dl_type; ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ /* ¡Ethernet ¡frame ¡type. ¡*/ ¡ ¡ ¡ ¡ uint8_t ¡nw_tos; ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ /* ¡IP ¡ToS ¡(DSCP ¡field, ¡6 ¡bits). ¡*/ ¡ ¡ ¡ ¡ uint8_t ¡nw_proto; ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ /* ¡IP ¡protocol ¡or ¡lower ¡8 ¡bits ¡of ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ARP ¡opcode. ¡*/ ¡ ¡ ¡ ¡ uint8_t ¡pad2[2]; ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ /* ¡Align ¡to ¡64-­‑bits. ¡*/ ¡ ¡ ¡ ¡uint32_t ¡nw_src; ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ /* ¡IP ¡source ¡address. ¡*/ ¡ ¡ ¡ ¡uint32_t ¡nw_dst; ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ /* ¡IP ¡destination ¡address. ¡*/ ¡ ¡ ¡ ¡uint16_t ¡tp_src; ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ /* ¡TCP/UDP ¡source ¡port. ¡*/ ¡ ¡ ¡ ¡uint16_t ¡tp_dst; ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ /* ¡TCP/UDP ¡destination ¡port. ¡*/ }; OFP_ASSERT( sizeof ( struct ¡ofp_match) ¡ == ¡40); 20

  42. /* ¡Fields ¡to ¡match ¡against ¡flows ¡*/ Record ¡ Pattern ¡ : ¡ Type ¡ := ¡ MkPattern ¡ { struct ¡ofp_match ¡{ ¡ ¡dlSrc ¡ : ¡ Wildcard ¡ EthernetAddress; ¡ ¡ ¡ ¡uint32_t ¡wildcards; ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ /* ¡Wildcard ¡fields. ¡*/ ¡ ¡dlDst ¡ : ¡ Wildcard ¡ EthernetAddress; ¡ ¡ ¡ ¡uint16_t ¡in_port; ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ /* ¡Input ¡switch ¡port. ¡*/ ¡ ¡dlType ¡ : ¡ Wildcard ¡ EthernetType; ¡ ¡ ¡ ¡ uint8_t ¡dl_src[OFP_ETH_ALEN]; ¡ /* ¡Ethernet ¡source ¡address. ¡*/ ¡ ¡dlVlan ¡ : ¡ Wildcard ¡ VLAN; ¡ ¡ ¡ ¡ uint8_t ¡dl_dst[OFP_ETH_ALEN]; ¡ /* ¡Ethernet ¡destination ¡address. ¡*/ ¡ ¡dlVlanPcp ¡ : ¡ Wildcard ¡ VLANPriority; ¡ ¡ ¡ ¡uint16_t ¡dl_vlan; ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ /* ¡Input ¡VLAN.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 ¡ ¡ ¡uint32_t ¡nw_src; ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ /* ¡IP ¡source ¡address. ¡*/ ¡ ¡ ¡ ¡uint32_t ¡nw_dst; ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ /* ¡IP ¡destination ¡address. ¡*/ ¡ ¡ ¡ ¡uint16_t ¡tp_src; ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ /* ¡TCP/UDP ¡source ¡port. ¡*/ ¡ ¡ ¡ ¡uint16_t ¡tp_dst; ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ /* ¡TCP/UDP ¡destination ¡port. ¡*/ }; OFP_ASSERT( sizeof ( struct ¡ofp_match) ¡ == ¡40); 20

  43. /* ¡Fields ¡to ¡match ¡against ¡flows ¡*/ Record ¡ Pattern ¡ : ¡ Type ¡ := ¡ MkPattern ¡ { struct ¡ofp_match ¡{ ¡ ¡dlSrc ¡ : ¡ Wildcard ¡ EthernetAddress; ¡ ¡ ¡ ¡uint32_t ¡wildcards; ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ /* ¡Wildcard ¡fields. ¡*/ ¡ ¡dlDst ¡ : ¡ Wildcard ¡ EthernetAddress; ¡ ¡ ¡ ¡uint16_t ¡in_port; ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ /* ¡Input ¡switch ¡port. ¡*/ ¡ ¡dlType ¡ : ¡ Wildcard ¡ EthernetType; ¡ ¡ ¡ ¡ uint8_t ¡dl_src[OFP_ETH_ALEN]; ¡ /* ¡Ethernet ¡source ¡address. ¡*/ ¡ ¡dlVlan ¡ : ¡ Wildcard ¡ VLAN; ¡ ¡ ¡ ¡ uint8_t ¡dl_dst[OFP_ETH_ALEN]; ¡ /* ¡Ethernet ¡destination ¡address. ¡*/ ¡ ¡dlVlanPcp ¡ : ¡ Wildcard ¡ VLANPriority; ¡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ad2[2]; ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ /* ¡Align ¡to ¡64-­‑bits. ¡*/ }. ¡ ¡ ¡ ¡uint32_t ¡nw_src; ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ /* ¡IP ¡source ¡address. ¡*/ ¡ ¡ ¡ ¡uint32_t ¡nw_dst; ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ /* ¡IP ¡destination ¡address. ¡*/ ¡ ¡ ¡ ¡uint16_t ¡tp_src; ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ /* ¡TCP/UDP ¡source ¡port. ¡*/ ¡ ¡ ¡ ¡uint16_t ¡tp_dst; ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ /* ¡TCP/UDP ¡destination ¡port. ¡*/ }; OFP_ASSERT( sizeof ( struct ¡ofp_match) ¡ == ¡40); 20

  44. /* ¡Fields ¡to ¡match ¡against ¡flows ¡*/ Record ¡ Pattern ¡ : ¡ Type ¡ := ¡ MkPattern ¡ { struct ¡ofp_match ¡{ ¡ ¡dlSrc ¡ : ¡ Wildcard ¡ EthernetAddress; ¡ ¡ ¡ ¡uint32_t ¡wildcards; ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ /* ¡Wildcard ¡fields. ¡*/ ¡ ¡dlDst ¡ : ¡ Wildcard ¡ EthernetAddress; ¡ ¡ ¡ ¡uint16_t ¡in_port; ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ /* ¡Input ¡switch ¡port. ¡*/ ¡ ¡dlType ¡ : ¡ Wildcard ¡ EthernetType; ¡ ¡ ¡ ¡ uint8_t ¡dl_src[OFP_ETH_ALEN]; ¡ /* ¡Ethernet ¡source ¡address. ¡*/ ¡ ¡dlVlan ¡ : ¡ Wildcard ¡ VLAN; ¡ ¡ ¡ ¡ uint8_t ¡dl_dst[OFP_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¡ ¡ ¡ARP ¡opcode. ¡*/ ¡ ¡inPort ¡ : ¡ Wildcard ¡ Port ¡ ¡ ¡ ¡ uint8_t ¡pad2[2]; ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ /* ¡Align ¡to ¡64-­‑bits. ¡*/ }. ¡ ¡ ¡ ¡uint32_t ¡nw_src; ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ /* ¡IP ¡source ¡address. ¡*/ ¡ ¡ ¡ ¡uint32_t ¡nw_dst; ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ /* ¡IP ¡destination ¡address. ¡*/ ¡ ¡ ¡ ¡uint16_t ¡tp_src; ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ /* ¡TCP/UDP ¡source ¡port. ¡*/ ¡ ¡ ¡ ¡uint16_t ¡tp_dst; ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ /* ¡TCP/UDP ¡destination ¡port. ¡*/ }; OFP_ASSERT( sizeof ( struct ¡ofp_match) ¡ == ¡40); Definition ¡ Pattern_inter ¡ ( p ¡p' :Pattern) ¡ := ¡ ¡ let ¡dlSrc ¡ := ¡ Wildcard_inter ¡EthernetAddress.eqdec ¡ ( ptrnDlSrc ¡p ) ¡ ( ptrnDlSrc ¡p' ) ¡ in ¡ ¡ let ¡dlDst ¡ := ¡ Wildcard_inter ¡EthernetAddress.eqdec ¡ ( ptrnDlDst ¡p ) ¡ ( ptrnDlDst ¡p' ) ¡ in ¡ ¡ let ¡dlType ¡ := ¡ Wildcard_inter ¡Word16.eqdec ¡ ( ptrnDlType ¡p ) ¡ ( ptrnDlType ¡p' ) ¡ in ¡ ¡ let ¡dlVlan ¡ := ¡ Wildcard_inter ¡Word16.eqdec ¡ ( ptrnDlVlan ¡p ) ¡ ( ptrnDlVlan ¡p' ) ¡ in ¡ ¡ let ¡dlVlanPcp ¡ := ¡ Wildcard_inter ¡Word8.eqdec ¡ ( ptrnDlVlanPcp ¡p ) ¡ ( ptrnDlVlanPcp ¡p' ) ¡ in ¡ ¡ let ¡nwSrc ¡ := ¡ Wildcard_inter ¡Word32.eqdec ¡ ( ptrnNwSrc ¡p ) ¡ ( ptrnNwSrc ¡p' ) ¡ in ¡ ¡ let ¡nwDst ¡ := ¡ Wildcard_inter ¡Word32.eqdec ¡ ( ptrnNwDst ¡p ) ¡ ( ptrnNwDst ¡p' ) ¡ in ¡ ¡ let ¡nwProto ¡ := ¡ Wildcard_inter ¡Word8.eqdec ¡ ( ptrnNwProto ¡p ) ¡ ( ptrnNwProto ¡p' ) ¡ in ¡ ¡ let ¡nwTos ¡ := ¡ Wildcard_inter ¡Word8.eqdec ¡ ( ptrnNwTos ¡p ) ¡ ( ptrnNwTos ¡p' ) ¡ in ¡ ¡ let ¡tpSrc ¡ := ¡ Wildcard_inter ¡Word16.eqdec ¡ ( ptrnTpSrc ¡p ) ¡ ( ptrnTpSrc ¡p' ) ¡ in ¡ ¡ let ¡tpDst ¡ := ¡ Wildcard_inter ¡Word16.eqdec ¡ ( ptrnTpDst ¡p ) ¡ ( ptrnTpDst ¡p' ) ¡ in ¡ ¡ let ¡inPort ¡ := ¡ Wildcard_inter ¡Word16.eqdec ¡ ( ptrnInPort ¡p ) ¡ ( ptrnInPort ¡p' ) ¡ in ¡ ¡ ¡ ¡ MkPattern ¡dlSrc ¡dlDst ¡dlType ¡dlVlan ¡dlVlanPcp ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡nwSrc ¡nwDst ¡nwProto ¡nwTos ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡tpSrc ¡tpDst ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡inPort . Definition ¡exact_pattern ¡ ( pk ¡ : ¡ Packet) ¡ ( pt ¡ : ¡Word16. T) ¡ : ¡ Pattern ¡ := ¡ ¡ MkPattern ¡ ¡ ¡ ¡ (WildcardExact ¡ ( pktDlSrc ¡pk )) ¡ ¡ ¡ ¡ (WildcardExact ¡ ( pktDlDst ¡pk )) ¡ ¡ ¡ ¡ (WildcardExact ¡ ( pktDlTyp ¡pk )) ¡ ¡ ¡ ¡ (WildcardExact ¡ ( pktDlVlan ¡pk )) ¡ ¡ ¡ ¡ (WildcardExact ¡ ( pktDlVlanPcp ¡pk )) ¡ ¡ ¡ ¡ (WildcardExact ¡ ( pktNwSrc ¡pk )) ¡ ¡ ¡ ¡ (WildcardExact ¡ ( pktNwDst ¡pk )) ¡ ¡ ¡ ¡ (WildcardExact ¡ ( pktNwProto ¡pk )) ¡ ¡ ¡ ¡ (WildcardExact ¡ ( pktNwTos ¡pk )) ¡ ¡ ¡ ¡ (Wildcard_of_option ¡ ( pktTpSrc ¡pk )) ¡ ¡ ¡ ¡ (Wildcard_of_option ¡ ( pktTpDst ¡pk )) ¡ ¡ ¡ ¡ (WildcardExact ¡pt ). 20 Definition ¡match_packet ¡ ( pt ¡ : ¡Word16. T) ¡ ( pk ¡ : ¡ Packet) ¡ ( pat ¡ : ¡ Pattern) ¡ : ¡ bool ¡ := ¡ ¡negb ¡ (Pattern_is_empty ¡ (Pattern_inter ¡ ( exact_pattern ¡pk ¡pt ) ¡pat )).

  45. /* ¡Fields ¡to ¡match ¡against ¡flows ¡*/ Record ¡ Pattern ¡ : ¡ Type ¡ := ¡ MkPattern ¡ { struct ¡ofp_match ¡{ ¡ ¡dlSrc ¡ : ¡ Wildcard ¡ EthernetAddress; ¡ ¡ ¡ ¡uint32_t ¡wildcards; ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ /* ¡Wildcard ¡fields. ¡*/ ¡ ¡dlDst ¡ : ¡ Wildcard ¡ EthernetAddress; ¡ ¡ ¡ ¡uint16_t ¡in_port; ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡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 ¡ ¡ ¡ /* ¡IP ¡protocol ¡or ¡lower ¡8 ¡bits ¡of ¡ ¡tpDst ¡ : ¡ Wildcard ¡ TransportPort; ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ARP ¡opcode. ¡*/ ¡ ¡inPort ¡ : ¡ Wildcard ¡ Port ¡ ¡ ¡ ¡ uint8_t ¡pad2[2]; ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ /* ¡Align ¡to ¡64-­‑bits. ¡*/ }. ¡ ¡ ¡ ¡uint32_t ¡nw_src; ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ /* ¡IP ¡source ¡address. ¡*/ ¡ ¡ ¡ ¡uint32_t ¡nw_dst; ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ /* ¡IP ¡destination ¡address. ¡*/ ¡ ¡ ¡ ¡uint16_t ¡tp_src; ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ /* ¡TCP/UDP ¡source ¡port. ¡*/ ¡ ¡ ¡ ¡uint16_t ¡tp_dst; ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ /* ¡TCP/UDP ¡destination ¡port. ¡*/ }; OFP_ASSERT( sizeof ( struct ¡ofp_match) ¡ == ¡40); Definition ¡ Pattern_inter ¡ ( p ¡p' :Pattern) ¡ := detailed model of matching, forwarding, and flow table update ¡ ¡ let ¡dlSrc ¡ := ¡ Wildcard_inter ¡EthernetAddress.eqdec ¡ ( ptrnDlSrc ¡p ) ¡ ( ptrnDlSrc ¡p' ) ¡ in ¡ ¡ let ¡dlDst ¡ := ¡ Wildcard_inter ¡EthernetAddress.eqdec ¡ ( ptrnDlDst ¡p ) ¡ ( ptrnDlDst ¡p' ) ¡ in ¡ ¡ let ¡dlType ¡ := ¡ Wildcard_inter ¡Word16.eqdec ¡ ( ptrnDlType ¡p ) ¡ ( ptrnDlType ¡p' ) ¡ in ¡ ¡ let ¡dlVlan ¡ := ¡ Wildcard_inter ¡Word16.eqdec ¡ ( ptrnDlVlan ¡p ) ¡ ( ptrnDlVlan ¡p' ) ¡ in ¡ ¡ let ¡dlVlanPcp ¡ := ¡ Wildcard_inter ¡Word8.eqdec ¡ ( ptrnDlVlanPcp ¡p ) ¡ ( ptrnDlVlanPcp ¡p' ) ¡ in ¡ ¡ let ¡nwSrc ¡ := ¡ Wildcard_inter ¡Word32.eqdec ¡ ( ptrnNwSrc ¡p ) ¡ ( ptrnNwSrc ¡p' ) ¡ in ¡ ¡ let ¡nwDst ¡ := ¡ Wildcard_inter ¡Word32.eqdec ¡ ( ptrnNwDst ¡p ) ¡ ( ptrnNwDst ¡p' ) ¡ in ¡ ¡ let ¡nwProto ¡ := ¡ Wildcard_inter ¡Word8.eqdec ¡ ( ptrnNwProto ¡p ) ¡ ( ptrnNwProto ¡p' ) ¡ in ¡ ¡ let ¡nwTos ¡ := ¡ Wildcard_inter ¡Word8.eqdec ¡ ( ptrnNwTos ¡p ) ¡ ( ptrnNwTos ¡p' ) ¡ in ¡ ¡ let ¡tpSrc ¡ := ¡ Wildcard_inter ¡Word16.eqdec ¡ ( ptrnTpSrc ¡p ) ¡ ( ptrnTpSrc ¡p' ) ¡ in ¡ ¡ let ¡tpDst ¡ := ¡ Wildcard_inter ¡Word16.eqdec ¡ ( ptrnTpDst ¡p ) ¡ ( ptrnTpDst ¡p' ) ¡ in ¡ ¡ let ¡inPort ¡ := ¡ Wildcard_inter ¡Word16.eqdec ¡ ( ptrnInPort ¡p ) ¡ ( ptrnInPort ¡p' ) ¡ in ¡ ¡ ¡ ¡ MkPattern ¡dlSrc ¡dlDst ¡dlType ¡dlVlan ¡dlVlanPcp ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡nwSrc ¡nwDst ¡nwProto ¡nwTos ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡tpSrc ¡tpDst ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡inPort . Definition ¡exact_pattern ¡ ( pk ¡ : ¡ Packet) ¡ ( pt ¡ : ¡Word16. T) ¡ : ¡ Pattern ¡ := ¡ ¡ MkPattern ¡ ¡ ¡ ¡ (WildcardExact ¡ ( pktDlSrc ¡pk )) ¡ ¡ ¡ ¡ (WildcardExact ¡ ( pktDlDst ¡pk )) ¡ ¡ ¡ ¡ (WildcardExact ¡ ( pktDlTyp ¡pk )) ¡ ¡ ¡ ¡ (WildcardExact ¡ ( pktDlVlan ¡pk )) ¡ ¡ ¡ ¡ (WildcardExact ¡ ( pktDlVlanPcp ¡pk )) ¡ ¡ ¡ ¡ (WildcardExact ¡ ( pktNwSrc ¡pk )) ¡ ¡ ¡ ¡ (WildcardExact ¡ ( pktNwDst ¡pk )) ¡ ¡ ¡ ¡ (WildcardExact ¡ ( pktNwProto ¡pk )) ¡ ¡ ¡ ¡ (WildcardExact ¡ ( pktNwTos ¡pk )) ¡ ¡ ¡ ¡ (Wildcard_of_option ¡ ( pktTpSrc ¡pk )) ¡ ¡ ¡ ¡ (Wildcard_of_option ¡ ( pktTpDst ¡pk )) ¡ ¡ ¡ ¡ (WildcardExact ¡pt ). 20 Definition ¡match_packet ¡ ( pt ¡ : ¡Word16. T) ¡ ( pk ¡ : ¡ Packet) ¡ ( pat ¡ : ¡ Pattern) ¡ : ¡ bool ¡ := ¡ ¡negb ¡ (Pattern_is_empty ¡ (Pattern_inter ¡ ( exact_pattern ¡pk ¡pt ) ¡pat )).

  46. “In the absence of barrier messages, switches may arbitrarily reorder messages to maximize performance.” “There is no packet output ordering guaranteed within a port.” 21

  47. “In the absence of barrier messages, switches may arbitrarily reorder messages to maximize performance.” “There is no packet output ordering guaranteed within a port.” ¡ ¡ Definition ¡ InBuf ¡ := ¡ MultiSet ¡Packet. ¡ ¡ Definition ¡ OutBuf ¡ := ¡ MultiSet ¡Packet. ¡ ¡ Definition ¡ OFInBuf ¡ := ¡ MultiSet ¡SwitchMsg. ¡ ¡ Definition ¡ OFOutBuf ¡ := ¡ MultiSet ¡CtrlMsg. 21

  48. “In the absence of barrier messages, switches may arbitrarily reorder messages to maximize performance.” “There is no packet output ordering guaranteed within a port.” essential asynchrony: packet buffers, message reordering, and barriers ¡ ¡ Definition ¡ InBuf ¡ := ¡ MultiSet ¡Packet. ¡ ¡ Definition ¡ OutBuf ¡ := ¡ MultiSet ¡Packet. ¡ ¡ Definition ¡ OFInBuf ¡ := ¡ MultiSet ¡SwitchMsg. ¡ ¡ Definition ¡ OFOutBuf ¡ := ¡ MultiSet ¡CtrlMsg. 21

  49. State : abstract type f out : State → Switch ⨉ CtrlMsg ⨉ State' f in : Switch ⨉ SwitchMsg ⨉ State → State’ controller model: fully abstract 22

  50. Featherweight OpenFlow detailed model of matching, forwarding, and flow table update essential asynchrony: packet buffers, message reordering, and barriers controller model: fully abstract 23

  51. Featherweight OpenFlow detailed model of matching, forwarding, and flow table update essential asynchrony: packet buffers, message reordering, and barriers controller model: fully abstract Only possible because the specification is simple and open 23

  52. Featherweight OpenFlow detailed model of matching, forwarding, and flow table update essential asynchrony: packet buffers, message reordering, and barriers controller model: fully abstract Only possible because the specification is simple and open Future Work: counters and failures Intentionally Omitted serializing OpenFlow messages 23

  53. A Verified Controller 24

  54. Desired Policy: Block SSH traffic Forward other traffic normally Log Web requests Host 1 Port 1 Port 3 Port 2 Web Request Logger Host 2 25

  55. Desired Policy: Block SSH traffic Forward other traffic normally Log Web requests Host 1 Desired Flow Table: dstPort: ¡22 [] dstIP: ¡H1, ¡dstPort: ¡80 Fwd ¡1, ¡Fwd ¡3 dstIP: ¡H2, ¡dstPort: ¡80 Fwd ¡2, ¡Fwd ¡3 dstIP: ¡H1 Fwd ¡1 Port 1 dstIP: ¡H2 Fwd ¡2 Port 3 Port 2 Web Request Logger Host 2 25

  56. Desired Policy: Block SSH traffic Forward other traffic normally Log Web requests Host 1 Desired Flow Table: dstPort: ¡22 [] dstIP: ¡H1, ¡dstPort: ¡80 Fwd ¡1, ¡Fwd ¡3 dstIP: ¡H2, ¡dstPort: ¡80 Fwd ¡2, ¡Fwd ¡3 dstIP: ¡H1 Fwd ¡1 Port 1 dstIP: ¡H2 Fwd ¡2 Port 3 Port 2 Web Request Logger Actual Controller ... def ¡switch_join(sw): ¡ ¡sw.flow_mod(10, ¡{ ¡eth: ¡0x800, ¡proto: ¡6, ¡dstPort: ¡22 ¡}, ¡[]) ¡ ¡sw.barrier_request() ¡ ¡sw.flow_mod(9, ¡{ ¡eth: ¡0x800, ¡proto: ¡6, ¡dstIP: ¡H1, ¡dstPort: ¡80 ¡}, ¡[Fwd ¡1, ¡Fwd ¡3]) ¡ ¡sw.barrier_request() ¡ ¡sw.flow_mod(9, ¡{ ¡eth: ¡0x800, ¡proto: ¡6, ¡dstIP: ¡H2, ¡dstPort: ¡80 ¡}, ¡[Fwd ¡2, ¡Fwd ¡3]) ¡ ¡sw.barrier_request() ¡ ¡sw.flow_mod(8, ¡{ ¡eth: ¡0x800, ¡dstIP: ¡H1 ¡}, ¡[Fwd ¡1]) ¡ ¡sw.barrier_request() ¡ ¡sw.flow_mod(8, ¡{ ¡eth: ¡0x800, ¡dstIP: ¡H2 ¡}, ¡[Fwd ¡2]) Host 2 def ¡packet_in(sw, ¡pkt): ¡ ¡actions ¡= ¡[] ¡ ¡if ¡pkt.dstPort ¡== ¡22: ¡ ¡ ¡ ¡return ¡ ¡if ¡pkt.dstPort ¡== ¡80: ¡ ¡ ¡ ¡actions ¡= ¡actions ¡+ ¡[Fwd ¡3] ¡ ¡if ¡pkt.dstIP ¡== ¡H1: ¡ ¡ ¡ ¡actions ¡= ¡actions ¡+ ¡[Fwd ¡1] ¡ ¡if ¡pkt.dstIP ¡== ¡H2: ¡ ¡ ¡ ¡actions ¡= ¡actions ¡+ ¡[Fwd ¡2] 25 ¡ ¡sw.packet_out(pkt, ¡actions)

  57. Desired Policy: Block SSH traffic Forward other traffic normally Log Web requests Host 1 Desired Flow Table: dstPort: ¡22 [] dstIP: ¡H1, ¡dstPort: ¡80 Fwd ¡1, ¡Fwd ¡3 dstIP: ¡H2, ¡dstPort: ¡80 Fwd ¡2, ¡Fwd ¡3 dstIP: ¡H1 Fwd ¡1 Port 1 dstIP: ¡H2 Fwd ¡2 Port 3 Port 2 Web Request Logger Actual Controller ... def ¡switch_join(sw): ¡ ¡sw.flow_mod(10, ¡{ ¡eth: ¡0x800, ¡proto: ¡6, ¡dstPort: ¡22 ¡}, ¡[]) ¡ ¡sw.barrier_request() ¡ ¡sw.flow_mod(9, ¡{ ¡eth: ¡0x800, ¡proto: ¡6, ¡dstIP: ¡H1, ¡dstPort: ¡80 ¡}, ¡[Fwd ¡1, ¡Fwd ¡3]) ¡ ¡sw.barrier_request() ¡ ¡sw.flow_mod(9, ¡{ ¡eth: ¡0x800, ¡proto: ¡6, ¡dstIP: ¡H2, ¡dstPort: ¡80 ¡}, ¡[Fwd ¡2, ¡Fwd ¡3]) ¡ ¡sw.barrier_request() ¡ ¡sw.flow_mod(8, ¡{ ¡eth: ¡0x800, ¡dstIP: ¡H1 ¡}, ¡[Fwd ¡1]) ¡ ¡sw.barrier_request() Barriers ¡ ¡sw.flow_mod(8, ¡{ ¡eth: ¡0x800, ¡dstIP: ¡H2 ¡}, ¡[Fwd ¡2]) Host 2 packet_in handler def ¡packet_in(sw, ¡pkt): ¡ ¡actions ¡= ¡[] ¡ ¡if ¡pkt.dstPort ¡== ¡22: Frame type / protocol numbers ¡ ¡ ¡ ¡return ¡ ¡if ¡pkt.dstPort ¡== ¡80: ¡ ¡ ¡ ¡actions ¡= ¡actions ¡+ ¡[Fwd ¡3] ¡ ¡if ¡pkt.dstIP ¡== ¡H1: ¡ ¡ ¡ ¡actions ¡= ¡actions ¡+ ¡[Fwd ¡1] ¡ ¡if ¡pkt.dstIP ¡== ¡H2: ¡ ¡ ¡ ¡actions ¡= ¡actions ¡+ ¡[Fwd ¡2] 25 ¡ ¡sw.packet_out(pkt, ¡actions)

  58. Desired Policy: Block SSH traffic Forward other traffic normally Log Web requests Desired Flow Table: dstPort: ¡22 [] dstIP: ¡H1, ¡dstPort: ¡80 Fwd ¡1, ¡Fwd ¡3 dstIP: ¡H2, ¡dstPort: ¡80 Fwd ¡2, ¡Fwd ¡3 dstIP: ¡H1 Fwd ¡1 dstIP: ¡H2 Fwd ¡2 Actual Controller ... def ¡switch_join(sw): ¡ ¡sw.flow_mod(10, ¡{ ¡eth: ¡0x800, ¡proto: ¡6, ¡dstPort: ¡22 ¡}, ¡[]) ¡ ¡sw.barrier_request() ¡ ¡sw.flow_mod(9, ¡{ ¡eth: ¡0x800, ¡proto: ¡6, ¡dstIP: ¡H1, ¡dstPort: ¡80 ¡}, ¡[Fwd ¡1, ¡Fwd ¡3]) ¡ ¡sw.barrier_request() ¡ ¡sw.flow_mod(9, ¡{ ¡eth: ¡0x800, ¡proto: ¡6, ¡dstIP: ¡H2, ¡dstPort: ¡80 ¡}, ¡[Fwd ¡2, ¡Fwd ¡3]) ¡ ¡sw.barrier_request() ¡ ¡sw.flow_mod(8, ¡{ ¡eth: ¡0x800, ¡dstIP: ¡H1 ¡}, ¡[Fwd ¡1]) ¡ ¡sw.barrier_request() ¡ ¡sw.flow_mod(8, ¡{ ¡eth: ¡0x800, ¡dstIP: ¡H2 ¡}, ¡[Fwd ¡2]) def ¡packet_in(sw, ¡pkt): ¡ ¡actions ¡= ¡[] ¡ ¡if ¡pkt.dstPort ¡== ¡22: ¡ ¡ ¡ ¡return ¡ ¡if ¡pkt.dstPort ¡== ¡80: ¡ ¡ ¡ ¡actions ¡= ¡actions ¡+ ¡[Fwd ¡3] ¡ ¡if ¡pkt.dstIP ¡== ¡H1: ¡ ¡ ¡ ¡actions ¡= ¡actions ¡+ ¡[Fwd ¡1] ¡ ¡if ¡pkt.dstIP ¡== ¡H2: ¡ ¡ ¡ ¡actions ¡= ¡actions ¡+ ¡[Fwd ¡2] 26 ¡ ¡sw.packet_out(pkt, ¡actions)

  59. Desired Policy: Block SSH traffic Forward other traffic normally Log Web requests Desired Flow Table: dstPort: ¡22 [] dstIP: ¡H1, ¡dstPort: ¡80 Fwd ¡1, ¡Fwd ¡3 written by OpenFlow programmer dstIP: ¡H2, ¡dstPort: ¡80 Fwd ¡2, ¡Fwd ¡3 dstIP: ¡H1 Fwd ¡1 dstIP: ¡H2 Fwd ¡2 Actual Controller ... def ¡switch_join(sw): ¡ ¡sw.flow_mod(10, ¡{ ¡eth: ¡0x800, ¡proto: ¡6, ¡dstPort: ¡22 ¡}, ¡[]) ¡ ¡sw.barrier_request() ¡ ¡sw.flow_mod(9, ¡{ ¡eth: ¡0x800, ¡proto: ¡6, ¡dstIP: ¡H1, ¡dstPort: ¡80 ¡}, ¡[Fwd ¡1, ¡Fwd ¡3]) ¡ ¡sw.barrier_request() ¡ ¡sw.flow_mod(9, ¡{ ¡eth: ¡0x800, ¡proto: ¡6, ¡dstIP: ¡H2, ¡dstPort: ¡80 ¡}, ¡[Fwd ¡2, ¡Fwd ¡3]) ¡ ¡sw.barrier_request() ¡ ¡sw.flow_mod(8, ¡{ ¡eth: ¡0x800, ¡dstIP: ¡H1 ¡}, ¡[Fwd ¡1]) ¡ ¡sw.barrier_request() ¡ ¡sw.flow_mod(8, ¡{ ¡eth: ¡0x800, ¡dstIP: ¡H2 ¡}, ¡[Fwd ¡2]) def ¡packet_in(sw, ¡pkt): ¡ ¡actions ¡= ¡[] ¡ ¡if ¡pkt.dstPort ¡== ¡22: ¡ ¡ ¡ ¡return ¡ ¡if ¡pkt.dstPort ¡== ¡80: ¡ ¡ ¡ ¡actions ¡= ¡actions ¡+ ¡[Fwd ¡3] ¡ ¡if ¡pkt.dstIP ¡== ¡H1: ¡ ¡ ¡ ¡actions ¡= ¡actions ¡+ ¡[Fwd ¡1] ¡ ¡if ¡pkt.dstIP ¡== ¡H2: ¡ ¡ ¡ ¡actions ¡= ¡actions ¡+ ¡[Fwd ¡2] 26 ¡ ¡sw.packet_out(pkt, ¡actions)

  60. Desired Policy: Block SSH traffic Forward other traffic normally Log Web requests Desired Flow Table: dstPort: ¡22 [] dstIP: ¡H1, ¡dstPort: ¡80 Fwd ¡1, ¡Fwd ¡3 written by OpenFlow programmer dstIP: ¡H2, ¡dstPort: ¡80 Fwd ¡2, ¡Fwd ¡3 dstIP: ¡H1 Fwd ¡1 dstIP: ¡H2 Fwd ¡2 inserted by controller Actual Controller ... def ¡switch_join(sw): ¡ ¡sw.flow_mod(10, ¡{ ¡eth: ¡0x800, ¡proto: ¡6, ¡dstPort: ¡22 ¡}, ¡[]) ¡ ¡sw.barrier_request() ¡ ¡sw.flow_mod(9, ¡{ ¡eth: ¡0x800, ¡proto: ¡6, ¡dstIP: ¡H1, ¡dstPort: ¡80 ¡}, ¡[Fwd ¡1, ¡Fwd ¡3]) ¡ ¡sw.barrier_request() ¡ ¡sw.flow_mod(9, ¡{ ¡eth: ¡0x800, ¡proto: ¡6, ¡dstIP: ¡H2, ¡dstPort: ¡80 ¡}, ¡[Fwd ¡2, ¡Fwd ¡3]) ¡ ¡sw.barrier_request() ¡ ¡sw.flow_mod(8, ¡{ ¡eth: ¡0x800, ¡dstIP: ¡H1 ¡}, ¡[Fwd ¡1]) ¡ ¡sw.barrier_request() ¡ ¡sw.flow_mod(8, ¡{ ¡eth: ¡0x800, ¡dstIP: ¡H2 ¡}, ¡[Fwd ¡2]) def ¡packet_in(sw, ¡pkt): ¡ ¡actions ¡= ¡[] ¡ ¡if ¡pkt.dstPort ¡== ¡22: ¡ ¡ ¡ ¡return ¡ ¡if ¡pkt.dstPort ¡== ¡80: ¡ ¡ ¡ ¡actions ¡= ¡actions ¡+ ¡[Fwd ¡3] ¡ ¡if ¡pkt.dstIP ¡== ¡H1: ¡ ¡ ¡ ¡actions ¡= ¡actions ¡+ ¡[Fwd ¡1] ¡ ¡if ¡pkt.dstIP ¡== ¡H2: ¡ ¡ ¡ ¡actions ¡= ¡actions ¡+ ¡[Fwd ¡2] 26 ¡ ¡sw.packet_out(pkt, ¡actions)

  61. Desired Policy: Block SSH traffic Forward other traffic normally Log Web requests Desired Flow Table: dstPort: ¡22 [] dstIP: ¡H1, ¡dstPort: ¡80 Fwd ¡1, ¡Fwd ¡3 written by OpenFlow programmer dstIP: ¡H2, ¡dstPort: ¡80 Fwd ¡2, ¡Fwd ¡3 dstIP: ¡H1 Fwd ¡1 dstIP: ¡H2 Fwd ¡2 inserted by controller Actual Controller ... def ¡switch_join(sw): ¡ ¡sw.flow_mod(10, ¡{ ¡eth: ¡0x800, ¡proto: ¡6, ¡dstPort: ¡22 ¡}, ¡[]) ¡ ¡sw.barrier_request() formally verified ¡ ¡sw.flow_mod(9, ¡{ ¡eth: ¡0x800, ¡proto: ¡6, ¡dstIP: ¡H1, ¡dstPort: ¡80 ¡}, ¡[Fwd ¡1, ¡Fwd ¡3]) ¡ ¡sw.barrier_request() ¡ ¡sw.flow_mod(9, ¡{ ¡eth: ¡0x800, ¡proto: ¡6, ¡dstIP: ¡H2, ¡dstPort: ¡80 ¡}, ¡[Fwd ¡2, ¡Fwd ¡3]) ¡ ¡sw.barrier_request() ¡ ¡sw.flow_mod(8, ¡{ ¡eth: ¡0x800, ¡dstIP: ¡H1 ¡}, ¡[Fwd ¡1]) Barriers ¡ ¡sw.barrier_request() ¡ ¡sw.flow_mod(8, ¡{ ¡eth: ¡0x800, ¡dstIP: ¡H2 ¡}, ¡[Fwd ¡2]) packet_in handler def ¡packet_in(sw, ¡pkt): ¡ ¡actions ¡= ¡[] Frame type / protocol numbers ¡ ¡if ¡pkt.dstPort ¡== ¡22: ¡ ¡ ¡ ¡return transparent optimizations ¡ ¡if ¡pkt.dstPort ¡== ¡80: ¡ ¡ ¡ ¡actions ¡= ¡actions ¡+ ¡[Fwd ¡3] ¡ ¡if ¡pkt.dstIP ¡== ¡H1: ¡ ¡ ¡ ¡actions ¡= ¡actions ¡+ ¡[Fwd ¡1] ¡ ¡if ¡pkt.dstIP ¡== ¡H2: ¡ ¡ ¡ ¡actions ¡= ¡actions ¡+ ¡[Fwd ¡2] 26 ¡ ¡sw.packet_out(pkt, ¡actions)

  62. verified code serialization and physical network 27

  63. Flow Table verified code serialization and physical network 27

  64. Flow Table Optimize Smaller Flow Table verified code serialization and physical network 27

  65. Flow Table Optimize Smaller Flow Table Runtime System OpenFlow Messages verified code serialization and physical network 27

  66. Flow Table Optimize Smaller Flow Table Runtime System OpenFlow Messages verified code Serialize serialization and physical network Nettle 27

  67. Bisimulation abstract model actual OpenFlow network Controller 28

  68. Bisimulation abstract model actual OpenFlow network Controller 28

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