5 Connecting Two FD.io VPP Instances
6 ==================================
10 memif is a very high performance, direct memory interface type which can
11 be used between FD.io VPP instances. It uses a file socket for a control channel
12 to set up shared memory.
14 .. _skills-to-be-learned-1:
19 You will learn the following new skill in this exercise:
21 #. Create a memif interface between two FD.io VPP instances
23 You should be able to perform this exercise with the following skills
24 learned in previous exercises:
26 #. Run a second FD.io VPP instance
27 #. Add an ip address to a FD.io VPP interface
28 #. Ping from FD.io VPP
35 .. figure:: /_images/Connecting_two_vpp_instances_with_memif.png
36 :alt: Connect two FD.io VPP topology
38 Connect two FD.io VPP topology
45 The initial state here is presumed to be the final state from the
47 Interface <VPP/Progressive_VPP_Tutorial#Exercise:_Create_an_Interface>`__
49 .. _action-running-a-second-vpp-instances-1:
51 Running a second FD.io VPP instances
52 -------------------------------------
54 You should already have a FD.io VPP instance running named: vpp1.
56 Run a second FD.io VPP instance named: vpp2.
58 .. code-block:: console
60 $ sudo /usr/bin/vpp -c startup2.conf
62 $ sudo vppctl -s /run/vpp/cli-vpp2.sock
64 __/ __/ _ \ (_)__ | | / / _ \/ _ \
65 _/ _// // / / / _ \ | |/ / ___/ ___/
66 /_/ /____(_)_/\___/ |___/_/ /_/
69 vpp v18.07-release built by root on c469eba2a593 at Mon Jul 30 23:27:03 UTC 2018
72 .. _action-create-memif-interface-on-vpp1-1:
74 Create memif interface on vpp1
75 -------------------------------
77 Create a memif interface on vpp1. To connect to the instance vpp1 use the
78 socket **/run/vpp/cli-vpp1.sock**
80 .. code-block:: console
82 $ sudo vppctl -s /run/vpp/cli-vpp1.sock
83 vpp# create interface memif id 0 master
85 This will create an interface on vpp1 memif0/0 using /run/vpp/memif as
86 its socket file. The role of vpp1 for this memif interface is 'master'.
88 With what you have learned:
90 #. Set the memif0/0 state to up.
91 #. Assign IP address 10.10.2.1/24 to memif0/0
92 #. Examine memif0/0 via show commands
94 .. _action-create-memif-interface-on-vpp2-1:
96 Create memif interface on vpp2
97 --------------------------------
99 We want vpp2 to pick up the 'slave' role using the same
100 run/vpp/memif-vpp1vpp2 socket file
102 .. code-block:: console
104 vpp# create interface memif id 0 slave
106 This will create an interface on vpp2 memif0/0 using /run/vpp/memif as
107 its socket file. The role of vpp1 for this memif interface is 'slave'.
109 Use your previously used skills to:
111 #. Set the memif0/0 state to up.
112 #. Assign IP address 10.10.2.2/24 to memif0/0
113 #. Examine memif0/0 via show commands
115 .. _action-ping-from-vpp1-to-vpp2-1:
117 Ping from vpp1 to vpp2
118 ------------------------
120 Ping 10.10.2.2 from vpp1
122 .. code-block:: console
126 Ping 10.10.2.1 from vpp2
128 .. code-block:: console