Open Vswitch Release 2.9.90

Total Page:16

File Type:pdf, Size:1020Kb

Open Vswitch Release 2.9.90 Open vSwitch Release 2.9.90 Jun 20, 2018 Contents 1 Open vSwitch Documentation1 1.1 How the Documentation is Organised..................................1 1.2 First Steps................................................1 1.3 Deeper Dive...............................................2 1.4 The Open vSwitch Project........................................2 1.5 Getting Help...............................................2 2 Getting Started 3 2.1 What Is Open vSwitch?.........................................4 2.1.1 Overview............................................4 2.1.2 What’s here?..........................................5 2.2 Why Open vSwitch?...........................................5 2.2.1 The mobility of state......................................6 2.2.2 Responding to network dynamics...............................6 2.2.3 Maintenance of logical tags...................................6 2.2.4 Hardware integration......................................6 2.2.5 Summary............................................7 2.3 Installing Open vSwitch.........................................7 2.3.1 Installation from Source....................................7 2.3.2 Installation from Packages................................... 41 2.3.3 Upgrades............................................ 49 2.3.4 Others.............................................. 50 3 Tutorials 53 3.1 OVS Faucet Tutorial........................................... 53 3.1.1 Setting Up OVS......................................... 53 3.1.2 Setting up Faucet........................................ 54 3.1.3 Overview............................................ 55 3.1.4 Switching............................................ 56 3.1.5 Routing............................................. 66 3.1.6 ACLs.............................................. 73 3.1.7 Finishing Up.......................................... 75 3.1.8 Further Directions........................................ 75 3.2 Open vSwitch Advanced Features.................................... 76 3.2.1 Getting Started......................................... 76 3.2.2 Using GDB........................................... 77 3.2.3 Motivation............................................ 78 i 3.2.4 Scenario............................................. 78 3.2.5 Setup.............................................. 79 3.2.6 Implementing Table 0: Admission control........................... 79 3.2.7 Testing Table 0......................................... 80 3.2.8 Implementing Table 1: VLAN Input Processing........................ 81 3.2.9 Testing Table 1......................................... 82 3.2.10 Implementing Table 2: MAC+VLAN Learning for Ingress Port................ 83 3.2.11 Testing Table 2......................................... 84 3.2.12 Implementing Table 3: Look Up Destination Port....................... 85 3.2.13 Testing Table 3......................................... 86 3.2.14 Implementing Table 4: Output Processing........................... 88 3.2.15 Testing Table 4......................................... 89 3.3 OVN Sandbox.............................................. 90 3.3.1 Getting Started......................................... 90 3.3.2 Using GDB........................................... 91 3.3.3 Creating OVN Resources.................................... 91 3.3.4 Using ovn-trace......................................... 92 3.4 OVN OpenStack Tutorial........................................ 92 3.4.1 Setting Up DevStack...................................... 93 3.4.2 DevStack preliminaries..................................... 95 3.4.3 Shortening UUIDs....................................... 96 3.4.4 Overview............................................ 97 3.4.5 Switching............................................ 98 3.4.6 Routing............................................. 109 3.4.7 Adding a Gateway....................................... 113 3.4.8 IPv6............................................... 116 3.4.9 ACLs.............................................. 120 3.4.10 DHCP.............................................. 121 3.4.11 Further Directions........................................ 124 3.5 OVS Conntrack Tutorial......................................... 124 3.5.1 Definitions........................................... 124 3.5.2 Conntrack Related Fields.................................... 124 3.5.3 Sample Topology........................................ 126 3.5.4 Tool used to generate TCP segments.............................. 127 3.5.5 Matching TCP packets..................................... 127 3.5.6 Summary............................................ 131 4 Deep Dive 133 4.1 OVS................................................... 133 4.1.1 Design Decisions In Open vSwitch............................... 133 4.1.2 Open vSwitch Datapath Development Guide.......................... 148 4.1.3 Integration Guide for Centralized Control........................... 152 4.1.4 Porting Open vSwitch to New Software or Hardware..................... 155 4.1.5 OpenFlow Support in Open vSwitch.............................. 159 4.1.6 Bonding............................................. 163 4.1.7 Open vSwitch Networking Namespaces on Linux....................... 166 4.1.8 OVSDB Replication Implementation.............................. 167 4.1.9 The DPDK Datapath...................................... 169 4.1.10 OVS-on-Hyper-V Design.................................... 190 4.1.11 Language Bindings....................................... 196 4.1.12 Testing............................................. 197 4.1.13 Tracing packets inside Open vSwitch.............................. 204 4.1.14 C IDL Compound Indexes................................... 205 4.2 OVN................................................... 209 ii 4.2.1 OVN Gateway High Availability Plan............................. 209 4.2.2 Role Based Access Control................................... 215 4.2.3 What’s New with OVS and OVN 2.8.............................. 216 5 How-to Guides 221 5.1 OVS................................................... 221 5.1.1 Open vSwitch with KVM.................................... 221 5.1.2 Open vSwitch with SELinux.................................. 222 5.1.3 Open vSwitch with Libvirt................................... 225 5.1.4 Open vSwitch with SSL.................................... 226 5.1.5 Using LISP tunneling...................................... 230 5.1.6 Connecting VMs Using Tunnels................................ 231 5.1.7 Connecting VMs Using Tunnels (Userspace)......................... 234 5.1.8 Isolating VM Traffic Using VLANs.............................. 238 5.1.9 Quality of Service (QoS) Rate Limiting............................ 240 5.1.10 How to Use the VTEP Emulator................................ 243 5.1.11 Monitoring VM Trafic Using sFlow.............................. 246 5.1.12 Using Open vSwitch with DPDK................................ 249 5.2 OVN................................................... 254 5.2.1 Open Virtual Networking With Docker............................. 254 5.2.2 Integration of Containers with OVN and OpenStack...................... 258 5.2.3 Open Virtual Network With firewalld............................. 260 6 Reference Guide 263 6.1 Man Pages................................................ 263 6.1.1 ovs-sim............................................. 263 6.1.2 ovs-test............................................. 266 6.1.3 ovs-vlan-test.......................................... 268 6.1.4 ovsdb-server........................................... 270 6.1.5 ovsdb.............................................. 276 6.1.6 ovsdb.............................................. 280 7 Open vSwitch FAQ 289 7.1 Basic Configuration........................................... 289 7.2 Development............................................... 292 7.3 Implementation Details......................................... 293 7.4 General.................................................. 295 7.5 Common Configuration Issues...................................... 296 7.6 Using OpenFlow............................................. 302 7.7 Quality of Service (QoS)......................................... 309 7.8 Releases................................................. 311 7.9 Terminology............................................... 315 7.10 VLANs.................................................. 315 7.11 VXLANs................................................. 319 7.12 OVN................................................... 319 8 Open vSwitch Internals 321 8.1 Contributing to Open vSwitch...................................... 321 8.1.1 Submitting Patches....................................... 321 8.1.2 Backporting patches...................................... 327 8.1.3 Open vSwitch Coding Style.................................. 330 8.1.4 Open vSwitch Windows Datapath Coding Style........................ 338 8.1.5 Open vSwitch Documentation Style.............................. 341 8.1.6 Open vSwitch Library ABI Updates.............................. 347 8.2 Mailing Lists............................................... 348 iii 8.2.1 ovs-announce.......................................... 348 8.2.2 ovs-discuss........................................... 349 8.2.3 ovs-dev............................................. 349 8.2.4 ovs-git.............................................. 349 8.2.5 ovs-build............................................ 349 8.2.6 bugs............................................... 349 8.2.7 security............................................
Recommended publications
  • Open Vswitch Release 2.8.0
    Open vSwitch Release 2.8.0 May 05, 2020 Contents 1 Open vSwitch Documentation1 1.1 How the Documentation is Organised..................................1 1.2 First Steps................................................1 1.3 Deeper Dive...............................................1 1.4 The Open vSwitch Project........................................2 1.5 Getting Help...............................................2 2 Getting Started 3 2.1 What Is Open vSwitch?.........................................4 2.1.1 Overview............................................4 2.1.2 What’s here?..........................................5 2.2 Why Open vSwitch?...........................................5 2.2.1 The mobility of state......................................6 2.2.2 Responding to network dynamics...............................6 2.2.3 Maintenance of logical tags...................................6 2.2.4 Hardware integration......................................6 2.2.5 Summary............................................7 2.3 Installing Open vSwitch.........................................7 2.3.1 Installation from Source....................................7 2.3.2 Installation from Packages................................... 40 2.3.3 Upgrades............................................ 46 2.3.4 Others.............................................. 47 3 Tutorials 51 3.1 Open vSwitch Advanced Features.................................... 51 3.1.1 Getting Started......................................... 51 3.1.2 Using GDB..........................................
    [Show full text]
  • Open Vswitch
    Open vSwitch Ben Pfaff VMware What is Open vSwitch? Semi-official description: Open vSwitch is a production quality, multilayer virtual switch licensed under the open source Apache 2.0 license. It is designed to enable massive network automation through programmatic extension, while still supporting standard management interfaces and protocols (e.g. NetFlow, sFlow, SPAN, RSPAN, CLI, LACP, 802.1ag). The exciting parts: ● Write a program to control your network. ● Fast! (and getting faster) ● Portable (with new ports coming) Where is Open vSwitch Used? ● Broad support: – Linux, FreeBSD, NetBSD, Windows, ESX – KVM, Xen, Docker, VirtualBox, Hyper-V, … – mininet, OpenStack, CloudStack, OpenNebula, … ● Widely used: – Most popular OpenStack networking backend – Default network stack in XenServer – 2,180 hits in Google Scholar – Thousands of subscribers to OVS mailing lists ● Hundreds of contributors (Incomplete) List of Contributors Programming Model OpenFlow controller Ingress Flow Table Flow Table … Flow Table Egress Port 0 1 N Port(s) Flow Tables IF a AND b AND ... THEN <actions1> ELSE IF c AND d AND … THEN <actions2> ELSE … Conditions Actions Packet header matches Output to port Metadata matches: Modify packet header or metadata ingress port Add/remove VLAN, MPLS, etc. queuing information Go to or recurse into flow table tunnel information Push/pop stack Bitwise matches Modify flow table Range matches* “Drop” Set membership matches** ... ... priority=55, in_port=1,tcp,tcp_src=80, actions=output:2 Programming Model Properties ● Somewhat good match for hardware ASICs ● Natural for network admins, unnatural for programmers ● Turing complete (with OVS extensions) ● Easy to implement, hard to optimize – (Wasn't obvious it needed optimization.) ● Embarrassingly parallel* OVS Programming Example ● Notes and test cases in source tree ● The curse of “normal”.
    [Show full text]
  • Open Vswitch Release 2.8.6
    Open vSwitch Release 2.8.6 Nov 09, 2018 Contents 1 Open vSwitch Documentation1 1.1 How the Documentation is Organised..................................1 1.2 First Steps................................................1 1.3 Deeper Dive...............................................1 1.4 The Open vSwitch Project........................................2 1.5 Getting Help...............................................2 2 Getting Started 3 2.1 What Is Open vSwitch?.........................................4 2.1.1 Overview............................................4 2.1.2 What’s here?..........................................5 2.2 Why Open vSwitch?...........................................5 2.2.1 The mobility of state......................................6 2.2.2 Responding to network dynamics...............................6 2.2.3 Maintenance of logical tags...................................6 2.2.4 Hardware integration......................................6 2.2.5 Summary............................................7 2.3 Installing Open vSwitch.........................................7 2.3.1 Installation from Source....................................7 2.3.2 Installation from Packages................................... 40 2.3.3 Upgrades............................................ 47 2.3.4 Others.............................................. 48 3 Tutorials 53 3.1 Open vSwitch Advanced Features.................................... 53 3.1.1 Getting Started......................................... 53 3.1.2 Using GDB..........................................
    [Show full text]
  • Open Vswitch Release 2.16.90
    Open vSwitch Release 2.16.90 Sep 22, 2021 Contents 1 Project 1 1.1 Community................................................1 1.2 Contributing...............................................1 1.3 Maintaining................................................1 1.4 Documentation..............................................2 1.5 Getting Help...............................................2 2 Getting Started 3 2.1 What Is Open vSwitch?.........................................4 2.1.1 Overview............................................4 2.1.2 What’s here?..........................................5 2.2 Why Open vSwitch?...........................................5 2.2.1 The mobility of state......................................6 2.2.2 Responding to network dynamics...............................6 2.2.3 Maintenance of logical tags...................................6 2.2.4 Hardware integration......................................6 2.2.5 Summary............................................7 2.3 Installing Open vSwitch.........................................7 2.3.1 Installation from Source....................................7 2.3.2 Installation from Packages................................... 50 2.3.3 Others.............................................. 58 3 Tutorials 63 3.1 OVS Faucet Tutorial........................................... 63 3.1.1 Setting Up OVS......................................... 63 3.1.2 Setting up Faucet........................................ 64 3.1.3 Overview............................................ 65 3.1.4 Switching...........................................
    [Show full text]