Changes between Version 7 and Version 8 of Documentation/fSDN/aSwitchImage
- Timestamp:
- Oct 18, 2013, 10:50:49 PM (11 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Documentation/fSDN/aSwitchImage
v7 v8 1 = Installation and Usage of Open vSwitch=1 == Installation and Usage of Open vSwitch == 2 2 This page describes how to install and use OpenVSwitch (OVS). OVS is a software switch implementation designed to run on Linux. More information about Open vSwitch can be found at their [http://openvswitch.org/ website]. 3 3 4 == Contents==4 === Contents === 5 5 [#install I. Installation] [[BR]] 6 6 [#src 1.1 from source] [[BR]] … … 13 13 [#cite III. References] [[BR]] 14 14 ---- 15 = I Installation= #install15 === I Installation === #install 16 16 OVS can be installed either from source or from binaries. [#src Section 1.1] covers how to build from source, and [#bin section 1.2] covers install from binaries. 17 17 18 === Prerequisites===18 ==== Prerequisites ==== 19 19 OVS should install/work with relatively little effort on Ubuntu (or perhaps other Linuxes as well). The following installation/operation steps were successfully done on Ubuntu 10.10 through 12.04. 20 20 21 == 1.1 Method 1: from source== #src21 === 1.1 Method 1: from source === #src 22 22 The steps followed in this section are based on the contents of INSTALL.Linux, included with the OVS tarball and also found [http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=blob_plain;f=INSTALL;hb=HEAD here](also attached at the end of this page for your convenience). It should be found under the OVS root directory. 23 23 24 == 1.1.1 Getting the source and dependencies==24 ==== 1.1.1 Getting the source and dependencies ==== 25 25 1. If your Ubuntu install is still fresh, run 'apt-get update'. If this fails, repeat after replacing all instances of 'apt:9999' with 'us.archive.ubuntu.com' in /etc/apt/sources.list . 26 26 1. Install dependencies: … … 47 47 }}} 48 48 49 === 1.1.2 Some Sanity Checks.===49 ==== 1.1.2 Some Sanity Checks. ==== 50 50 If things don't go well, here are some things worth checking: 51 51 … … 81 81 * In general, `dmesg` can be used to check for various anomalies when things e.g. insmod fail silently. 82 82 83 == 1.2 Method 2: from binaries== #bin83 === 1.2 Method 2: from binaries === #bin 84 84 Binaries are easier to set up, but lag in OVS version and support a narrower range of architectures and kernel versions. 85 85 1. Install the openvswitch packages. Do not use the Ubuntu repositories since the install the incorrect versions of the package; Download the … … 101 101 102 102 ---- 103 = II Running OVS.= #run103 === II Running OVS. === #run 104 104 OVS has three main components that must be initialized: 105 105 * openvswitch_mod.ko, the OVS kernel module … … 108 108 The daemon configures itself using the data provided by the database; `ovs-vsctl` is used to modify the contents of the database in order to configure the OVS switch at runtime. 109 109 110 == 2.1 Initialization== #init110 === 2.1 Initialization === #init 111 111 1. Load openVswitch kernel module 112 112 {{{ … … 137 137 The 'unix:...db.sock' specifies that the process attach to the socket opened by `ovsdb`. 138 138 139 == 2.2 Configuring OVS== #conf139 === 2.2 Configuring OVS === #conf 140 140 Once OVS is running, virtual switches may be created and configured. In general, a virtual switch is comprised of a bridge interface (usually named br''x''), and one or more interfaces associated with it. A single vswitchd can control multiple virtual switches with arbitrary number of ports each. 141 141 142 === 2.2.1 Creating virtual switches===142 ==== 2.2.1 Creating virtual switches ==== 143 143 The following steps create a bridge interface (br0) and associate an interface to it: 144 144 {{{ … … 155 155 ovs-vsctl add-port br0 eth0.222 tag=222 156 156 }}} 157 === 2.2.2 Network configuration===157 ==== 2.2.2 Network configuration ==== 158 158 For an OVS switch to behave as a plain vanilla switch, both bridge interface and associated network interfaces must be up and configured with IP layer information. The bridge interface can be configured with tools such as `ifconfig` (or even DHCP) like any other *nic interface. Its configurations may even be stored in /etc/network/interfaces for persistence: 159 159 {{{ … … 171 171 }}} 172 172 173 == 2.3 OVS with KVM== #kvm173 === 2.3 OVS with KVM === #kvm 174 174 OVS can be used with KVM. The instructions for setting this up can be found [http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=blob_plain;f=INSTALL.KVM;hb=HEAD here], or in the root directory of the source as INSTALL.KVM. A use case is documented in this separate [http://orbit-lab.org/wiki/Internal/VMHostSetup wiki entry]. 175 175 176 == 2.4 OVS with !OpenFlow== #of176 === 2.4 OVS with !OpenFlow === #of 177 177 OVS switches may be run as !OpenFlow switches. The following steps describe how to run OVS in !OpenFlow mode. 178 178 … … 211 211 212 212 ---- 213 = III References= #cite213 == III References == #cite 214 214 The following links were referenced but aren't relevant overall; this is just for citation. 215 215