H EADER S PACE A NALYSIS : S TATIC C HECKING F OR N ETWORKS Peyman Kazemian (Stanford University) George Varghese (UCSD, Yahoo Labs) Nick McKeown (Stanford.

Slides:



Advertisements
Similar presentations
Logically Centralized Control Class 2. Types of Networks ISP Networks – Entity only owns the switches – Throughput: 100GB-10TB – Heterogeneous devices:
Advertisements

Models and techniques for verification of Software Defined Networks
Programming Protocol-Independent Packet Processors
Delivery and Forwarding of
Cs/ee 143 Communication Networks Chapter 6 Internetworking Text: Walrand & Parekh, 2010 Steven Low CMS, EE, Caltech.
© 2009 Cisco Systems, Inc. All rights reserved. SWITCH v1.0—4-1 Implementing Inter-VLAN Routing Deploying Multilayer Switching with Cisco Express Forwarding.
Can the Production Network Be the Testbed? Rob Sherwood Deutsche Telekom Inc. R&D Lab Glen Gibb, KK Yap, Guido Appenzeller, Martin Cassado, Nick McKeown,
Header Space Analysis: Static Checking For Networks Peyman Kazemian, Nick McKeown (Stanford University) and George Varghese (UCSD and Yahoo Labs). Presented.
© 2012 Cisco and/or its affiliates. All rights reserved. 1 CCNA Security 1.1 Instructional Resource Chapter 4 – Implementing Firewall Technologies.
Shivkumar Kalyanaraman Rensselaer Polytechnic Institute 1 ECSE-6961:Internet Protocols Quiz 1: Solutions Time: 60 min (strictly enforced) Points: 50 YOUR.
Can the Production Network Be the Testbed? Rob Sherwood Deutsche Telekom Inc. R&D Lab Glen Gibb, KK Yap, Guido Appenzeller, Martin Cassado, Nick McKeown,
Data Plane Verification. Background: What are network policies Alice can talk to Bob Skype traffic must go through a VoIP transcoder All traffic must.
1 25\10\2010 Unit-V Connecting LANs Unit – 5 Connecting DevicesConnecting Devices Backbone NetworksBackbone Networks Virtual LANsVirtual LANs.
OpenFlow Switch Limitations. Background: Current Applications Traffic Engineering application (performance) – Fine grained rules and short time scales.
Computer Networks Layering and Routing Dina Katabi
Connecting LANs, Backbone Networks, and Virtual LANs
Formal checkings in networks James Hongyi Zeng with Peyman Kazemian, George Varghese, Nick McKeown.
Guide to TCP/IP, Third Edition
How SDN will shape networking
1 Internet Protocol: Forwarding IP Datagrams Chapter 7.
InterVLAN Routing Design and Implementation. What Routers Do Intelligent, dynamic routing protocols for packet transport Packet filtering capabilities.
Information-Centric Networks10b-1 Week 13 / Paper 1 OpenFlow: enabling innovation in campus networks –Nick McKeown, Tom Anderson, Hari Balakrishnan, Guru.
Chapter 4: Managing LAN Traffic
OpenFlow: Enabling Technology Transfer to Networking Industry Nikhil Handigol Nikhil Handigol Cisco Nerd.
Cross-Domain Privacy-Preserving Cooperative Firewall Optimization.
Software Defined-Networking. Network Policies Access control: reachability – Alice can not send packets to Bob Application classification – Place video.
VeriFlow: Verifying Network-Wide Invariants in Real Time
CS : Software Defined Networks 3rd Lecture 28/3/2013
Implementing IP Addressing Services Accessing the WAN – Chapter 7.
Router and Routing Basics
CMPT 471 Networking II Address Resolution IPv4 ARP RARP 1© Janice Regan, 2012.
Network Verification Star Wars amd The Empire Strikes Back.
The Routing Table Last Update Copyright Kenneth M. Chipps Ph.D.
© 2006 Cisco Systems, Inc. All rights reserved.Cisco Public 1 Version 4.0 Access Control Lists Accessing the WAN – Chapter 5.
Page 1 Chapter 11 CCNA2 Chapter 11 Access Control Lists : Creating ACLs, using Wildcard Mask Bits, Standard and Extended ACLs.
Network Security Chapter 11 powered by DJ 1. Chapter Objectives  Describe today's increasing network security threats and explain the need to implement.
1 An Error Reporting Mechanism (ICMP). 2 IP Semantics IP is best-effort Datagrams can be –Lost –Delayed –Duplicated –Delivered out of order –Corrupted.
1 Chapter 23 Internetworking Part 3 (Control Messages, Error Handling, ICMP)
Basic Routing Principles V1.2. Objectives Understand the function of router Know the basic conception in routing Know the working principle of router.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Connecting Devices CORPORATE INSTITUTE OF SCIENCE & TECHNOLOGY, BHOPAL Department of Electronics and.
70-293: MCSE Guide to Planning a Microsoft Windows Server 2003 Network, Enhanced Chapter 4: Planning and Configuring Routing and Switching.
1 12-Jan-16 OSI network layer CCNA Exploration Semester 1 Chapter 5.
Information-Centric Networks Section # 13.2: Alternatives Instructor: George Xylomenos Department: Informatics.
OpenFlow MPLS and the Open Source Label Switched Router Department of Computer Science and Information Engineering, National Cheng Kung University, Tainan,
Cisco Confidential © 2013 Cisco and/or its affiliates. All rights reserved. 1 Cisco Networking Training (CCENT/CCT/CCNA R&S) Rick Rowe Ron Giannetti.
Firewalls A brief introduction to firewalls. What does a Firewall do? Firewalls are essential tools in managing and controlling network traffic Firewalls.
Header Space Analysis: Static Checking for Networks Broadband Network Technology Integrated M.S. and Ph.D. Eun-Do Kim Network Standards Research Section.
Chapter 20 Network Layer: Internet Protocol Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
CCIE Security written (Version 4.0) PDF Question Answer Cisco
By: Yaron Levy Supervisors: Dr. Shlomo Greenberg Mr. Hagai David.
© 2006 Cisco Systems, Inc. All rights reserved.Cisco Public 1 OSI network layer CCNA Exploration Semester 1 – Chapter 5.
Quality and Value for the Exam 100% Guarantee to Pass Your Exam Based on Real Exams Scenarios Verified Answers Researched by Industry.
InterVLAN Routing 1. InterVLAN Routing 2. Multilayer Switching.
Now you don’t need to take any stress about the Cisco Exam
Multi Node Label Routing – A layer 2.5 routing protocol
Instructor Materials Chapter 7: Access Control Lists
Connecting Devices LANs or WANs do not normally operate in isolation. They are connected to one another or to the Internet. To connect LANs or WANs, we.
6.888 Lecture 16: Header Space Analysis
April 28, 2017 SUMIT MAHESHWARI INES UGALDE
Chapter 6 Delivery & Forwarding of IP Packets
Chapter 6: Network Layer
2018 Valid Cisco Exam Dumps IT-Dumps
The Stanford Clean Slate Program
Internet Protocol Version4
Access Control Lists CCNA 2 v3 – Module 11
CSE 313 Data Communication
Lecture 10, Computer Networks (198:552)
With slides from Ahmed Khurshid
Control-Data Plane Separation
Chapter 4: outline 4.1 Overview of Network layer data plane
Presentation transcript:

H EADER S PACE A NALYSIS : S TATIC C HECKING F OR N ETWORKS Peyman Kazemian (Stanford University) George Varghese (UCSD, Yahoo Labs) Nick McKeown (Stanford University) November 7 th, 2012 IRTF 1

M OTIVATION It is hard to understand and reason about end- to-end behavior of networks: Can host A talk to host B? What are all the packet headers from A that can reach B? Are there any loops or black holes in the network? Is Slice X isolated totally from Slice Y? What will happen if I remove an entry from a router? 2

M OTIVATION There are two reason for this complexity: Networks are getting larger. Network functionality becoming more complex. Firewalls, ACLs and deep packet inspection MBs. VLAN and inter-VLAN routing. Encapsulation (MPLS, GRE). ToS-based routing. nondeterministic routing. 3 Access Internet Transport Application

L OOKING AT THE OTHER FIELDS Communication Systems: 4 S S D D Frequency Modulatio n Frequency Modulatio n Amplifier Antenna De- Modulatio n De- Modulatio n Antenna Band Pass Filter Cos(wt)

H EADER S PACE A NALYSIS A simple abstraction to model all kinds of forwarding functionalities regardless of specific protocols and implementations. 5

H EADER S PACE F RAMEWORK S IMPLE O BSERVATION : A PACKET IS A POINT IN THE SPACE OF POSSIBLE HEADERS AND A BOX IS A TRANSFORMER ON THAT SPACE. 6

H EADER S PACE F RAMEWORK Step 1 - Model packet header as a point in {0,1} L space – The Header Space …1 L Header Data 0xxxx0101xxx

H EADER S PACE F RAMEWORK Step 2 – Model all networking boxes as transformer of header space 8 Packet Forwarding Packet Forwarding xx1..x1 Match + Send to port 3 Rewrite with 1xx011..x1 Send to port 3 Rewrite with 1xx011..x1 Action 11xx..0x + Send to port 2 Rewrite with 1x01xx..x1 Send to port 2 Rewrite with 1x01xx..x Transfer Function: Transfer Function:

H EADER S PACE F RAMEWORK Example: Transfer Function of an IPv4 Router Port Port Port (h,1)if dst_ip(h) = x (h,2)if dst_ip(h) = x (h,3)if dst_ip(h) = x.x T(h, p) =

H EADER S PACE F RAMEWORK Example: Transfer Function of an IPv4 Router Port Port Port (dec_ttl(h),1)if dst_ip(h) = x (dec_ttl(h),2)if dst_ip(h) = x (dec_ttl(h),3)if dst_ip(h) = x.x T(h, p) =

H EADER S PACE F RAMEWORK Example: Transfer Function of an IPv4 Router Port Port Port (rw_mac(dec_ttl(h),next_mac), 1)if dst_ip(h) = x (rw_mac(dec_ttl(h),next_mac), 2)if dst_ip(h) = x (rw_mac(dec_ttl(h),next_mac), 3)if dst_ip(h) = x.x T(h, p) =

E XAMPLE R ULES : FWD & RW: rewrite bits 0-2 with value 101 (h & …) | … Encapsulation: encap packet in a 1010 header. (h >> 4) | 1010…. Decapsulation: decap 1010xxx… packets (h << 4) | 000…xxxx Load Balancing: LB(h,p) = {(h,P 1 ),…(h,P n )} 12

H EADER S PACE F RAMEWORK Properties of transfer functions Composable: Invertible: 13 T 1 (h, p) R1 R2 R3 T 2 (h, p) T 3 (h, p) Domain (input)Range (output)

H EADER S PACE F RAMEWORK Step 3 - Develop an algebra to work on these spaces. Every object in Header Space, can be described by union of Wildcard Expressions. We want to perform the following set operations on wildcard expressions: Intersection Complementation Difference 14

H EADER S PACE F RAMEWORK Finding Intersection: Bit by bit intersect using intersection table: Example: If result has any ‘z’, then intersection is empty: Example: See the paper for how to find complement and difference. 15

U SE C ASES OF H EADER S PACE F RAMEWORK T HESE ARE ONLY SOME EXAMPLE USE CASES THAT WE DEVELOPED SO FAR … 16

U SE C ASES Can host A talk to B? 17 Box 1 Box 2 Box 3 Box 4 A B T 1 (X,A) T 2 (T 1 (X,A)) T 4 (T 1 (X,A)) T 3 (T 2 (T 1 (X,A)) U T 3 (T 4 (T 1 (X,A)) T -1 3 T -1 4 T -1 2 T -1 1 All Packets that A can use to communicate with B

U SE C ASES Is there a loop in the network? Inject an all-x text packet from every switch-port Follow the packet until it comes back to injection port 18 Box 1 Box 2 Box 3 Box 4 T 1 (X,P) T 2 (T 1 (X,P)) T 3 (T 2 (T 1 (X,P))) T 4 (T 3 (T 2 (T 1 (X,P)))) Original HS Returned HS T -1 4 T -1 3 T -1 2 T -1 1

U SE C ASES Is the loop infinite? 19 Finite LoopInfinite Loop?

U SE C ASES Are two slices isolated? What do we mean by slice? Fixed Slices: VLAN slices Programmable Slices: slices created by FlowVisor Why do we care about isolation? Banks: for added security. Healthcare: to comply with HIPAA. GENI: to isolate different experiments running on the same network. 20

U SE C ASES Are two slices isolated? 1) slice definitions don’t intersect. 2) packets do not leak. 21 Box 1 Box 2 Box 3 Box 4

H EADER S PACE F RAMEWORK A Powerful General Foundation that gives us A common model for all packets  Header Space. A unified view of almost all type of boxes.  Transfer Function. A powerful interface for answering different questions about the network.  T(h,p) and T -1 (h,p)  Set operations on Header Space 22

I MPLEMENTATION A ND E VALUATION 23

I MPLEMENTATION Header Space Library (Hassel) Written in Python and C. Implements Header Space Class Set operations Implements Transfer Function Class T and T -1 Implements Reachability, Loop Detection and Slice Isolation checks. < 50 lines of code Includes a Cisco IOS parser, Juniper Junos Parser and OpenFlow table dump parser. Generates transfer function from CLI output. Keeps the mapping from Transfer function rule to line number in the CLI output. Publicly available: git clone 24

S TANFORD BACKBONE NETWORK 25 ~750K IP fwd rule. ~1.5K ACL rules. ~100 Vlans. Vlan forwarding. ~750K IP fwd rule. ~1.5K ACL rules. ~100 Vlans. Vlan forwarding.

S TANFORD BACKBONE NETWORK Loop detection test – run time < 10 minutes on a single laptop. 26 Vlan RED Spanning Tree Vlan RED Spanning Tree Vlan BLUE Spanning Tree

P ERFORMANCE 27 PythonC Generating TF Rules~150 sec- Loop Detection Test (30 ports)~560 sec~5 sec Average Per Port~18 sec~40ms Min Per Port~8 sec~2ms Max Per Port~135 sec~1sec Reachability Test (Avg)~13 sec~40ms Performance result for Stanford Backbone Network on a single machine: 4 core, 4GB RAM.

N EXT S TEPS Automatic Test Packet Generation (To appear in CoNEXT 2012). Uses HSA model to Generate minimum number of test packets to maximally cover all the “rules” in the network. (Data Plane Testing) One error detected, find the location of error in data plane. NetPlumber: Real Time Network Policy Checker. A tool to run HSA-style checks in real time by incrementally updating results as network changes. Achieve on average, sub-ms run time per update for checking more than 2500 pairwise reachability checks on Google WAN. 28

S UMMARY Introduced Header Space Analysis As A common model for all packets ( Header Space). A unified view of almost all type of boxes. ( Transfer Function.) A powerful interface for answering different questions about the network. ( T, T -1, Header Space Set Algebra) Showed that direct implementation of HSA algorithms scales well to enterprise-size networks. 29

Thank You! Questions? 30

C OMPLEXITY 31 Run time Reachability: O(dR 2 ) Loop Detection: O(dPR 2 ) R: maximum number of rules per box. d: diameter of network. P: number of ports to be tested Slice Isolation Test: O(NW 2 ) W: number of wildcard expressions in definition of a slice. N: number of slices in the network. See paper for more details.

C OMPLEXITY OF R EACHABILITY AND L OOP D ETECTION T ESTS 32 Run time Reachability: O(dR 2 ) Loop Detection: O(dPR 2 ) R: maximum number of rules per box. d: diameter of network. P: number of ports to be tested Assumption : Linear Fragmentation R cR/3 c 2 R/9 c2Rc2R cR E 1 : Match M 1,.. E 2 : Match M 2,.. E 3 : Match M 3,... E R : Match M R,.. E 1 : Match M 1,.. E 2 : Match M 2,.. E 3 : Match M 3,... E R : Match M R,.. W 1,..W R