1 .. This work is licensed under a Creative Commons Attribution 4.0 International License.
2 .. http://creativecommons.org/licenses/by/4.0
3 .. (c) OPNFV, Intel Corporation, AT&T and others.
5 ===========================
6 'vsperf' Traffic Gen Guide
7 ===========================
11 VSPERF supports the following traffic generators:
13 * Dummy (DEFAULT): Allows you to use your own external
15 * IXIA (IxNet and IxOS)
20 To see the list of traffic gens from the cli:
22 .. code-block:: console
24 $ ./vsperf --list-trafficgens
26 This guide provides the details of how to install
27 and configure the various traffic generators.
29 Background Information
30 ----------------------
31 The traffic default configuration can be found in
32 tools/pkt_gen/trafficgen/trafficgenhelper.py, and is configured as
35 .. code-block:: console
40 'srcmac': '00:00:00:00:00:00',
41 'dstmac': '00:00:00:00:00:00',
46 'dstip': '90.90.90.90',
60 The framesize paramter can be overridden from the configuration
61 files by adding the following to your custom configuration file
64 .. code-block:: console
66 TRAFFICGEN_PKT_SIZES = (64, 128,)
68 OR from the commandline:
70 .. code-block:: console
72 $ ./vsperf --test-params "pkt_sizes=x,y" $TESTNAME
74 You can also modify the traffic transmission duration and the number
75 of trials run by the traffic generator by extending the example
78 .. code-block:: console
80 $ ./vsperf --test-params "pkt_sizes=x,y;duration=10;rfc2455_trials=3" $TESTNAME
84 To select the Dummy generator please add the following to your
85 custom configuration file ``10_custom.conf``.
88 .. code-block:: console
92 OR run ``vsperf`` with the ``--trafficgen`` argument
94 .. code-block:: console
96 $ ./vsperf --trafficgen Dummy $TESTNAME
98 Where $TESTNAME is the name of the vsperf test you would like to run.
99 This will setup the vSwitch and the VNF (if one is part of your test)
100 print the traffic configuration and prompt you to transmit traffic
101 when the setup is complete.
103 .. code-block:: console
105 Please send 'continuous' traffic with the following stream config:
106 30mS, 90mpps, multistream False
107 and the following flow config:
113 "dstip": "90.90.90.90"
115 "traffic_type": "continuous",
128 "dstmac": "00:00:00:00:00:00",
129 "srcmac": "00:00:00:00:00:00",
133 What was the result for 'frames tx'?
135 When your traffic gen has completed traffic transmission and provided
136 the results please input these at the vsperf prompt. vsperf will try
139 .. code-block:: console
141 Is '$input_value' correct?
143 Please answer with y OR n.
145 VPSERF will ask you for:
146 * Result for 'frames tx'
147 * Result for 'frames rx'
148 * Result for 'min latency'
149 * Result for 'max latency'
150 * Result for 'avg latency'
152 Finally vsperf will print out the results for your test and generate the
153 appropriate logs and csv files.
159 On the CentOS 7 system
160 ~~~~~~~~~~~~~~~~~~~~~~
162 You need to install IxNetworkTclClient$(VER\_NUM)Linux.bin.tgz.
164 On the IXIA client software system
165 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
167 Find the IxNetwork TCL server app (start -> All Programs -> IXIA ->
168 IxNetwork -> IxNetwork\_$(VER\_NUM) -> IxNetwork TCL Server)
170 Right click on IxNetwork TCL Server, select properties - Under shortcut tab in
171 the Target dialogue box make sure there is the argument "-tclport xxxx"
172 where xxxx is your port number (take note of this port number you will
173 need it for the 10\_custom.conf file).
175 .. image:: TCLServerProperties.png
177 Hit Ok and start the TCL server application
182 Spirent installation files and instructions are available on the
183 Spirent support website at:
185 http://support.spirent.com
187 Select a version of Spirent TestCenter software to utilize. This example
188 will use Spirent TestCenter v4.57 as an example. Substitute the appropriate
189 version in place of 'v4.57' in the examples, below.
191 On the CentOS 7 System
192 ~~~~~~~~~~~~~~~~~~~~~~
194 Download and install the following:
196 Spirent TestCenter Application, v4.57 for 64-bit Linux Client
198 Spirent Virtual Deployment Service (VDS)
199 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
201 Spirent VDS is required for both TestCenter hardware and virtual
202 chassis in the vsperf environment. For installation, select the version
203 that matches the Spirent TestCenter Application version. For v4.57,
204 the matching VDS version is 1.0.55. Download either the ova (VMware)
205 or qcow2 (QEMU) image and create a VM with it. Initialize the VM
206 according to Spirent installation instructions.
208 Using Spirent TestCenter Virtual (STCv)
209 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
211 STCv is available in both ova (VMware) and qcow2 (QEMU) formats. For
214 Spirent TestCenter Virtual Machine for VMware, v4.57 for Hypervisor - VMware ESX.ESXi
216 Virtual test port performance is affected by the hypervisor configuration. For
217 best practice results in deploying STCv, the following is suggested:
219 - Create a single VM with two test ports rather than two VMs with one port each
220 - Set STCv in DPDK mode
221 - Give STCv 2*n + 1 cores, where n = the number of ports. For vsperf, cores = 5.
222 - Turning off hyperthreading and pinning these cores will improve performance
223 - Give STCv 2 GB of RAM
225 To get the highest performance and accuracy, Spirent TestCenter hardware is
226 recommended. vsperf can run with either stype test ports.
228 Using STC REST Client
229 ~~~~~~~~~~~~~~~~~~~~~
230 The stcrestclient package provides the stchttp.py ReST API wrapper module.
231 This allows simple function calls, nearly identical to those provided by
232 StcPython.py, to be used to access TestCenter server sessions via the
233 STC ReST API. Basic ReST functionality is provided by the resthttp module,
234 and may be used for writing ReST clients independent of STC.
236 - Project page: <https://github.com/Spirent/py-stcrestclient>
237 - Package download: <http://pypi.python.org/pypi/stcrestclient>
239 To use REST interface, follow the instructions in the Project page to
240 install the package. Once installed, the scripts named with 'rest' keyword
241 can be used. For example: testcenter-rfc2544-rest.py can be used to run
242 RFC 2544 tests using the REST interface.
250 Xena Networks traffic generator requires certain files and packages to be
251 installed. It is assumed the user has access to the Xena2544.exe file which
252 must be placed in VSPerf installation location under the tools/pkt_gen/xena
253 folder. Contact Xena Networks for the latest version of this file. The user
254 can also visit www.xenanetworks/downloads to obtain the file with a valid
257 **Note** VSPerf has been fully tested with version v2.43 of Xena2544.exe
259 To execute the Xena2544.exe file under Linux distributions the mono-complete
260 package must be installed. To install this package follow the instructions
261 below. Further information can be obtained from
262 http://www.mono-project.com/docs/getting-started/install/linux/
264 .. code-block:: console
266 rpm --import "http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF"
267 yum-config-manager --add-repo http://download.mono-project.com/repo/centos/
268 yum -y install mono-complete
270 To prevent gpg errors on future yum installation of packages the mono-project
271 repo should be disabled once installed.
273 .. code-block:: console
275 yum-config-manager --disable download.mono-project.com_repo_centos_
280 Connection information for your Xena Chassis must be supplied inside the
281 ``10_custom.conf`` or ``03_custom.conf`` file. The following parameters must be
282 set to allow for proper connections to the chassis.
284 .. code-block:: console
286 TRAFFICGEN_XENA_IP = ''
287 TRAFFICGEN_XENA_PORT1 = ''
288 TRAFFICGEN_XENA_PORT2 = ''
289 TRAFFICGEN_XENA_USER = ''
290 TRAFFICGEN_XENA_PASSWORD = ''
291 TRAFFICGEN_XENA_MODULE1 = ''
292 TRAFFICGEN_XENA_MODULE2 = ''
301 MoonGen architecture overview and general installation instructions
304 https://github.com/emmericp/MoonGen
306 For VSPerf use, MoonGen should be cloned from here (as opposed to the afore
309 git clone https://github.com/atheurer/MoonGen
311 and use the opnfv-stable branch:
313 git checkout opnfv-stable
315 VSPerf uses a particular example script under the examples directory within
318 MoonGen/examples/opnfv-vsperf.lua
320 Follow MoonGen set up instructions here:
322 https://github.com/atheurer/MoonGen/blob/opnfv-stable/MoonGenSetUp.html
324 Note one will need to set up ssh login to not use passwords between the server
325 running MoonGen and the device under test (running the VSPERF test
326 infrastructure). This is because VSPERF on one server uses 'ssh' to
327 configure and run MoonGen upon the other server.
329 One can set up this ssh access by doing the following on both servers:
331 .. code-block:: console
333 ssh-keygen -b 2048 -t rsa
334 ssh-copy-id <other server>