docs: better docs, mv doxygen to sphinx
[vpp.git] / docs / gettingstarted / progressivevpp / runningvpp.rst
1 .. _runningvpp:
2
3 Running VPP
4 ===========
5
6 Using the files we create in :ref`settingupenvironment` we will now start and
7 run VPP.
8
9 VPP runs in userspace. In a production environment you will often run it
10 with DPDK to connect to real NICs or vhost to connect to VMs. In those
11 circumstances you usually run a single instance of VPP.
12
13 For purposes of this tutorial, it is going to be extremely useful to run
14 multiple instances of VPP, and connect them to each other to form a
15 topology. Fortunately, VPP supports this.
16
17
18 Using the files we created in setup we will start VPP.
19
20 .. code-block:: console
21
22    $ sudo /usr/bin/vpp -c startup1.conf
23    vlib_plugin_early_init:361: plugin path /usr/lib/vpp_plugins:/usr/lib/vpp_plugins
24    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
30 If 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
33 startup.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
41 The command **vppctl** will launch a VPP shell with which you can run
42 VPP commands interactively.
43
44 We 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     /_/ /____(_)_/\___/   |___/_/  /_/
53
54    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
62 If you are going to run several instances of VPP this way be sure to kill them
63 when you are finished.
64
65 You 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