From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from bcmv-tmail01.ecl.ntt.co.jp (bcmv-tmail01.ecl.ntt.co.jp [124.146.185.148]) by dpdk.org (Postfix) with ESMTP id 54A911B81C for ; Mon, 17 Dec 2018 11:11:01 +0100 (CET) Received: from bcmv-ns01.ecl.ntt.co.jp (bcmv-ns01.ecl.ntt.co.jp [129.60.83.123]) by bcmv-tmail01.ecl.ntt.co.jp (8.14.4/8.14.4) with ESMTP id wBHAAx0U006421; Mon, 17 Dec 2018 19:10:59 +0900 Received: from bcmv-ns01.ecl.ntt.co.jp (localhost [127.0.0.1]) by bcmv-ns01.ecl.ntt.co.jp (Postfix) with ESMTP id 1C8E2173; Mon, 17 Dec 2018 19:10:59 +0900 (JST) Received: from localhost.localdomain (lobster.nslab.ecl.ntt.co.jp [129.60.13.95]) by bcmv-ns01.ecl.ntt.co.jp (Postfix) with ESMTP id F3EDB178; Mon, 17 Dec 2018 19:10:58 +0900 (JST) From: ogawa.yasufumi@lab.ntt.co.jp To: ferruh.yigit@intel.com, spp@dpdk.org, ogawa.yasufumi@lab.ntt.co.jp Date: Mon, 17 Dec 2018 19:08:43 +0900 Message-Id: <1545041323-457-3-git-send-email-ogawa.yasufumi@lab.ntt.co.jp> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1545041323-457-1-git-send-email-ogawa.yasufumi@lab.ntt.co.jp> References: <1545041323-457-1-git-send-email-ogawa.yasufumi@lab.ntt.co.jp> X-TM-AS-MML: disable Subject: [spp] [PATCH 2/2] docs: add multi-node usecase X-BeenThere: spp@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Soft Patch Panel List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Dec 2018 10:11:02 -0000 From: Yasufumi Ogawa Add usecase of multi-node in Use Case section. Signed-off-by: Yasufumi Ogawa --- docs/guides/setup/use_cases.rst | 172 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 172 insertions(+) diff --git a/docs/guides/setup/use_cases.rst b/docs/guides/setup/use_cases.rst index 7cf143b..d768ea8 100644 --- a/docs/guides/setup/use_cases.rst +++ b/docs/guides/setup/use_cases.rst @@ -337,6 +337,8 @@ Create ``/tmp/sock0`` from ``nfv 1``. Add vhost:0. +.. _usecase_unidir_l2fwd_vhost: + Uni-Directional L2fwd with Vhost PMD ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -496,3 +498,173 @@ and watch received packets on pktgen. Start forwarding. After started forwarding, you can see that packet count is increased. + + +Multiple Nodes +-------------- + +SPP provides multi-node support for configuring network across several nodes +from SPP CLI. You can configure each of nodes step by step. + +In :numref:`figure_spp_multi_nodes_vhost`, there are four nodes on which +SPP and service VMs are running. Host1 behaves as a patch panel for connecting +between other nodes. A request is sent from a VM on host2 to a VM on host3 or +host4. Host4 is a backup server for host3 and replaced with host3 by changing +network configuration. Blue lines are paths for host3 and red lines are for +host4, and changed alternatively. + +.. _figure_spp_multi_nodes_vhost: + +.. figure:: ../images/setup/use_cases/spp_multi_nodes_vhost.* + :width: 100% + + Multiple nodes example + +Launch SPP on Multiple Nodes +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Before SPP CLI, launch spp-ctl on each of nodes. You should give IP address +with ``-b`` option to be accessed from outside of the node. +This is an example for launching spp-ctl on host1. + +.. code-block:: console + + # Launch on host1 + $ python3 src/spp-ctl/spp-ctl -b 192.168.11.101 + +You also need to launch it on host2, host3 and host4 in each of terminals. + +After all of spp-ctls are lauched, launch SPP CLI with four ``-b`` options +for each of hosts. SPP CLI is able to be launched on any of nodes. + +.. code-block:: console + + # Launch SPP CLI + $ python src/spp.py -b 192.168.11.101 \ + -b 192.168.11.102 \ + -b 192.168.11.103 \ + -b 192.168.11.104 \ + +If you succeeded to launch all of processes before, you can find them +by running ``sever list`` command. + +.. code-block:: console + + # Launch SPP CLI + spp > server list + 1: 192.168.1.101:7777 * + 2: 192.168.1.102:7777 + 3: 192.168.1.103:7777 + 4: 192.168.1.104:7777 + +You might notice that first entry is marked with ``*``. It means that +the current node under the management is the first node. + +Switch Nodes +~~~~~~~~~~~~ + +SPP CLI manages a node marked with ``*``. If you configure other nodes, +change the managed node with ``server`` command. +Here is an example to switch to third node. + +.. code-block:: console + + # Launch SPP CLI + spp > server 3 + Switch spp-ctl to "3: 192.168.1.103:7777". + +And the result after changed to host3. + +.. code-block:: console + + spp > server list + 1: 192.168.1.101:7777 + 2: 192.168.1.102:7777 + 3: 192.168.1.103:7777 * + 4: 192.168.1.104:7777 + +You can also confirm this change by checking IP address of spp-ctl from +``status`` command. + +.. code-block:: console + + spp > status + - spp-ctl: + - address: 192.168.1.103:7777 + - primary: + - status: not running + ... + +Configure Patch Panel Node +~~~~~~~~~~~~~~~~~~~~~~~~~~ + +First of all of the network configuration, setup blue lines on host1 +described in :numref:`figure_spp_multi_nodes_vhost`. +You should confirm the managed server is host1. + +.. code-block:: console + + spp > server list + 1: 192.168.1.101:7777 * + 2: 192.168.1.102:7777 + ... + +Patch two sets of physical ports and start forwarding. + +.. code-block:: console + + spp > nfv 1; patch phy:1 phy:2 + Patch ports (phy:1 -> phy:2). + spp > nfv 1; patch phy:3 phy:0 + Patch ports (phy:3 -> phy:0). + spp > nfv 1; forward + Start forwarding. + +Configure Service VM Nodes +~~~~~~~~~~~~~~~~~~~~~~~~~~ + +It is almost similar as +:ref:`Uni-Directional L2fwd with Vhost PMD`. +to setup for host2, host3, and host4. + +For host2, swith server to host2 and run nfv commands. + +.. code-block:: console + + # switch to server 2 + spp > server 2 + Switch spp-ctl to "2: 192.168.1.102:7777". + + # configure + spp > nfv 1; patch phy:0 vhost:0 + Patch ports (phy:0 -> vhost:0). + spp > nfv 1; patch vhost:0 phy:1 + Patch ports (vhost:0 -> phy:1). + spp > nfv 1; forward + Start forwarding. + +Then, swith to host3 and host4 for doing the same configuration. + +Change Path to Backup Node +~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Finally, change path from blue lines to red lines. + +.. code-block:: console + + # switch to server 1 + spp > server 2 + Switch spp-ctl to "2: 192.168.1.102:7777". + + # remove blue path + spp > nfv 1; stop + Stop forwarding. + spp > nfv 1; patch reset + + # configure red path + spp > nfv 2; patch phy:1 phy:4 + Patch ports (phy:1 -> phy:4). + spp > nfv 2; patch phy:5 phy:0 + Patch ports (phy:5 -> phy:0). + spp > nfv 2; forward + Start forwarding. -- 2.7.4