1 Creating VPP Startup Configuration
2 ==================================
4 This document describes how to create the VPP startup configuration file
5 located at ``/etc/vpp/contiv-vswitch.conf``.
7 Hardware Interface Configuration
8 --------------------------------
10 Single-NIC Configuration
11 ~~~~~~~~~~~~~~~~~~~~~~~~
13 You need to configure hardware interfaces for use by VPP. First, find
14 out the PCI address of the host’s network interface. On Debian-based
15 distributions, you can use ``lshw``:
19 sudo lshw -class network -businfo
20 Bus info Device Class Description
21 ========================================================
22 pci@0000:03:00.0 ens160 network VMXNET3 Ethernet Controller
24 In our case, it would be the ``ens3`` interface with the PCI address
27 Now, add or modify the VPP startup config file
28 (``/etc/vpp/contiv-vswitch.conf``) to contain the proper PCI address:
34 cli-listen /run/vpp/cli.sock
36 coredump-size unlimited
51 Multi-NIC Configuration
52 ~~~~~~~~~~~~~~~~~~~~~~~
54 Similar to the single-NIC configuration, use command *lshw* to find the
55 PCI addresses of all the NICs in the system, for example:
59 $ sudo lshw -class network -businfo
60 Bus info Device Class Description
61 ====================================================
62 pci@0000:00:03.0 ens3 network Virtio network device
63 pci@0000:00:04.0 ens4 network Virtio network device
65 In the example above, ``ens3`` would be the primary interface and
66 ``ens4`` would be the interface that would be used by VPP. The PCI
67 address of the ``ens4`` interface would be ``0000:00:04.0``.
69 Make sure the selected interface is *shut down*, otherwise VPP will not
74 sudo ip link set ens4 down
76 Now, add or modify the VPP startup config file in
77 ``/etc/vpp/contiv-vswitch.conf`` to contain the proper PCI address:
83 cli-listen /run/vpp/cli.sock
85 coredump-size unlimited
100 If assigning multiple NICs to VPP you will need to include each NIC’s
101 PCI address in the dpdk stanza in ``/etc/vpp/contiv-vswitch.conf``.
103 Assigning all NICs to VPP
104 ^^^^^^^^^^^^^^^^^^^^^^^^^
106 On a multi-NIC node, it is also possible to assign all NICs from the
107 kernel for use by VPP. First, you need to install the STN daemon, as
108 described [here][1], since you will want the NICs to revert to the
109 kernel if VPP crashes.
111 You also need to configure the NICs in the VPP startup config file in
112 ``/etc/vpp/contiv-vswitch.conf``. For example, to use both the primary
113 and secondary NIC, in a two-NIC node, your VPP startup config file would
114 look something like this:
120 cli-listen /run/vpp/cli.sock
122 coredump-size unlimited
138 Installing ``lshw`` on CentOS/RedHat/Fedora
139 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
141 Note: On CentOS/RedHat/Fedora distributions, ``lshw`` may not be
142 available by default, install it by
146 sudo yum -y install lshw
151 In regular operation, VPP takes 100% of one CPU core at all times (poll
152 loop). If high performance and low latency is not required you can
153 “slow-down” the poll-loop and drastically reduce CPU utilization by
154 adding the following stanza to the ``unix`` section of the VPP startup
165 The power-saving mode is especially useful in VM-based development
166 environments running on laptops or less powerful servers.
171 To troubleshoot VPP configuration issues in production environments, it
172 is strongly recommended to configure VPP API trace. This is done by
173 adding the following stanza to the VPP startup config file:
182 You can set the size of the trace buffer with the attribute.