290 likes | 372 Views
Formal checkings in networks. James Hongyi Zeng with Peyman Kazemian , George Varghese , Nick McKeown. Software Defined Network (SDN). Control Programs. Control Programs. Control Programs. Abstract Network View. 1. <Match, Action> <Match, Action> <Match, Action>
E N D
Formal checkings in networks James HongyiZeng with PeymanKazemian, George Varghese, Nick McKeown
Software Defined Network (SDN) Control Programs Control Programs Control Programs Abstract Network View 1 • <Match, Action> • <Match, Action> • <Match, Action> • <Match, Action> • <Match, Action> • … • … Network Virtualization 2 Global Network View Network OS • <Match, Action> • <Match, Action> • <Match, Action> • <Match, Action> • <Match, Action> • … • … • <Match, Action> • <Match, Action> • <Match, Action> • <Match, Action> • <Match, Action> • … • … Packet Forwarding Packet Forwarding 3 • <Match, Action> • <Match, Action> • <Match, Action> • <Match, Action> • <Match, Action> • … • … • <Match, Action> • <Match, Action> • <Match, Action> • <Match, Action> • <Match, Action> • … • … Packet Forwarding Packet Forwarding • <Match, Action> • <Match, Action> • <Match, Action> • <Match, Action> • <Match, Action> • … • … Packet Forwarding
“S” for Software • Static Checking (“compile time”)“Is my configuration correct?” • Dynamic checking (“run time”)“Is my data plane behaving correctly?” Policy/Control SW Configuration Data plane
With SDN we will: • Formally verify that our networks are behaving correctly. • Identify faults, then systematically track down their root cause.
Motivations In today’s networks, simple questions are hard to answer: • Can host A talk to host B? • What are all the packet headers from A that can reach B? • Are there any loops in the network? • Is Group X provably isolated from Group Y? • What happens if I remove a line in the config file?
Software Defined Network (SDN) Control Programs Control Programs Control Programs Policy “A can talk to B” “Guests can’t reach PatientRecords” Abstract Network View Network Virtualization Static Checker Global Network View Network OS • <Match, Action> • <Match, Action> • <Match, Action> • <Match, Action> • <Match, Action> • … • … • <Match, Action> • <Match, Action> • <Match, Action> • <Match, Action> • <Match, Action> • … • … • <Match, Action> • <Match, Action> • <Match, Action> • <Match, Action> • <Match, Action> • … • … • <Match, Action> • <Match, Action> • <Match, Action> • <Match, Action> • <Match, Action> • … • … • <Match, Action> • <Match, Action> • <Match, Action> • <Match, Action> • <Match, Action> • … • … • <Match, Action> • <Match, Action> • <Match, Action> • <Match, Action> • <Match, Action> • … • … • <Match, Action> • <Match, Action> • <Match, Action> • <Match, Action> • <Match, Action> • … • … • <Match, Action> • <Match, Action> • <Match, Action> • <Match, Action> • <Match, Action> • … • … Packet Forwarding Packet Forwarding • <Match, Action> • <Match, Action> • <Match, Action> • <Match, Action> • <Match, Action> • … • … • <Match, Action> • <Match, Action> • <Match, Action> • <Match, Action> • <Match, Action> • … • … • <Match, Action> • <Match, Action> • <Match, Action> • <Match, Action> • <Match, Action> • … • … • <Match, Action> • <Match, Action> • <Match, Action> • <Match, Action> • <Match, Action> • … • … Packet Forwarding Packet Forwarding • <Match, Action> • <Match, Action> • <Match, Action> • <Match, Action> • <Match, Action> • … • … • <Match, Action> • <Match, Action> • <Match, Action> • <Match, Action> • <Match, Action> • … • … Packet Forwarding
Header Space Analysis 2 3 1 A B 4 1 2 3 Port ID 4
Header Space Analysis 2 3 1 A B 4 1 2 3 Port ID 4
Can A talk to B? 2 3 1 A B 4 1 2 3 Port ID 4
Header Space Analysis Consequences • Finds all packets from A that can reach B • Find loops, regardless of protocol or layer • Can prove that two groups are isolated • Protocol Independent Proves if network adheres to policy Works on existing networks and SDNs
Stanford Backbone 750,000 IP forwarding rules. 1,500 ACL rules. 100 VLANs. • DST IP: 172.26.66.96/28, VLAN: 330 • DST IP: 171.64.2.128/27, VLAN: 206 • DST IP: 172.20.10.64/27, VLAN: 10 • DST IP: 172.24.2.128/27, VLAN: 206 • DST IP: 172.26.4.80/29, VLAN: 206 • DST IP: 172.26.4.88/29, VLAN: 208 • IP Protocol: TCP • DST IP: 171.64.2.24 • SRC IP: 172.28.148.27 • VLAN: 206 • . • . • . • 40) IP Protocol: UDP • UDP DST Port: 514 A B
Tool Hassel • Reads Cisco IOS Configuration • Checks reachability, loops and isolation • 10 mins for Stanford Backbone to check loops • Easily made parallel: 1 sec is feasible Hassel is available for free, for you to run https://bitbucket.org/peymank/hassel-public/
Motivations Configurations might correctly reflect the policy, but…hardware might not follow configurations • Hardware errors (e.g. memory or ASIC errors) • Link failure • Congestion • Table overflow • Intermittent problems Such errors cannot be detected by static checking. Need a independent checker to test the data plane
Software Defined Network (SDN) Control Programs Control Programs Control Programs Abstract Network View Network Virtualization Global Network View Network OS • <Match, Action> • <Match, Action> • <Match, Action> • <Match, Action> • <Match, Action> • … • … Packet Forwarding • <Match, Action> • <Match, Action> • <Match, Action> • <Match, Action> • <Match, Action> • … • … Packet Forwarding B A • <Match, Action> • <Match, Action> • <Match, Action> • <Match, Action> • <Match, Action> • … • … Packet Forwarding • <Match, Action> • <Match, Action> • <Match, Action> • <Match, Action> • <Match, Action> • … • … Packet Forwarding • <Match, Action> • <Match, Action> • <Match, Action> • <Match, Action> • <Match, Action> • … • … Packet Forwarding
Testing the network • Monitor the network by sending test packets • Locate the faults with test results Not a new idea… • Network admins already use ping/traceroute to test the network • Ad-hoc test case generation • Coarse granularity / Low coverage • Lacks fault localization
What is the minimum number of test packets to Test every rule in every table? Isolate any fault?
Automatic Test Packet Generation A B Test Packets
How many packets needed? Stanford Backbone • 16 routers • 4,000 packets (vs. 750,000 rules) Internet2 • 9 routers • 30,000 packets (vs. 100,000 IPv4 rules) Testing 10x per second, requires <1% of link-rate
Fault Localization • Given: a set of pass/fail results • Output: the minimum set of (potential) faulty rules Demo
What’s next • Automatic performance testing Example Application mapped to a congested router queue Automatic Test Packet Generation will • Identify the queue • Determine which headers (applications) incur poor performance
“S” for software • Static Checking (“compile time”)“Is my configuration correct?” • Dynamic checking (“run time”)“Is my data plane behaving correctly?” Policy/Control SW Configuration Data plane
With SDN we will: • Formally verify that our networks are behaving correctly. • Identify faults, then systematically track down their root cause.