blob: 9321ce6a6c897cc7cb1d847ed08be9f8fb153707 [file] [log] [blame]
Nathan Skrzypczak9ad39c02021-08-19 11:38:06 +02001.. _config_getting_started:
2
3=======================================
4Getting started with the configuration
5=======================================
6
7After a successful installation, VPP installs a startup config file named
8*startup.conf* in the */etc/vpp/* directory. This file can be tailored to
9make VPP run as desired, but contains default values for typical installations.
10
11Below are more details about this file and some of the the parameters and values
12it contains.
13
14Command-line Arguments
15----------------------
16
17Before we describe details of the startup configuration file (startup.conf) it
18should be mentioned that VPP can be started without a startup configuration
19file.
20
21Parameters are grouped by a section name. When providing more than one
22parameter to a section, all parameters for that section must be wrapped in
23curly braces. For example, to start VPP with configuration data via the
24command line with the section name *'unix'*:
25
26.. code-block:: console
27
28 $ sudo /usr/bin/vpp unix { interactive cli-listen 127.0.0.1:5002 }
29
30The command line can be presented as a single string or as several; anything
31given on the command line is concatenated with spaces into a single string
32before parsing. VPP applications must be able to locate their own executable
33images. The simplest way to ensure this will work is to invoke a VPP
34application by giving its absolute path. For example:
35*'/usr/bin/vpp <options>'* At startup, VPP applications parse through their
36own ELF-sections [primarily] to make lists of init, configuration, and exit
37handlers.
38
39When developing with VPP, in gdb it's often sufficient to start an application
40like this:
41
42.. code-block:: console
43
44 (gdb) run unix interactive
45
46
47Configuration File (startup.conf)
48-----------------------------------------
49
50The more typical way to specify the startup configuration to VPP is with the
51startup configuration file (startup.conf).
52
53The path of the file is provided to the VPP application on the command line.
54This is typically at /etc/vpp/startup.conf. If VPP is installed as a package
55a default startup.conf file is provided at this location.
56
57The format of the configuration file is a simple text file with the same content
58as the command line.
59
60**A very simple startup.conf file:**
61
62.. code-block:: console
63
64 $ cat /etc/vpp/startup.conf
65 unix {
66 nodaemon
67 log /var/log/vpp/vpp.log
68 full-coredump
69 cli-listen localhost:5002
70 }
71
72 api-trace {
73 on
74 }
75
76 dpdk {
77 dev 0000:03:00.0
78 }
79
80VPP is instructed to load this file with the -c option. For example:
81
82.. code-block:: console
83
84 $ sudo /usr/bin/vpp -c /etc/vpp/startup.conf