From patchwork Tue Oct 18 20:03:40 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Finucane X-Patchwork-Id: 683855 X-Patchwork-Delegate: rbryant@redhat.com 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 3sz5hh3MZLz9s5g for ; Wed, 19 Oct 2016 07:07:32 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="key not found in DNS" (0-bit key; unprotected) header.d=that.guru header.i=@that.guru header.b=TtcnDVQq; dkim-atps=neutral Received: from archives.nicira.com (localhost [127.0.0.1]) by archives.nicira.com (Postfix) with ESMTP id B504B105AC; Tue, 18 Oct 2016 13:07:31 -0700 (PDT) X-Original-To: dev@openvswitch.org Delivered-To: dev@openvswitch.org Received: from mx1e4.cudamail.com (mx1.cudamail.com [69.90.118.67]) by archives.nicira.com (Postfix) with ESMTPS id 33D1710539 for ; Tue, 18 Oct 2016 13:07:31 -0700 (PDT) Received: from bar5.cudamail.com (unknown [192.168.21.12]) by mx1e4.cudamail.com (Postfix) with ESMTPS id AF77D1E0636 for ; Tue, 18 Oct 2016 14:07:30 -0600 (MDT) X-ASG-Debug-ID: 1476821246-09eadd6af2123f90001-byXFYA Received: from mx1-pf2.cudamail.com ([192.168.24.2]) by bar5.cudamail.com with ESMTP id A6BaEsAKktEGy7ev (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 18 Oct 2016 14:07:26 -0600 (MDT) X-Barracuda-Envelope-From: stephen@that.guru X-Barracuda-RBL-Trusted-Forwarder: 192.168.24.2 Received: from unknown (HELO cat.maple.relay.mailchannels.net) (23.83.214.31) by mx1-pf2.cudamail.com with ESMTPS (DHE-RSA-AES256-SHA encrypted); 18 Oct 2016 20:07:26 -0000 Received-SPF: none (mx1-pf2.cudamail.com: domain at that.guru does not designate permitted sender hosts) X-Barracuda-Apparent-Source-IP: 23.83.214.31 X-Barracuda-RBL-IP: 23.83.214.31 X-Sender-Id: mxroute|x-authuser|stephen@that.guru Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id B87F7100EB6 for ; Tue, 18 Oct 2016 20:07:24 +0000 (UTC) Received: from one.mxroute.com (ip-10-229-2-62.us-west-2.compute.internal [10.229.2.62]) by relay.mailchannels.net (Postfix) with ESMTPA id 3A453100CF7 for ; Tue, 18 Oct 2016 20:07:24 +0000 (UTC) X-Sender-Id: mxroute|x-authuser|stephen@that.guru Received: from one.mxroute.com ([UNAVAILABLE]. [10.102.194.57]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.7.8); Tue, 18 Oct 2016 20:07:24 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: mxroute|x-authuser|stephen@that.guru X-MailChannels-Auth-Id: mxroute X-MC-Loop-Signature: 1476821244561:3048804797 X-MC-Ingress-Time: 1476821244561 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=that.guru; s=default; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Sender:Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=IlVcrjbg+Dr6FTbZlZdp7y7WTTiWAhkjfkkYqLvbUfs=; b=TtcnDVQqOpJEgPAMHolHAnubcY uMxu9obOJP/p0RElurekoUJsUy5f/JJmNm2GBzH6ABGEcJHSl9FhFOxNb+qUSgKC+wWble/4O9roK 9yguQMT29Hi+WmEgG97vo/jWZfQz9z2XyiU5hO5K+WRUghQ0krDKsrcnwprnKRRhJG3CVbNK1dqGg ZBXHwXE4qvTtqd/9dp2CtDwYugFZCob2IW9j/96/Jz2riGj6ClGF+ZWLzUdqzWLfmrmw5Ia9vuqLy qt8rBzHA50NoeZ9KgPnLOmhYCSh6oI7ive3pWcLLc5+sNJQl2eMUI4X9gEk5wk32w1s7dLjHHEpqP iwjNCtLQ==; X-CudaMail-Envelope-Sender: stephen@that.guru From: Stephen Finucane To: dev@openvswitch.org X-CudaMail-MID: CM-E2-1017071847 X-CudaMail-DTE: 101816 X-CudaMail-Originating-IP: 23.83.214.31 Date: Tue, 18 Oct 2016 21:03:40 +0100 X-ASG-Orig-Subj: [##CM-E2-1017071847##][PATCH 10/15] doc: Convert README-native-tunneling to rST Message-Id: <1476821025-4915-11-git-send-email-stephen@that.guru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1476821025-4915-1-git-send-email-stephen@that.guru> References: <1476821025-4915-1-git-send-email-stephen@that.guru> X-OutGoing-Spam-Status: No, score=-9.2 X-AuthUser: stephen@that.guru X-GBUdb-Analysis: 0, 23.83.214.31, Ugly c=0.369283 p=0 Source Normal X-MessageSniffer-Rules: 0-0-0-22687-c X-Barracuda-Connect: UNKNOWN[192.168.24.2] X-Barracuda-Start-Time: 1476821246 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: 1.10 X-Barracuda-Spam-Status: No, SCORE=1.10 using global scores of TAG_LEVEL=3.5 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=4.0 tests=BSF_SC0_MV0713, BSF_SC5_MJ1963, DKIM_SIGNED, RDNS_NONE X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.33831 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.00 DKIM_SIGNED Domain Keys Identified Mail: message has a signature 0.10 RDNS_NONE Delivered to trusted network by a host with no rDNS 0.50 BSF_SC0_MV0713 Custom rule MV0713 0.50 BSF_SC5_MJ1963 Custom Rule MJ1963 Subject: [ovs-dev] [PATCH 10/15] doc: Convert README-native-tunneling to rST 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: , MIME-Version: 1.0 Errors-To: dev-bounces@openvswitch.org Sender: "dev" Signed-off-by: Stephen Finucane --- Makefile.am | 2 +- README-native-tunneling.md | 85 ------------------- README-native-tunneling.rst | 176 ++++++++++++++++++++++++++++++++++++++++ debian/openvswitch-common.docs | 2 +- ofproto/ofproto-tnl-unixctl.man | 2 +- rhel/openvswitch.spec.in | 2 +- utilities/ovs-sim.1.xml | 2 +- 7 files changed, 181 insertions(+), 90 deletions(-) delete mode 100644 README-native-tunneling.md create mode 100644 README-native-tunneling.rst diff --git a/Makefile.am b/Makefile.am index 42ad5d0..c1eba48 100644 --- a/Makefile.am +++ b/Makefile.am @@ -91,7 +91,7 @@ docs = \ PORTING.rst \ README.rst \ README-lisp.rst \ - README-native-tunneling.md \ + README-native-tunneling.rst \ REPORTING-BUGS.rst \ SECURITY.rst \ WHY-OVS.rst diff --git a/README-native-tunneling.md b/README-native-tunneling.md deleted file mode 100644 index 985deb3..0000000 --- a/README-native-tunneling.md +++ /dev/null @@ -1,85 +0,0 @@ -Native Tunneling in Open vSwitch userspace ------------------------------------------- - -Open vSwitch supports tunneling in userspace. Tunneling is implemented in -platform independent way. - -Setup: -====== -Setup physical bridges for all physical interfaces. Create integration bridge. -Add VXLAN port to int-bridge. Assign IP address to physical bridge where -VXLAN traffic is expected. - -Example: -======== -Connect to VXLAN tunnel endpoint logical ip: 192.168.1.2 and 192.168.1.1. - -Configure OVS bridges as follows. - -1. Lets assume 172.168.1.2/24 network is reachable via eth1 create physical bridge br-eth1 - assign ip address (172.168.1.1/24) to br-eth1, Add eth1 to br-eth1 -2. Check ovs cached routes using appctl command - ovs-appctl ovs/route/show - Add tunnel route if not present in OVS route table. - ovs-appctl ovs/route/add 172.168.1.1/24 br-eth1 -3. Add integration bridge int-br and add tunnel port using standard syntax. - ovs-vsctl add-port int-br vxlan0 -- set interface vxlan0 type=vxlan options:remote_ip=172.168.1.2 -4. Assign IP address to int-br, So final topology looks like: - - 192.168.1.1/24 - +--------------+ - | int-br | 192.168.1.2/24 - +--------------+ +--------------+ - | vxlan0 | | vxlan0 | - +--------------+ +--------------+ - | | - | | - | | - 172.168.1.1/24 | - +--------------+ | - | br-eth1 | 172.168.1.2/24 - +--------------+ +---------------+ - | eth1 |----------------------------------| eth1 | - +--------------+ +---------------+ - - Host A with OVS. Remote host. - -With this setup, ping to VXLAN target device (192.168.1.2) should work -There are following commands that shows internal tables: - -Tunneling related commands: -=========================== -Tunnel routing table: - To Add route: - ovs-appctl ovs/route/add / - To see all routes configured: - ovs-appctl ovs/route/show - To del route: - ovs-appctl ovs/route/del / - To look up and display the route for a destination: - ovs-appctl ovs/route/lookup - -ARP: - To see arp cache content: - ovs-appctl tnl/arp/show - To flush arp cache: - ovs-appctl tnl/arp/flush - -To check tunnel ports listening in vswitchd: - ovs-appctl tnl/ports/show - -To set range for VxLan udp source port: - To set: - ovs-appctl tnl/egress_port_range - Shows Current range: - ovs-appctl tnl/egress_port_range - -To check datapath ports: - ovs-appctl dpif/show - -To check datapath flows: - ovs-appctl dpif/dump-flows - -Contact -======= -bugs@openvswitch.org diff --git a/README-native-tunneling.rst b/README-native-tunneling.rst new file mode 100644 index 0000000..78eee5b --- /dev/null +++ b/README-native-tunneling.rst @@ -0,0 +1,176 @@ +.. + Licensed under the Apache License, Version 2.0 (the "License"); you may + not use this file except in compliance with the License. You may obtain + a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + License for the specific language governing permissions and limitations + under the License. + + Convention for heading levels in Open vSwitch documentation: + + ======= Heading 0 (reserved for the title in a document) + ------- Heading 1 + ~~~~~~~ Heading 2 + +++++++ Heading 3 + ''''''' Heading 4 + + Avoid deeper levels because they do not render well. + +========================================== +Native Tunneling in Open vSwitch Userspace +========================================== + +Open vSwitch supports tunneling in userspace. Tunneling is implemented in +a platform-independent way. + +Setup +----- + +Setup physical bridges for all physical interfaces. Create integration bridge. +Add VXLAN port to int-bridge. Assign IP address to physical bridge where +VXLAN traffic is expected. + +Example +------- + +Connect to VXLAN tunnel endpoint logical IP: ``192.168.1.2`` and +``192.168.1.1``. + +Configure OVS bridges as follows. + +1. Let's assume ``172.168.1.2/24`` network is reachable via ``eth1``. Create + physical bridge ``br-eth1``. Assign IP address (``172.168.1.1/24``) to + ``br-eth1``. Add ``eth1`` to ``br-eth1``. + +2. Check ovs cached routes using appctl command. + + :: + + $ ovs-appctl ovs/route/show + + Add tunnel route if not present in OVS route table. + + :: + + $ ovs-appctl ovs/route/add 172.168.1.1/24 br-eth1 + +3. Add integration bridge ``int-br`` and add tunnel port using standard syntax. + + :: + + $ ovs-vsctl add-port int-br vxlan0 \ + -- set interface vxlan0 type=vxlan options:remote_ip=172.168.1.2 + +4. Assign IP address to ``int-br``. + +The final topology should looks like so: + +:: + + Diagram + + 192.168.1.1/24 + +--------------+ + | int-br | 192.168.1.2/24 + +--------------+ +--------------+ + | vxlan0 | | vxlan0 | + +--------------+ +--------------+ + | | + | | + | | + 172.168.1.1/24 | + +--------------+ | + | br-eth1 | 172.168.1.2/24 + +--------------+ +---------------+ + | eth1 |----------------------------------| eth1 | + +--------------+ +---------------+ + + Host A with OVS. Remote host. + +With this setup, ping to VXLAN target device (``192.168.1.2``) should work. + +Tunneling-related Commands +-------------------------- + +Tunnel routing table +~~~~~~~~~~~~~~~~~~~~ + +To add route: + +:: + + $ ovs-appctl ovs/route/add / + +To see all routes configured: + +:: + + $ ovs-appctl ovs/route/show + +To delete route: + +:: + + $ ovs-appctl ovs/route/del / + +To look up and display the route for a destination: + +:: + + $ ovs-appctl ovs/route/lookup + +ARP +~~~ + +To see arp cache content: + +:: + + $ ovs-appctl tnl/arp/show + +To flush arp cache: + +:: + + $ ovs-appctl tnl/arp/flush + +Ports +~~~~~ + +To check tunnel ports listening in ovs-vswitchd: + +:: + + $ ovs-appctl tnl/ports/show + +To set range for VxLan UDP source port: + +:: + + $ ovs-appctl tnl/egress_port_range + +To show current range: + +:: + + $ ovs-appctl tnl/egress_port_range + +Datapath +~~~~~~~~ + +To check datapath ports: + +:: + + $ ovs-appctl dpif/show + +To check datapath flows: + +:: + + $ ovs-appctl dpif/dump-flows diff --git a/debian/openvswitch-common.docs b/debian/openvswitch-common.docs index 7c7335e..950e78c 100644 --- a/debian/openvswitch-common.docs +++ b/debian/openvswitch-common.docs @@ -1,3 +1,3 @@ FAQ.md INSTALL.DPDK.rst -README-native-tunneling.md +README-native-tunneling.rst diff --git a/ofproto/ofproto-tnl-unixctl.man b/ofproto/ofproto-tnl-unixctl.man index fa14b87..7767197 100644 --- a/ofproto/ofproto-tnl-unixctl.man +++ b/ofproto/ofproto-tnl-unixctl.man @@ -1,6 +1,6 @@ .SS "OPENVSWITCH TUNNELING COMMANDS" These commands query and modify OVS tunnel components. Ref to -README-native-tunneling.md for more info. +README-native-tunneling.rst for more info. . .IP "\fBovs/route/add ipv4_address/plen output_bridge [GW]\fR" Adds ipv4_address/plen route to vswitchd routing table. output_bridge diff --git a/rhel/openvswitch.spec.in b/rhel/openvswitch.spec.in index be6449b..d473e76 100644 --- a/rhel/openvswitch.spec.in +++ b/rhel/openvswitch.spec.in @@ -248,7 +248,7 @@ exit 0 /usr/share/openvswitch/vswitch.ovsschema /usr/share/openvswitch/vtep.ovsschema %doc COPYING DESIGN.md INSTALL.SSL.md NOTICE README.rst WHY-OVS.rst FAQ.md NEWS -%doc INSTALL.DPDK.rst rhel/README.RHEL README-native-tunneling.md +%doc INSTALL.DPDK.rst rhel/README.RHEL README-native-tunneling.rst /var/lib/openvswitch /var/log/openvswitch diff --git a/utilities/ovs-sim.1.xml b/utilities/ovs-sim.1.xml index 36be812..0430e73 100644 --- a/utilities/ovs-sim.1.xml +++ b/utilities/ovs-sim.1.xml @@ -158,7 +158,7 @@ ovs-vsctl add-br br0 # Add bridge br0 inside hv0. replaced by dummy devices. Other types of devices, however, retain their usual functions, which means that, e.g., vxlan tunnels still act as tunnels (see - README-native-tunneling.md). + README-native-tunneling.rst).