blob: c24d1040ddf8454bd1cc606375c4d7f6e5132cae [file] [log] [blame]
John DeNiscoc4c72d22018-08-16 13:50:02 -04001.. _runningvpp:
2
3Running VPP
4===========
5
6Using the files we create in :ref`settingupenvironment` we will now start and
7run VPP.
8
9VPP runs in userspace. In a production environment you will often run it
10with DPDK to connect to real NICs or vhost to connect to VMs. In those
11circumstances you usually run a single instance of VPP.
12
13For purposes of this tutorial, it is going to be extremely useful to run
14multiple instances of VPP, and connect them to each other to form a
15topology. Fortunately, VPP supports this.
16
17
18Using the files we created in setup we will start VPP.
19
20.. code-block:: console
21
22 $ sudo /usr/bin/vpp -c startup1.conf
Damjan Marion79dcbc72018-09-12 14:01:10 +020023 vlib_plugin_early_init:361: plugin path /usr/lib/vpp_plugins:/usr/lib/vpp_plugins
John DeNiscoc4c72d22018-08-16 13:50:02 -040024 load_one_plugin:189: Loaded plugin: abf_plugin.so (ACL based Forwarding)
25 load_one_plugin:189: Loaded plugin: acl_plugin.so (Access Control Lists)
26 load_one_plugin:189: Loaded plugin: avf_plugin.so (Intel Adaptive Virtual Function (AVF) Device Plugin)
27 .........
28 $
29
30If VPP does not start you can try adding **nodaemon** to the startup.conf file in the
31**unix** section. This should provide more information in the output.
32
33startup.conf example with nodaemon:
34
35.. code-block:: console
36
37 unix {nodaemon cli-listen /run/vpp/cli-vpp1.sock}
38 api-segment { prefix vpp1 }
39 plugins { plugin dpdk_plugin.so { disable } }
40
41The command **vppctl** will launch a VPP shell with which you can run
42VPP commands interactively.
43
44We should now be able to execute the VPP shell and show the version.
45
46.. code-block:: console
47
48 $ sudo vppctl -s /run/vpp/cli-vpp1.sock
49 _______ _ _ _____ ___
50 __/ __/ _ \ (_)__ | | / / _ \/ _ \
51 _/ _// // / / / _ \ | |/ / ___/ ___/
52 /_/ /____(_)_/\___/ |___/_/ /_/
Nathan Skrzypczak9ad39c02021-08-19 11:38:06 +020053
John DeNiscoc4c72d22018-08-16 13:50:02 -040054 vpp# show version
55 vpp v18.07-release built by root on c469eba2a593 at Mon Jul 30 23:27:03 UTC 2018
56 vpp#
57
58.. note::
59
60 Use ctrl-d or q to exit from the VPP shell.
61
62If you are going to run several instances of VPP this way be sure to kill them
63when you are finished.
64
65You can use something like the following:
66
67.. code-block:: console
68
69 $ ps -eaf | grep vpp
70 root 2067 1 2 05:12 ? 00:00:00 /usr/bin/vpp -c startup1.conf
71 vagrant 2070 903 0 05:12 pts/0 00:00:00 grep --color=auto vpp
72 $ kill -9 2067
73 $ ps -eaf | grep vpp
74 vagrant 2074 903 0 05:13 pts/0 00:00:00 grep --color=auto vpp