From patchwork Tue Jul 21 10:38:12 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yi Li X-Patchwork-Id: 1332921 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=140.211.166.133; helo=hemlock.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=winhong.com Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4B9w704r7kz9sR4 for ; Tue, 21 Jul 2020 20:38:36 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id B695289428; Tue, 21 Jul 2020 10:38:34 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id OQiR6JNgWyF6; Tue, 21 Jul 2020 10:38:33 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by hemlock.osuosl.org (Postfix) with ESMTP id 880D1884A2; Tue, 21 Jul 2020 10:38:33 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 6BC37C089F; Tue, 21 Jul 2020 10:38:33 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by lists.linuxfoundation.org (Postfix) with ESMTP id 460FFC016F for ; Tue, 21 Jul 2020 10:38:32 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 4232189421 for ; Tue, 21 Jul 2020 10:38:32 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id B1pQPGjElGjO for ; Tue, 21 Jul 2020 10:38:29 +0000 (UTC) X-Greylist: delayed 06:20:04 by SQLgrey-1.7.6 Received: from regular1.263xmail.com (regular1.263xmail.com [211.150.70.200]) by hemlock.osuosl.org (Postfix) with ESMTPS id 63193884A2 for ; Tue, 21 Jul 2020 10:38:28 +0000 (UTC) Received: from localhost (unknown [192.168.167.32]) by regular1.263xmail.com (Postfix) with ESMTP id 8427C114D for ; Tue, 21 Jul 2020 18:38:24 +0800 (CST) X-MAIL-GRAY: 0 X-MAIL-DELIVERY: 1 X-ADDR-CHECKED4: 1 X-ANTISPAM-LEVEL: 2 X-SKE-CHECKED: 1 X-ABS-CHECKED: 1 Received: from localhost.localdomain (unknown [14.18.236.69]) by smtp.263.net (postfix) whith ESMTP id P4708T139888282298112S1595327900033508_; Tue, 21 Jul 2020 18:38:24 +0800 (CST) X-IP-DOMAINF: 1 X-UNIQUE-TAG: <9a0d8c71beefb1b4532572e45727c542> X-RL-SENDER: yili@winhong.com X-SENDER: yili@winhong.com X-LOGIN-NAME: yili@winhong.com X-FST-TO: dev@openvswitch.org X-SENDER-IP: 14.18.236.69 X-ATTACHMENT-NUM: 0 X-DNS-TYPE: 0 X-System-Flag: 0 From: Yi Li To: dev@openvswitch.org Date: Tue, 21 Jul 2020 18:38:12 +0800 Message-Id: <20200721103812.4081424-1-yili@winhong.com> X-Mailer: git-send-email 2.25.3 MIME-Version: 1.0 Cc: yilikernel@gmail.com, yili@winhong.com Subject: [ovs-dev] [PATCH ovn v2] ovn-openstack.rst: Correct IP for Adding a Gateway X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ovs-dev-bounces@openvswitch.org Sender: "dev" Correct the VM 'd' private IP address on the Adding a Gateway Section. Signed-off-by: Yi Li Acked-by: Dumitru Ceara --- Documentation/tutorials/ovn-openstack.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Documentation/tutorials/ovn-openstack.rst b/Documentation/tutorials/ovn-openstack.rst index 2e4f6340..4eae486e 100644 --- a/Documentation/tutorials/ovn-openstack.rst +++ b/Documentation/tutorials/ovn-openstack.rst @@ -1410,7 +1410,7 @@ and the router between them:: What we see is: * VM ``d`` is on the "private" switch under its private IP address - 10.0.0.8. The "private" switch is connected to "router1" via two + 10.0.0.6. The "private" switch is connected to "router1" via two router ports (one for IPv4, one for IPv6). * The "public" switch is connected to "router1" and to the physical @@ -1420,14 +1420,14 @@ What we see is: addition to the router ports that connect to these switches, it has "nat" entries that direct network address translation. The translation between floating IP address 172.24.4.8 and private - address 10.0.0.8 makes perfect sense. + address 10.0.0.6 makes perfect sense. When the NB DB gets translated into logical flows at the southbound layer, the "nat" entries get translated into IP matches that then invoke "ct_snat" and "ct_dnat" actions. The details are intricate, but you can get some of the idea by just looking for relevant flows:: - $ ovn-sbctl lflow-list router1 | abbrev | grep nat | grep -E '172.24.4.8|10.0.0.8' + $ ovn-sbctl lflow-list router1 | abbrev | grep nat | grep -E '172.24.4.8' table=3 (lr_in_unsnat ), priority=100 , match=(ip && ip4.dst == 172.24.4.8 && inport == "lrp-ae9b52" && is_chassis_resident("cr-lrp-ae9b52")), action=(ct_snat;) table=3 (lr_in_unsnat ), priority=50 , match=(ip && ip4.dst == 172.24.4.8), action=(reg9[0] = 1; next;) table=4 (lr_in_dnat ), priority=100 , match=(ip && ip4.dst == 172.24.4.8 && inport == "lrp-ae9b52" && is_chassis_resident("cr-lrp-ae9b52")), action=(ct_dnat(10.0.0.6);) @@ -1459,7 +1459,7 @@ The first two stanzas just show the packet traveling through the In "router1", first the ``ct_snat`` action without an argument attempts to "un-SNAT" the packet. ovn-trace treats this as a no-op, because it doesn't have any state for tracking connections. As an -alternative, it invokes ``ct_dnat(10.0.0.8)`` to NAT the destination +alternative, it invokes ``ct_dnat(10.0.0.6)`` to NAT the destination IP:: ingress(dp="router1", inport="lrp-ae9b52")