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 to form a topology. It uses a file socket
12 for a control channel to set up that 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 .. _action-create-memif-interface-on-vpp1-1:
60 Create memif interface on vpp1
61 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
63 Create a memif interface on vpp1:
65 .. code-block:: console
67 vpp# create interface memif id 0 master
69 This will create an interface on vpp1 memif0/0 using /run/vpp/memif as
70 its socket file. The role of vpp1 for this memif inteface is 'master'.
72 Use your previously used skills to:
74 #. Set the memif0/0 state to up.
75 #. Assign IP address 10.10.2.1/24 to memif0/0
76 #. Examine memif0/0 via show commands
78 .. _action-create-memif-interface-on-vpp2-1:
80 Create memif interface on vpp2
81 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
83 We want vpp2 to pick up the 'slave' role using the same
84 run/vpp/memif-vpp1vpp2 socket file
86 .. code-block:: console
88 vpp# create interface memif id 0 slave
90 This will create an interface on vpp2 memif0/0 using /run/vpp/memif as
91 its socket file. The role of vpp1 for this memif inteface is 'slave'.
93 Use your previously used skills to:
95 #. Set the memif0/0 state to up.
96 #. Assign IP address 10.10.2.2/24 to memif0/0
97 #. Examine memif0/0 via show commands
99 .. _action-ping-from-vpp1-to-vpp2-1:
101 Ping from vpp1 to vpp2
102 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
104 Ping 10.10.2.2 from vpp1
106 .. code-block:: console
110 Ping 10.10.2.1 from vpp2
112 .. code-block:: console