Getting to know OpenFlow Nick Rutherford Mariano Vallés {nicholas,mariano}@ac.upc.edu
OpenFlow Switching 1. A way to run experiments in the networks we use everyday. A pragmatic compromise Allow researchers to run experiments in their network without requiring vendors to expose internal workings. Basics An Ethernet switch (e.g. 128-ports of 1GE) An open protocol to remotely add/remove flow entries The Stanford Clean Slate Program http://cleanslate.stanford.edu
The Ossified Network Routing, management, mobility management, access control, VPNs, Feature Operating System Feature Million of lines of source code 5400 RFCs Barrier to entry Specialized Packet Forwarding Hardware Billions of gates Bloated Power Hungry Many complex functions baked into the infrastructure OSPF, BGP, multicast, differentiated services, Traffic Engineering, NAT, firewalls, MPLS, redundant layers, An industry with a mainframe-mentality, reluctant to change 3
Ethernet Switch 4
Control Path (Software) Data Path (Hardware) 5
OpenFlow Controller OpenFlow Protocol (SSL/TCP) Control Path OpenFlow Data Path (Hardware) 6
Flow Table Entry Type 0 OpenFlow Switch Rule Action Stats Packet + byte counters 1. Forward packet to port(s) 2. Encapsulate and forward to controller 3. Drop packet 4. Send to normal processing pipeline Switch Port + mask MAC src MAC dst Eth type VLAN ID IP Src IP Dst IP Prot TCP sport TCP dport The Stanford Clean Slate Program http://cleanslate.stanford.edu
OpenFlow Switching OpenFlow Switch specification OpenFlow Switch sw Secure Channel OpenFlow Protocol SSL Controller PC hw Flow Table The Stanford Clean Slate Program http://cleanslate.stanford.edu
Step 1: Separate Control from Datapath Research Experiments Decision making is decoupled
Step 2: Cache flow decisions in datapath If header = x, send to port 4 If header = y, overwrite header with z, send to ports 5,6 If header =?, send to me Flow Table
Mininet simulator process-based virtualization: many hosts and switches on a single OS kernel Network namespaces: lightweight virtualization feature individual processes with separate network interfaces, routing tables, and ARP tables create kernel or user-space OpenFlow switches, controllers to control the switches, and hosts Full access to hosts xterm, tcpdump
Mininet Architecture
Mininet simple and inexpensive network testbed for OpenFlow apps Topology aware and OpenFlow-aware CLI supports custom topologies, and includes a basic set of parametrized topologies Works out of the box provides a Python API for network creation and experimentation
Sample Mininet custom topology #!/usr/bin/python from mininet.net import Mininet from mininet.topolib import TreeTopo tree4 = TreeTopo(depth=2,fanout=2) net = Mininet(topo=tree4) net.start() h1, h4 = net.hosts[0], net.hosts[3] print h1.cmd('ping -c1 %s' % h4.ip()) net.stop() A small network (4 hosts, 3 switches in Tree topology), and pings one host from another
Tutorial Setup c0 Controller port6633 OpenFlow Tutorial 3hosts-1switch topology loopback (127.0.0.1:6633) s1 OpenFlow Switch s1-eth0 s1-eth1 s1-eth2 loopback (127.0.0.1:6634) dpctl (user space process) h1-eth0 h3-eth0 h4-eth0 h2 10.0.0.2 h3 10.0.0.3 h4 10.0.0.4 virtual hosts 15
Tutorial 16
Full set of slides and more info: OFELIA tutorial (demo) Openflow OFELIA tutorial slides(berlin, Feb 2011) Nick McKeown's SDN slides Openflow intro slides Mininet overview Bob Lantz, Mininet presentation 2009
FlowVisor-based Virtualization Nick's Controller Mariano s Controller Space Invader's Controller OpenFlow Protocol OpenFlow Switch OpenFlow FlowVisor & Policy Control OpenFlow Protocol OpenFlow Switch OpenFlow Switch 18
OpenFlow building blocks oftrace oflops openseer Monitoring/ debugging tools ENVI (GUI) LAVI Stanford Provided n-casting Expedient Applications NOX Beacon Helios Maestro SNAC Controller FlowViso r Console Commercial Switches HP, HP, NEC, Pronto, Juniper.. and many more Software Ref. Switch OpenWRT FlowVisor Stanford Provided NetFPGA PCEngine WiFi AP AP Broadcom Ref. Switch OpenVSwitch Slicing Software OpenFlow Switches 19