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)
19 To see the list of traffic gens from the cli:
21 .. code-block:: console
23 $ ./vsperf --list-trafficgens
25 This guide provides the details of how to install
26 and configure the various traffic generators.
28 Background Information
29 ----------------------
30 The traffic default configuration can be found in
31 tools/pkt_gen/trafficgen/trafficgenhelper.py, and is configured as
34 .. code-block:: console
39 'srcmac': '00:00:00:00:00:00',
40 'dstmac': '00:00:00:00:00:00',
45 'dstip': '90.90.90.90',
59 The framesize paramter can be overridden from the configuration
60 files by adding the following to your custom configuration file
63 .. code-block:: console
65 TRAFFICGEN_PKT_SIZES = (64, 128,)
67 OR from the commandline:
69 .. code-block:: console
71 $ ./vsperf --test-params "pkt_sizes=x,y" $TESTNAME
73 You can also modify the traffic transmission duration and the number
74 of trials run by the traffic generator by extending the example
77 .. code-block:: console
79 $ ./vsperf --test-params "pkt_sizes=x,y;duration=10;rfc2455_trials=3" $TESTNAME
83 To select the Dummy generator please add the following to your
84 custom configuration file ``10_custom.conf``.
87 .. code-block:: console
91 OR run ``vsperf`` with the ``--trafficgen`` argument
93 .. code-block:: console
95 $ ./vsperf --trafficgen Dummy $TESTNAME
97 Where $TESTNAME is the name of the vsperf test you would like to run.
98 This will setup the vSwitch and the VNF (if one is part of your test)
99 print the traffic configuration and prompt you to transmit traffic
100 when the setup is complete.
102 .. code-block:: console
104 Please send 'continuous' traffic with the following stream config:
105 30mS, 90mpps, multistream False
106 and the following flow config:
112 "dstip": "90.90.90.90"
114 "traffic_type": "continuous",
127 "dstmac": "00:00:00:00:00:00",
128 "srcmac": "00:00:00:00:00:00",
132 What was the result for 'frames tx'?
134 When your traffic gen has completed traffic transmission and provided
135 the results please input these at the vsperf prompt. vsperf will try
138 .. code-block:: console
140 Is '$input_value' correct?
142 Please answer with y OR n.
144 VPSERF will ask you for:
145 * Result for 'frames tx'
146 * Result for 'frames rx'
147 * Result for 'min latency'
148 * Result for 'max latency'
149 * Result for 'avg latency'
151 Finally vsperf will print out the results for your test and generate the
152 appropriate logs and csv files.
158 On the CentOS 7 system
159 ~~~~~~~~~~~~~~~~~~~~~~
161 You need to install IxNetworkTclClient$(VER\_NUM)Linux.bin.tgz.
163 On the IXIA client software system
164 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
166 Find the IxNetwork TCL server app (start -> All Programs -> IXIA ->
167 IxNetwork -> IxNetwork\_$(VER\_NUM) -> IxNetwork TCL Server)
169 Right click on IxNetwork TCL Server, select properties - Under shortcut tab in
170 the Target dialogue box make sure there is the argument "-tclport xxxx"
171 where xxxx is your port number (take note of this port number you will
172 need it for the 10\_custom.conf file).
174 .. image:: TCLServerProperties.png
176 Hit Ok and start the TCL server application
181 Spirent installation files and instructions are available on the
182 Spirent support website at:
184 http://support.spirent.com
186 Select a version of Spirent TestCenter software to utilize. This example
187 will use Spirent TestCenter v4.57 as an example. Substitute the appropriate
188 version in place of 'v4.57' in the examples, below.
190 On the CentOS 7 System
191 ~~~~~~~~~~~~~~~~~~~~~~
193 Download and install the following:
195 Spirent TestCenter Application, v4.57 for 64-bit Linux Client
197 Spirent Virtual Deployment Service (VDS)
198 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
200 Spirent VDS is required for both TestCenter hardware and virtual
201 chassis in the vsperf environment. For installation, select the version
202 that matches the Spirent TestCenter Application version. For v4.57,
203 the matching VDS version is 1.0.55. Download either the ova (VMware)
204 or qcow2 (QEMU) image and create a VM with it. Initialize the VM
205 according to Spirent installation instructions.
207 Using Spirent TestCenter Virtual (STCv)
208 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
210 STCv is available in both ova (VMware) and qcow2 (QEMU) formats. For
213 Spirent TestCenter Virtual Machine for VMware, v4.57 for Hypervisor - VMware ESX.ESXi
215 Virtual test port performance is affected by the hypervisor configuration. For
216 best practice results in deploying STCv, the following is suggested:
218 - Create a single VM with two test ports rather than two VMs with one port each
219 - Set STCv in DPDK mode
220 - Give STCv 2*n + 1 cores, where n = the number of ports. For vsperf, cores = 5.
221 - Turning off hyperthreading and pinning these cores will improve performance
222 - Give STCv 2 GB of RAM
224 To get the highest performance and accuracy, Spirent TestCenter hardware is
225 recommended. vsperf can run with either stype test ports.
227 Using STC REST Client
228 ~~~~~~~~~~~~~~~~~~~~~
229 The stcrestclient package provides the stchttp.py ReST API wrapper module.
230 This allows simple function calls, nearly identical to those provided by
231 StcPython.py, to be used to access TestCenter server sessions via the
232 STC ReST API. Basic ReST functionality is provided by the resthttp module,
233 and may be used for writing ReST clients independent of STC.
235 - Project page: <https://github.com/Spirent/py-stcrestclient>
236 - Package download: <http://pypi.python.org/pypi/stcrestclient>
238 To use REST interface, follow the instructions in the Project page to
239 install the package. Once installed, the scripts named with 'rest' keyword
240 can be used. For example: testcenter-rfc2544-rest.py can be used to run
241 RFC 2544 tests using the REST interface.
249 Xena Networks traffic generator requires certain files and packages to be
250 installed. It is assumed the user has access to the Xena2544.exe file which
251 must be placed in VSPerf installation location under the tools/pkt_gen/xena
252 folder. Contact Xena Networks for the latest version of this file. The user
253 can also visit www.xenanetworks/downloads to obtain the file with a valid
256 To execute the Xena2544.exe file under Linux distributions the mono-complete
257 package must be installed. To install this package follow the instructions
258 below. Further information can be obtained from
259 http://www.mono-project.com/docs/getting-started/install/linux/
261 .. code-block:: console
263 rpm --import "http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF"
264 yum-config-manager --add-repo http://download.mono-project.com/repo/centos/
265 yum -y install mono-complete
267 To prevent gpg errors on future yum installation of packages the mono-project
268 repo should be disabled once installed.
270 .. code-block:: console
272 yum-config-manager --disable download.mono-project.com_repo_centos_
277 Connection information for your Xena Chassis must be supplied inside the
278 ``10_custom.conf`` or ``03_custom.conf`` file. The following parameters must be
279 set to allow for proper connections to the chassis.
281 .. code-block:: console
283 TRAFFICGEN_XENA_IP = ''
284 TRAFFICGEN_XENA_PORT1 = ''
285 TRAFFICGEN_XENA_PORT2 = ''
286 TRAFFICGEN_XENA_USER = ''
287 TRAFFICGEN_XENA_PASSWORD = ''
288 TRAFFICGEN_XENA_MODULE1 = ''
289 TRAFFICGEN_XENA_MODULE2 = ''