From patchwork Sat Aug 13 01:08:10 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alin Serdean X-Patchwork-Id: 658913 X-Patchwork-Delegate: guru@ovn.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from archives.nicira.com (archives.nicira.com [96.126.127.54]) by ozlabs.org (Postfix) with ESMTP id 3sB3YD3fmtz9sR8 for ; Sat, 13 Aug 2016 11:08:48 +1000 (AEST) Received: from archives.nicira.com (localhost [127.0.0.1]) by archives.nicira.com (Postfix) with ESMTP id B773010DFC; Fri, 12 Aug 2016 18:08:47 -0700 (PDT) X-Original-To: dev@openvswitch.org Delivered-To: dev@openvswitch.org Received: from mx3v3.cudamail.com (mx3.cudamail.com [64.34.241.5]) by archives.nicira.com (Postfix) with ESMTPS id 269D010DF5 for ; Fri, 12 Aug 2016 18:08:46 -0700 (PDT) Received: from bar6.cudamail.com (localhost [127.0.0.1]) by mx3v3.cudamail.com (Postfix) with ESMTPS id B2AA7161E11 for ; Fri, 12 Aug 2016 19:08:45 -0600 (MDT) X-ASG-Debug-ID: 1471050524-0b32377e39287c0001-byXFYA Received: from mx3-pf1.cudamail.com ([192.168.14.2]) by bar6.cudamail.com with ESMTP id 44K9ufEzAZXCqu8V (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 12 Aug 2016 19:08:44 -0600 (MDT) X-Barracuda-Envelope-From: aserdean@cloudbasesolutions.com X-Barracuda-RBL-Trusted-Forwarder: 192.168.14.2 Received: from unknown (HELO cbssmtp1.cloudbase.local) (91.232.152.5) by mx3-pf1.cudamail.com with SMTP; 13 Aug 2016 01:08:43 -0000 Received-SPF: pass (mx3-pf1.cudamail.com: SPF record at cloudbasesolutions.com designates 91.232.152.5 as permitted sender) X-Barracuda-Apparent-Source-IP: 91.232.152.5 X-Barracuda-RBL-IP: 91.232.152.5 Received: from localhost (localhost [127.0.0.1]) by cbssmtp1.cloudbase.local (Postfix) with ESMTP id 9CCAB3FC7B for ; Sat, 13 Aug 2016 04:08:42 +0300 (EEST) X-Virus-Scanned: amavisd-new at cloudbasesolutions.com Received: from cbssmtp1.cloudbase.local ([127.0.0.1]) by localhost (cbssmtp1.cloudbase.local [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ABjBpeCbL9TC for ; Sat, 13 Aug 2016 04:08:21 +0300 (EEST) Received: from CBSEX1.cloudbase.local (unknown [10.77.78.3]) by cbssmtp1.cloudbase.local (Postfix) with ESMTP id 9E11340212 for ; Sat, 13 Aug 2016 04:08:11 +0300 (EEST) Received: from CBSEX1.cloudbase.local ([10.77.78.3]) by CBSEX1.cloudbase.local ([10.77.78.3]) with mapi id 14.03.0301.000; Sat, 13 Aug 2016 03:08:11 +0200 X-CudaMail-Envelope-Sender: aserdean@cloudbasesolutions.com From: Alin Serdean To: "dev@openvswitch.org" X-CudaMail-MID: CM-V1-811047846 X-CudaMail-DTE: 081216 X-CudaMail-Originating-IP: 91.232.152.5 Thread-Topic: [PATCH v4 3/3] Windows: document multiple NIC support setup X-ASG-Orig-Subj: [##CM-V1-811047846##][PATCH v4 3/3] Windows: document multiple NIC support setup Thread-Index: AdH0/ySsHW34sKq5S/aUWFnJv95d4g== Date: Sat, 13 Aug 2016 01:08:10 +0000 Message-ID: <6FDA0CACF4BC624BBE12167875D71C9B407E52C2@CBSEX1.cloudbase.local> Accept-Language: en-US, it-IT Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.77.78.1] MIME-Version: 1.0 X-GBUdb-Analysis: 0, 91.232.152.5, Ugly c=0.297854 p=-0.444444 Source Normal X-MessageSniffer-Rules: 0-0-0-18676-c X-Barracuda-Connect: UNKNOWN[192.168.14.2] X-Barracuda-Start-Time: 1471050524 X-Barracuda-Encrypted: DHE-RSA-AES256-SHA X-Barracuda-URL: https://web.cudamail.com:443/cgi-mod/mark.cgi X-Virus-Scanned: by bsmtpd at cudamail.com X-Barracuda-BRTS-Status: 1 X-Barracuda-Spam-Score: 0.60 X-Barracuda-Spam-Status: No, SCORE=0.60 using global scores of TAG_LEVEL=3.5 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=4.0 tests=BSF_RULE7568M, RDNS_NONE X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.31971 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.50 BSF_RULE7568M Custom Rule 7568M 0.10 RDNS_NONE Delivered to trusted network by a host with no rDNS Subject: [ovs-dev] [PATCH v4 3/3] Windows: document multiple NIC support setup X-BeenThere: dev@openvswitch.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@openvswitch.org Sender: "dev" This patch updates the documentation on how to set up OVS with multiple NICs. Also update the documentation to show users how new internal ports are created Signed-off-by: Alin Gabriel Serdean Acked-by: Paul Boca --- v4: Address comments v3: Add acked v2: Rebase --- INSTALL.Windows.md | 143 +++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 101 insertions(+), 42 deletions(-) diff --git a/INSTALL.Windows.md b/INSTALL.Windows.md index 6b0f5d8..93e1c04 100644 --- a/INSTALL.Windows.md +++ b/INSTALL.Windows.md @@ -72,9 +72,9 @@ or from a distribution tar ball. directories, etc. For example, % ./configure CC=./build-aux/cccl LD="`which link`" \ - LIBS="-lws2_32 -liphlpapi" --prefix="C:/openvswitch/usr" \ - --localstatedir="C:/openvswitch/var" --sysconfdir="C:/openvswitch/etc" \ - --with-pthread="C:/pthread" + LIBS="-lws2_32 -liphlpapi -lwbemuuid -lole32 -loleaut32" \ + --prefix="C:/openvswitch/usr" --localstatedir="C:/openvswitch/var" \ + --sysconfdir="C:/openvswitch/etc" --with-pthread="C:/pthread" By default, the above enables compiler optimization for fast code. For default compiler optimization, pass the "--with-debug" configure @@ -125,9 +125,10 @@ Note down the directory where OpenSSL is installed (e.g.: C:/OpenSSL-Win32). For example, % ./configure CC=./build-aux/cccl LD="`which link`" \ - LIBS="-lws2_32 -liphlpapi" --prefix="C:/openvswitch/usr" \ - --localstatedir="C:/openvswitch/var" --sysconfdir="C:/openvswitch/etc" \ - --with-pthread="C:/pthread" --enable-ssl --with-openssl="C:/OpenSSL-Win32" + LIBS="-lws2_32 -liphlpapi -lwbemuuid -lole32 -loleaut32" \ + --prefix="C:/openvswitch/usr" --localstatedir="C:/openvswitch/var" \ + --sysconfdir="C:/openvswitch/etc" --with-pthread="C:/pthread" \ + --enable-ssl --with-openssl="C:/OpenSSL-Win32" * Run make for the ported executables. @@ -142,10 +143,11 @@ level 'make' will invoke building the kernel datapath, if the For example, % ./configure CC=./build-aux/cccl LD="`which link`" \ - LIBS="-lws2_32 -liphlpapi" --prefix="C:/openvswitch/usr" \ - --localstatedir="C:/openvswitch/var" --sysconfdir="C:/openvswitch/etc" \ - --with-pthread="C:/pthread" --enable-ssl \ - --with-openssl="C:/OpenSSL-Win32" --with-vstudiotarget="" + LIBS="-lws2_32 -liphlpapi -lwbemuuid -lole32 -loleaut32" \ + --prefix="C:/openvswitch/usr" --localstatedir="C:/openvswitch/var" \ + --sysconfdir="C:/openvswitch/etc" --with-pthread="C:/pthread" \ + --enable-ssl --with-openssl="C:/OpenSSL-Win32" \ + --with-vstudiotarget="" Possible values for "" are: "Debug" and "Release" @@ -186,8 +188,7 @@ to work (covered later). The command to create a new switch named 'OVS-Extended-Switch' using a physical NIC named 'Ethernet 1' is: - % New-VMSwitch "OVS-Extended-Switch" -AllowManagementOS $true \ - -NetAdapterName "Ethernet 1" + % New-VMSwitch "OVS-Extended-Switch" -NetAdapterName "Ethernet 1" Note: you can obtain the list of physical NICs on the host using 'Get-NetAdapter' command. @@ -278,23 +279,20 @@ connected to the Hyper-V switch. I.e. let us suppose we created the Hyper-V virtual switch on top of the adapter named 'Ethernet0'. In OVS for Hyper-V, we use that name('Ethernet0') as a special name to refer to that adapter. -Note: Currently, we assume that the Hyper-V switch on which OVS extension is -enabled has a single physical NIC connected to it. - -Internal port is the virtual adapter created on the Hyper-V switch using the -'AllowManagementOS' setting. This has already been setup while creating the -switch using the instructions above. In OVS for Hyper-V, we use a the name of -that specific adapter as a special name to refer to that adapter. By default it -is created under the following rule "vEthernet ()". +Internal ports are the virtual adapters created on the Hyper-V switch using the +ovs-vsctl add-br command. By default they are created under the +following rule "" and the adapters are disabled. One needs to +enable them and set the corresponding values to it to make them IP-able. As a whole example, if we issue the following in a powershell console: -PS C:\package\binaries> Get-NetAdapter | select Name,MacAddress,InterfaceDescription +PS C:\package\binaries> Get-NetAdapter | select Name,InterfaceDescription -Name MacAddress InterfaceDescription ----- ---------- -------------------- -Ethernet1 00-0C-29-94-05-65 Intel(R) PRO/1000 MT Network Connection -vEthernet (external) 00-0C-29-94-05-5B Hyper-V Virtual Ethernet Adapter #2 -Ethernet0 00-0C-29-94-05-5B Intel(R) PRO/1000 MT Network Connection #2 +Name InterfaceDescription +---- -------------------- +Ethernet1 Intel(R) PRO/1000 MT Network Connection +br-pif Hyper-V Virtual Ethernet Adapter #2 +Ethernet0 Intel(R) PRO/1000 MT Network Connection #2 +br-int Hyper-V Virtual Ethernet Adapter #3 PS C:\package\binaries> Get-VMSwitch @@ -302,13 +300,11 @@ Name SwitchType NetAdapterInterfaceDescription ---- ---------- ------------------------------ external External Intel(R) PRO/1000 MT Network Connection #2 - -We can see that we have a switch(external) created upon adapter name 'Ethernet0' -with an internal port under name 'vEthernet (external)'. Thus resulting into the -following ovs-vsctl commands +We can see that we have a switch(external) created upon adapter name +'Ethernet0' with the internal ports under name 'br-pif' and 'br-int'. Thus +resulting into the following ovs-vsctl commands % ovs-vsctl add-port br-pif Ethernet0 - % ovs-vsctl add-port br-pif "vEthernet (external)" * Dumping the ports should show the additional ports that were just added. Sample output shows up as follows: @@ -317,18 +313,17 @@ following ovs-vsctl commands system@ovs-system: lookups: hit:0 missed:0 lost:0 flows: 0 - port 4: vEthernet (external) (internal) <<< 'AllowManagementOS' - adapter on - Hyper-V switch - port 2: br-pif (internal) - port 1: br-int (internal) + port 2: br-pif (internal) <<< internal port + adapter on + Hyper-V switch + port 1: br-int (internal) <<< internal port + adapter on + Hyper-V switch port 3: Ethernet0 <<< Physical NIC % ovs-vsctl show a56ec7b5-5b1f-49ec-a795-79f6eb63228b Bridge br-pif - Port "vEthernet (external)" - Interface "vEthernet (external)" Port br-pif Interface br-pif type: internal @@ -374,8 +369,7 @@ with OVS extension enabled. system@ovs-system: lookups: hit:0 missed:0 lost:0 flows: 0 - port 4: vEthernet (external) (internal) - port 5: ovs-port-a + port 4: ovs-port-a port 2: br-pif (internal) port 1: br-int (internal port 3: Ethernet0 @@ -383,8 +377,6 @@ with OVS extension enabled. % ovs-vsctl show 4cd86499-74df-48bd-a64d-8d115b12a9f2 Bridge br-pif - Port "vEthernet (external)" - Interface "vEthernet (external)" Port "Ethernet0" Interface "Ethernet0" Port br-pif @@ -397,6 +389,73 @@ with OVS extension enabled. Port "ovs-port-a" Interface "ovs-port-a" +Steps to add multiple NICs to be managed by OVS +----------------------------------------------- + +To leverage support of multiple NICs into OVS, we will be using the MSFT +cmdlets for forwarding team extension. More documentation can be found +under: +https://technet.microsoft.com/en-us/library/jj553812%28v=wps.630%29.aspx + +Eg: +We will set up a switch team combined from 'Ethernet0 2' and 'Ethernet1 2' +named external. + +% Get-NetAdapter + +Name InterfaceDescription +---- -------------------- +br-int Hyper-V Virtual Ethernet Adapter #3 +br-pif Hyper-V Virtual Ethernet Adapter #2 +Ethernet3 2 Intel(R) 82574L Gigabit Network Co...#3 +Ethernet2 2 Intel(R) 82574L Gigabit Network Co...#4 +Ethernet1 2 Intel(R) 82574L Gigabit Network Co...#2 +Ethernet0 2 Intel(R) 82574L Gigabit Network Conn... + +% New-NetSwitchTeam -Name external -TeamMembers "Ethernet0 2","Ethernet1 2" +% Get-NetSwitchTeam +Name : external +Members : {Ethernet1 2, Ethernet0 2} + +This will result in a new adapter bound to the host called 'external' + +% Get-NetAdapter + +Name InterfaceDescription +---- -------------------- +br-test Hyper-V Virtual Ethernet Adapter #4 +br-pif Hyper-V Virtual Ethernet Adapter #2 +external Microsoft Network Adapter Multiplexo... +Ethernet3 2 Intel(R) 82574L Gigabit Network Co...#3 +Ethernet2 2 Intel(R) 82574L Gigabit Network Co...#4 +Ethernet1 2 Intel(R) 82574L Gigabit Network Co...#2 +Ethernet0 2 Intel(R) 82574L Gigabit Network Conn... + +Next we will set up the Hyper-V VMSwitch on the new adapter 'external' + +%New-VMSwitch -Name external -NetAdapterName external -AllowManagementOS $false + +Under OVS, the adapters added to the team, 'Ethernet0 2' and 'Ethernet1 2', can +be added either under a bond device or separately. + +In our example here is how the bridges look with the NICs being separated under +different bridges: + +% ovs-vsctl show +6cd9481b-c249-4ee3-8692-97b399dd29d8 + Bridge br-test + Port br-test + Interface br-test + type: internal + Port "Ethernet1 2" + Interface "Ethernet1 2" + Bridge br-pif + Port "Ethernet0 2" + Interface "Ethernet0 2" + Port br-pif + Interface br-pif + type: internal + Steps to configure patch ports and switch VLAN tagging ------------------------------------------------------ The Windows Open vSwitch implementation support VLAN tagging in the switch.