docs: refresh & structure overhaul
[nfvbench.git] / nfvbench / cfg.default.yaml
1 #
2 # NFVbench default configuration file
3 #
4 # This configuration file is ALWAYS loaded by NFVbench and should never be modified by users.
5 # To specify your own property values, always define them in a separate config file
6 # and pass that file to the script using -c or --config <file>
7 # Property values in that config file will override the default values in the current file
8 #
9 ---
10 # IMPORTANT CUSTOMIZATION NOTES
11 # There are roughly 2 types of NFVbench config based on the OpenStack encaps used:
12 # - VLAN (OVS, OVS-DPDK, ML2/VPP)
13 # Many of the fields to customize are relevant to only 1 of the 2 encaps
14 # These will be clearly labeled "VxLAN only" or "VLAN only"
15 # Fields that are not applicable will not be used by NFVbench and can be left empty
16 #
17 # All fields are applicable to all encaps/traffic generators unless explicitly marked otherwise.
18 # Fields that can be over-ridden at the command line are marked with the corresponding
19 # option, e.g. "--interval"
20
21
22 # The OpenStack openrc file to use - must be a valid full pathname. If running
23 # in a container, this path must be valid in the container.
24 #
25 # The only case where this field can be empty is when measuring a system that does not run
26 # OpenStack or when OpenStack APIs are not accessible or OpenStack APis use is not
27 # desirable. In that case the EXT service chain must be used.
28 #
29 # If openrc is not admin some parameters are mandatory and must be filled with valid values in config file such as :
30 # - availability_zone
31 # - hypervisor_hostname
32 # - vlans
33 # WARNING: Not used if clouds_detail is sets
34 openrc_file:
35
36 # The OpenStack clouds configuration from clouds.yaml file to use.
37 # clouds.yaml file must be in one of the following paths:
38 # - ~/.config/openstack
39 # - /etc/openstack
40 # Note: If running in a container, this path must be valid in the container.
41 # The only case where this field can be empty is when measuring a system that does not run
42 # OpenStack or when OpenStack APIs are not accessible or OpenStack APis use is not
43 # desirable. In that case the EXT service chain must be used.
44 #
45 # If user is not admin some parameters are mandatory and must be filled with valid values in config file such as :
46 # - availability_zone
47 # - hypervisor_hostname
48 # - vlans
49 # If a value is sets, this parameter disable the use of openrc file
50 clouds_detail:
51
52 # Forwarder to use in nfvbenchvm image. Available options: ['vpp', 'testpmd']
53 vm_forwarder: testpmd
54
55 # By default (empty) NFVbench will try to locate a VM image file
56 # from the package root directory named "nfvbench-<version>.qcow2" and
57 # upload that file. The image name will be "nfvbench-<version>"
58 # This can be overridden by specifying here a pathname of a file
59 # that follows the same naming convention.
60 # In most cases, this field should be left empty as the packaging should
61 # include the proper VM image file
62 vm_image_file:
63
64 # Name of the flavor to use for the loopback VMs
65 #
66 # If the provided name is an exact match to a flavor name known by OpenStack
67 # (as shown from 'nova flavor-list'), that flavor will be reused.
68 # Otherwise, a new flavor will be created with attributes listed below.
69 flavor_type: 'nfvbench.medium'
70
71 # Custom flavor attributes for the test VM
72 flavor:
73   # Number of vCPUs for the flavor, must be at least 2!
74   vcpus: 2
75   # Memory for the flavor in MB
76   ram: 4096
77   # Size of local disk in GB
78   disk: 0
79   # metadata are supported and can be added if needed, optional
80   # note that if your OpenStack does not have NUMA optimization
81   # (cpu pinning and huge pages)
82   # you must comment out extra_specs completely otherwise
83   # loopback VM creation will fail
84   extra_specs:
85       "hw:cpu_policy": dedicated
86       "hw:mem_page_size": large
87
88 # Enable multiqueue for all test VM interfaces (PVP and PVVP only).
89 # When enabled, the test VM image will get added the property to enable
90 # multiqueue (hw_vif_multiqueue_enabled='true').
91 # The number of queues per interace will be set to the number of vCPUs configured for
92 # the VM.
93 # By default there is only 1 queue per interface
94 # The max allowed queue per interface is 8.
95 # The valid range for this parameter is [1..min(8, vcpu_count)]
96 # When multiqueue is used the recommended setting is to set it to same value as the
97 # number of vCPU used - up to a max of 8 queues.
98 # Setting to a lower value than vCPU should also work. For example if using 4 vCPU and
99 # vif_multiqueue_size is set to 2, OpenStack will create 4 queues per interface but the
100 # test VM will only use the first 2 queues.
101 vif_multiqueue_size: 1
102
103 # Increase number of buffers allocated for VPP VM forwarder. May be needed in scenarios with large
104 # number of interfaces and worker threads, or a lot of physical interfaces with multiple RSS queues.
105 # Value is per CPU socket. Default is 16384.
106 num_mbufs: 16384
107
108 # Name of the availability zone to use for the test VMs
109 # Must be one of the zones listed by 'nova availability-zone-list'
110 # availability_zone: 'nova'
111 # If openrc is not admin set a valid value
112 availability_zone:
113 # To force placement on a given hypervisor, set the name here
114 # (if multiple names are provided, the first will be used)
115 # Leave empty to let OpenStack pick the hypervisor
116 compute_nodes:
117 # If openrc is not admin set a valid value for hypervisor hostname
118 # Example of value: hypervisor_hostname: "server1"
119 hypervisor_hostname:
120
121 # Type of service chain to run, possible options are PVP, PVVP and EXT
122 # PVP - port to VM to port
123 # PVVP - port to VM to VM to port
124 # EXT - external chain used only for running traffic and checking traffic generator counters,
125 #       all other parts of chain must be configured manually
126 # Can be overriden by --service-chain
127 service_chain: 'PVP'
128
129 # Total number of service chains, every chain has own traffic stream
130 # Can be overriden by --service-chain-count
131 service_chain_count: 1
132
133 # Specifies if all chains share the same right/left/middle networks
134 service_chain_shared_net: false
135
136 # Total number of traffic flows for all chains and directions generated by the traffic generator.
137 # Minimum is '2 * service_chain_count', it is automatically adjusted if too small
138 # value was configured. Must be even.
139 # Every flow has packets with different IPs in headers
140 # Can be overriden by --flow-count
141 flow_count: 10000
142
143 # set to true if service chains should use SRIOV
144 # This requires SRIOV to be available on compute nodes
145 sriov: false
146
147 # Perform port to port loopback (direct or through switch)
148 # e.g. for unitary testing of the switch or the bench itself.
149 # When selected, this mode forces EXT service chain and no ARP mode
150 # Destination MAC for each port is set to the other (peer) port MAC.
151 # VLAN tagging is defined by 'vlans' & 'vlan_tagging' properties.
152 # Can be overriden by --l2-loopback (including vlan tagging spec).
153 l2_loopback: false
154 # No assumption is made about the loop implementation.
155 # Multiple L2 vlan tagged service chains are allowed,
156 # the vlan ID lists' size must be at least service_chain_count.
157 # If not vlan tagging, the service chain count is forced to 1.
158
159 # Resources created by NFVbench will not be removed
160 # Can be overriden by --no-cleanup
161 no_cleanup: false
162
163 # Configuration for traffic generator
164 traffic_generator:
165     # Name of the traffic generator, only for informational purposes
166     host_name: 'nfvbench_tg'
167     # this is the default traffic generator profile to use
168     # the name must be defined under generator_profile
169     # you can override the traffic generator to use using the
170     # -g or --traffic-gen option at the command line
171     default_profile: trex-local
172
173     # IP addresses for L3 traffic.
174     # This section describes the addresses to use to fill in the UDP packets sent by the
175     # traffic generator. If you VNFs are L2 forwarders, these fields below do not need to change.
176     # If your VNFs are L3 routers, the fields below must match the static routes in your VNFs
177     # so that UDP packets can be routed back to the peer port of the traffic generator.
178
179     # All of the IPs are used as base for IP sequence computed based on chain or flow count.
180     # (sim-devices-left)---(tg-gateway-left)---(vnf-left)- ...
181     #                                      -(vnf-right)---(tg-gateway-right)---(sim-devices-right)
182     #
183     # `ip_addrs` base IPs used as src and dst in packet header, quantity depends on flow count
184     #            these are used for addressing virtual devices simulated by the traffic generator
185     #            and be a different subnet than tg_gateway_ip_addrs and gateway_ip_addrs
186     # `ip_addrs_step`: step for generating IP sequence. Use "random" for random patterns, default is 0.0.0.1.
187     ip_addrs: ['10.0.0.0/8', '20.0.0.0/8']
188     ip_addrs_step: 0.0.0.1
189
190     #'ip_src_static': an attribute to precise the state of source IP during the generation of traffic, It indicates whether
191     #                the IP source variate or remain constant. Use True for constant IP and  False for varying IPs.
192     #                default value is  True
193     ip_src_static: True
194
195     # `tg_gateway_ip_addrs` base IP for traffic generator ports in the left and right networks to the VNFs
196     #                       chain count consecutive IP addresses spaced by tg_gateway_ip_addrs_step will be used
197     # `tg_gateway_ip_addrs__step`: step for generating traffic generator gateway sequences. default is 0.0.0.1
198     tg_gateway_ip_addrs: ['192.168.1.100', '192.168.2.100']
199     tg_gateway_ip_cidrs: ['192.168.1.0/24','192.168.2.0/24']
200     tg_gateway_ip_addrs_step: 0.0.0.1
201     # `gateway_ip_addrs`: base IPs of VNF router gateways (left and right), quantity used depends on chain count
202     #                     must correspond to the public IP on the left and right networks
203     #                     for each left-most and right-most VNF of every chain.
204     #                     must be the same subnet but not same IP as tg_gateway_ip_addrs.
205     #                     chain count consecutive IP addresses spaced by gateway_ip_addrs_step will be used
206     # `gateway_ip_addrs_step`: step for generating router gateway sequences. default is 0.0.0.1
207     gateway_ip_addrs: ['192.168.1.1', '192.168.2.1']
208     gateway_ip_addrs_step: 0.0.0.1
209
210     # UDP DEFINED VARIABLES
211     # TRex pick default UDP port (53) but the range of UDP source and destination ports are also
212     # defined from configuration file by using the following attributes:
213     #
214     # `udp_src_port`: the source port for sending UDP traffic, default is picked by TRex (53)
215     # `udp_dst_port`: the destination port for sending UDP traffic, default is picked by TRex (53)
216     # `udp_src_port` and `udp_dst_port` can be defined by a single port or a range. Example:
217     #   udp_src_port: 80
218     #   udp_dst_port: ['1024','65000']
219     # `udp_port_step`: the step between two generated ports, default is equal to '1'
220     #
221     # NOTICE:
222     # Following TRex functionalities, incrementation and decrementation of source port and destination
223     # port values occur simultaneously.
224     # So, in order to reach the highest possible number of packets, it's recommended that the range of source ports
225     # minus the range of destination ports should be different of 1
226     # i.e:  |range[source_port] - range[destination_port]| = 1
227     udp_src_port:
228     udp_dst_port:
229     udp_port_step: '1'
230
231     # VxLAN only: optionally specify what VLAN tag to use for the VxLAN overlay
232     # This is used if the vxlan tunnels are running on a specific VLAN.
233     # Leave empty if there is no VLAN tagging required, or specify the VLAN id to use
234     # for all VxLAN tunneled traffic
235     vtep_vlan:
236     # VxLAN and MPLS only: local/source vteps IP addresses for port 0 and 1 ['10.1.1.230', '10.1.1.231']
237     src_vteps:
238     # VxLAN only: remote IP address of the remote VTEPs that terminate all tunnels originating from local VTEPs
239     dst_vtep:
240     # The encapsulated L3/MPLS packet needs to traverse L3 or MPLS fabric to reach to its final dst_vtep.
241     # This parameter is required to resolve first next-hop MAC address if it next-hop is not its final dst_vtep.
242     # This parameter is mandatory for MPLS only
243     vtep_gateway_ips:
244     # L2 ADDRESSING OF UDP PACKETS
245     # Lists of dest MAC addresses to use on each traffic generator port (one dest MAC per chain)
246     # Leave empty for PVP, PVVP, EXT with ARP
247     # Only used when `service_chain` is EXT and `no_arp` is true.
248     #   - If both lists are empty the far end MAC of the traffic generator will be used for left and right
249     #     (this is typicaly used to loop back on the first hop switch or using a loopback cable)
250     #   - The length of each list must match the number of chains being used!
251     #   - The index of each list must correspond to the chain index to ensure proper pairing.
252     #   - Below is an example of using two chains:
253     #     - mac_addrs_left: ['00:00:00:00:01:00', '00:00:00:00:02:00']
254     #     - mac_addrs_right: ['00:00:00:00:01:01', '00:00:00:00:02:01']
255     #     UDP packets sent on port 0 will use dest MAC '00:00:00:00:01:00' for chain #0 and
256     #                                         dest MAC '00:00:00:00:02:00' for chain #1
257     #     UDP packets sent on port 1 will use dest MAC '00:00:00:00:01:01' for chain #0 and
258     #                                         dest MAC '00:00:00:00:02:01' for chain #1
259     #     It is expected that the looping device (L2 forwarder) will rewrite the src and dst MAC
260     #     of the looping UDP packet so that it can reach back to the peer port of the traffic
261     #     generator.
262     #
263     mac_addrs_left:
264     mac_addrs_right:
265
266     # Traffic Generator Profiles
267     # In case you have multiple testbeds or traffic generators,
268     # you can define one traffic generator profile per testbed/traffic generator.
269     # In most cases you only need to fill in the pci address for the 2 ports used by the
270     # traffic generator and leave all other fields unchanged
271     #
272     # Generator profiles are listed in the following format:
273     # `name`: Traffic generator profile name (use a unique name, no space or special character)
274     #         Do not change this field
275     # `tool`: Traffic generator tool to be used (currently supported is `TRex`).
276     #         Do not change this field
277     # `ip`: IP address of the traffic generator.
278     #       The default loopback address is used when the traffic generator runs on the same host
279     #       as NFVbench.
280     # `cores`: Specify the number of cores for running the TRex traffic generator.
281     #          ONLY applies to trex-local.
282     # `software_mode`: Advice TRex to use software mode which provides the best compability. But
283     #                  note that TRex will not use any hardware acceleration technology under
284     #                  software mode, therefore the performance of TRex will be significantly
285     #                  lower. ONLY applies to trex-local.
286     #                  Recommended to leave the default value (false)
287     # `limit_memory`: Specify the memory reserved for running the TRex traffic generator (in MB). Limit the amount
288     #                 of packet memory used. (Passed to dpdk as -m arg)
289     #          ONLY applies to trex-local.
290     # `zmq_pub_port`: Specify the ZMQ pub port number for the TRex traffic generator instance (default value is 4500).
291     #          ONLY applies to trex-local.
292     # `zmq_rpc_port`: Specify the ZMQ rpc port for the TRex traffic generator instance (default value is 4501).
293     #          ONLY applies to trex-local.
294     # `interfaces`: Configuration of traffic generator interfaces.
295     # `interfaces.port`: The port of the traffic generator to be used (leave as 0 and 1 resp.)
296     # `interfaces.switch_port`: Leave empty (deprecated)
297     # `interfaces.pci`: The PCI address of the intel NIC interface associated to this port
298     #                   This field is required and cannot be empty
299     #                   Use lspci to list the PCI address of all devices
300     #                   Example of value: "0000:5e:00.0"
301     # `intf_speed`: The speed of the interfaces used by the traffic generator (per direction).
302     #               Empty value (default) to use the speed discovered by the traffic generator.
303     #               Recommended to leave this field empty.
304     #               Do not use unless you want to override the speed discovered by the
305     #               traffic generator. Expected format: 10Gbps
306     #
307     # `platform`: Optional. Used to tune the performance and allocate the cores to the right NUMA.
308     #             See https://trex-tgn.cisco.com/trex/doc/trex_manual.html (6.2.3. Platform section configuration)
309     #             for more details
310     # `platform.master_thread_id`: Hardware thread_id for control thread. (Valid value is mandatory if platform property is set)
311     # `platform.latency_thread_id`: Hardware thread_id for RX thread. (Valid value is mandatory if platform property is set)
312     # `platform.dual_if`: Section defines info for interface pairs (according to the order in “interfaces” list). (Valid value is mandatory if platform property is set)
313     #                     Each section, starting with “- socket” defines info for different interface pair. (Valid value is mandatory if platform property is set)
314     # `platform.dual_if.socket`: The NUMA node from which memory will be allocated for use by the interface pair. (Valid value is mandatory if platform property is set)
315     # `platform.dual_if.threads`: Hardware threads to be used for sending packets for the interface pair. (Valid value is mandatory if platform property is set)
316     #                     Threads are pinned to cores, so specifying threads actually determines the hardware cores.
317     # Example of values:
318     # platform:
319     #   master_thread_id: 0
320     #   latency_thread_id: 2
321     #   dual_if:
322     #     - socket: 0
323     #       threads: [1]
324     #
325     generator_profile:
326         - name: trex-local
327           tool: TRex
328           ip: 127.0.0.1
329           cores: 4
330           software_mode: false
331           limit_memory: 1024
332           zmq_pub_port: 4500
333           zmq_rpc_port: 4501
334           interfaces:
335             - port: 0
336               pci:
337               switch_port:
338             - port: 1
339               pci:
340               switch_port:
341           intf_speed:
342           platform:
343             master_thread_id:
344             latency_thread_id:
345             dual_if:
346               - socket:
347                 threads:
348
349 # Use 'true' to force restart of local TRex server before next run
350 # TRex local server will be restarted even if restart property is false in case of generator config changes between runs
351 restart: false
352
353 # Simpler override for trex core count and mbuf multilier factor
354 # if empty defaults to the one specified in generator_profile.cores
355 cores:
356
357 # Simpler override for the interface speed
358 # if empty, the current generator_profile.intf_speed parameter applies
359 # if value = 'auto' the auto-detection is forced
360 intf_speed:
361
362 # 'cores' and 'intf_speed' parameters can be overriden themselves
363 # by respective options --cores and --intf-speed on the command-line.
364
365 # By default, the real ports line rate is detected and used as
366 # the reference for computing the theoretical maximum traffic load (100%).
367 # Note that specifying 'intf_speed' allows to artificially lower this
368 # reference while not modifying the actual transmission bit rate.
369
370 # The values of the following parameters are ignored on entry
371 # they are defined here in order to appear in the reported configuration.
372 # They will reflect the value active at run-time (after overriding or detection)
373 cores_used:
374 intf_speed_used:
375 intf_speed_detected:
376
377 # A cache size value is passed to the TRex field engine (FE) at packet generation.
378 # Can be overridden by --cache-size
379 # More information for TRex performance:
380 # https://trex-tgn.cisco.com/trex/doc/trex_stateless.html#_tutorial_field_engine_significantly_improve_performance
381 # If cache_size = 0 (or empty): no cache will be used by TRex (default)
382 # If cache_size < 0: cache_size will be set to flow count value
383 cache_size: 0
384 # The cache size is actually limited by the number of 64B mbufs configured in the trex platform configuration (see Trex manual 6.2.2. Memory section configuration)
385 # Note that the resulting value is finally capped to 10000, whatever the requested size is (by design limitation).
386
387 # Specification of the TRex behaviour dealing with the i40e network card driver issue: Trex-528
388 #   see https://trex-tgn.cisco.com/youtrack/issue/trex-528
389 #       This issue states that if other ports, in the same card,
390 #       are in kernel mode, they could impair traffic counting.      
391 # Can be overridden by --i40e-mixed
392 # Values can be:
393 #  ignore - don't consider the case (default)
394 #  exit   - should the case arise, exit (TRex default behaviour)
395 #  unbind - unbind kernel bound ports (the former NFVbench behaviour)
396 # The 'ignore' option might be OK as soon as the issue has been fixed in the driver.
397 # The 'unbind' option should not be used! who knows the current use of other ports?
398 i40e_mixed:
399
400 # Trex will use 1 x 64B mbuf per pre-built cached packet, assuming 1 pre-built cached packet per flow, it means for very large number of flows, the number of configured mbuf_64 will need to be set accordingly.
401 mbuf_64:
402
403 # mbuffer ratio to use for TRex (see TRex documentation for more details)
404 mbuf_factor: 0.2
405
406 # A switch to disable hdrh
407 # hdrh is enabled by default and requires TRex v2.58 or higher
408 disable_hdrh: false
409
410 # List of latency percentiles values returned using hdrh
411 # elements should be int or float between 0.0 and 100.0
412 lat_percentiles: [25, 75, 99]
413
414 # -----------------------------------------------------------------------------
415 # These variables are not likely to be changed
416
417 # Number of seconds to wait for VMs to pass traffic in both directions
418 check_traffic_time_sec: 200
419
420 # General retry count
421 generic_retry_count: 100
422
423 # General poll period
424 generic_poll_sec: 2
425
426 # name of the loop VM
427 loop_vm_name: 'nfvbench-loop-vm'
428
429 # Default names, subnets and CIDRs for PVP/PVVP networks (OpenStack only)
430 #
431 # If a network with given name already exists it will be reused.
432 # - PVP only uses left and right
433 # - PVVP uses left, middle and right
434 # - for EXT chains, this structure is not relevant - refer to external_networks
435 # Otherwise a new internal network will be created with that name, subnet and CIDR.
436 #
437 # network_type must be 'vlan' (for VLAN and SRIOV) or 'vxlan' (for VxLAN)
438 #              all 3 networks must use the same network type in this release
439 # segmentation_id can be set to enforce a specific segmentation id (vlan ID or VNI if vxlan)
440 #                 by default (empty) the segmentation id will be assigned by Neutron.
441 #                 If specified, it must be unique for each network
442 #                 For multi-chaining, see notes below
443 # physical_network can be set to pick a specific phsyical network - by default (empty) the
444 #                   default physical network will be picked
445 # SR-IOV: both physical_network and VLAN segmentation ID must be provided
446 # VxLAN: the VNI must generally be provided (except special Neutron VxLAN implementations)
447 #
448 # For example to setup 1xPVP using 2 different SR-IOV ports, you must put the appropriate physnet
449 # names under left.physical_network and right.physical_network.
450 # For multi-chaining and non shared networks,
451 # Example of override configuration to force PVP to run on 2 SRIOV ports (phys_sriov0 and phys_sriov1)
452 # using VLAN ID 2000 and 2001:
453 # internal_networks:
454 #    left:
455 #        segmentation_id: 2000
456 #        physical_network: phys_sriov0
457 #    right:
458 #        segmentation_id: 2001
459 #        physical_network: phys_sriov1
460 #
461 # For multi-chaining and non shared network mode (VLAN, SRIOV, VxLAN, MPLS):
462 # - the segmentation_id field if provided must be a list of values (as many as chains)
463 # - segmentation_id auto-indexing:
464 #   the segmentation_id field can also be a single value that represents the base value from which
465 #   values for each chain is derived using the chain ID as an offset. For example
466 #   if 2000 is specified, NFVbench will use 2000 for chain 0, 2001 for chain 1 etc...
467 #   The ranges of all the networks must not overlap.
468 # - the physical_network can be a single name (all VFs to be allocated on same physnet)
469 #   of a list of physnet names to use different PFs
470 #
471 #   Example of 2-chain VLAN configuration:
472 #   internal_networks:
473 #      left:
474 #          segmentation_id: [2000, 2001]
475 #          physical_network: phys_sriov0
476 #      right:
477 #          segmentation_id: [2010, 2011]
478 #          physical_network: phys_sriov1
479 #   Equivalent to (using auto-indexing):
480 #   internal_networks:
481 #      left:
482 #          segmentation_id: 2000
483 #          physical_network: phys_sriov0
484 #      right:
485 #          segmentation_id: 2010
486 #          physical_network: phys_sriov1
487 #
488 # - mpls_transport_labels is used only when MPLS encapsulation is enabled (mpls: true)
489 #   this parameter doesn't support auto-indexing because this is not a typical scenario
490 #   expected the list of values in a range 256-1048575, one value per chain is expected
491 #
492 #   In the bellow configuration example 'segmentation_id; contains the inner MPLS label for each chain
493 #   and 'mpls_transport_labels' contains the outer transport MPLS label for each chain
494 #   Example of 2-chain MPLS configuration:
495 #   internal_networks:
496 #      left:
497 #          network_type: mpls
498 #          segmentation_id: [2000, 2001]
499 #          mpls_transport_labels: [10000, 10000]
500 #          physical_network: phys_sriov0
501 #      right:
502 #          network_type: mpls
503 #          segmentation_id: [2010, 2011]
504 #          mpls_transport_labels: [11000, 11000]
505 #          physical_network: phys_sriov1
506
507
508 internal_networks:
509     left:
510         name: 'nfvbench-lnet'
511         subnet: 'nfvbench-lsubnet'
512         cidr: '192.168.1.0/24'
513         network_type: 'vlan'
514         segmentation_id:
515         physical_network:
516         mpls_transport_labels:
517     right:
518         name: 'nfvbench-rnet'
519         subnet: 'nfvbench-rsubnet'
520         cidr: '192.168.2.0/24'
521         network_type: 'vlan'
522         segmentation_id:
523         physical_network:
524         mpls_transport_labels:
525     middle:
526         name: 'nfvbench-mnet'
527         subnet: 'nfvbench-msubnet'
528         cidr: '192.168.3.0/24'
529         network_type: 'vlan'
530         segmentation_id:
531         physical_network:
532         mpls_transport_labels:
533
534 # IDLE INTERFACES: PVP, PVVP and non shared net only.
535 # By default each test VM will have 2 virtual interfaces for looping traffic.
536 # If service_chain_shared_net is false, additional virtual interfaces can be
537 # added at VM creation time, these interfaces will not carry any traffic and
538 # can be used to test the impact of idle interfaces in the overall performance.
539 # All these idle interfaces will use normal ports (not direct).
540 # Number of idle interfaces per VM (none by default)
541 idle_interfaces_per_vm: 0
542
543 # A new network is created for each idle interface.
544 # If service_chain_shared_net is true, the options below will be ignored
545 # and no idle interfaces will be added.
546 idle_networks:
547     # Prefix for all idle networks, the final name will append the chain ID and idle index
548     # e.g. "nfvbench-idle-net.0.4" chain 0 idle index 4
549     name: 'nfvbench-idle-net'
550     # Subnet name to use for all idle subnetworks
551     subnet: 'nfvbench-idle-subnet'
552     # CIDR to use for all idle networks (value should not matter)
553     cidr: '192.169.1.0/24'
554     # Type of network associated to the idle virtual interfaces (vlan or vxlan)
555     network_type: 'vlan'
556     # segmentation ID to use for the network attached to the idle virtual interfaces
557     # vlan: leave empty to let neutron pick the segmentation ID
558     # vxlan: must specify the starting VNI value to be used (cannot be empty)
559     # Note that NFVbench will use as many consecutive segmentation IDs as needed.
560     # For example, for 4 PVP chains and 8 idle
561     # interfaces per VM, NFVbench will use 32 consecutive values of segmentation ID
562     # starting from the value provided.
563     segmentation_id:
564     # physnet name to use for all idle interfaces
565     physical_network:
566
567 # MANAGEMENT INTERFACE
568 # By default each test VM will have 2 virtual interfaces for looping traffic.
569 # If use_management_port is true, additional virtual interface can be
570 # added at VM creation time, this interface will be used for VM management over SSH.
571 # This will be helpful for debug (forwarder config, capture traffic...)
572 # or to emulate VNF with management interface
573 use_management_port: false
574
575 # If a network with given name already exists it will be reused.
576 # Otherwise a new network is created for management interface.
577 # If use_management_port is false, the options below will be ignored
578 # and no management interface will be added.
579 management_network:
580     name: 'nfvbench-management-net'
581     # Subnet name to use for management subnetwork
582     subnet: 'nfvbench-management-subnet'
583     # CIDR to use for management network
584     cidr: '192.168.0.0/24'
585     gateway: '192.168.0.254'
586     # Type of network associated to the management virtual interface (vlan or vxlan)
587     network_type: 'vlan'
588     # segmentation ID to use for the network attached to the management virtual interface
589     # vlan: leave empty to let neutron pick the segmentation ID
590     # vxlan: must specify the starting VNI value to be used (cannot be empty)
591     segmentation_id:
592     # physnet name to use for all idle interfaces
593     physical_network:
594
595 # Floating IP for management interface
596 # If use_floating_ip is true, floating IP will be set on management interface port
597 # One floating IP by loop VM will be used (floating ips are often limited,
598 # use them on limited context mainly for debug). If there are 10 PVP chains, this will require 10
599 # floating IPs. If 10 PVVP chains, it will require 20 floating IPs
600 use_floating_ip: false
601
602 # If a network with given name already exists it will be reused.
603 # Set same name as management_network if you want to use a floating IP from this network
604 # Otherwise set name, subnet and CIDR information from your floating IP pool network
605 # Floating network used to set floating IP on management port.
606 # Only 1 floating network will be used for all VMs and chains (shared network).
607 # If use_floating_ip is false, the options below will be ignored
608 # and no floating IP will be added.
609 floating_network:
610     name: 'nfvbench-floating-net'
611     # Subnet name to use for floating subnetwork
612     subnet: 'nfvbench-floating-subnet'
613     # CIDR to use for floating network
614     cidr: '192.168.0.0/24'
615     # Type of network associated to the management virtual interface (vlan or vxlan)
616     network_type: 'vlan'
617     # segmentation ID to use for the network attached to the management virtual interface
618     # vlan: leave empty to let neutron pick the segmentation ID
619     # vxlan: must specify the starting VNI value to be used (cannot be empty)
620     segmentation_id:
621     # physnet name to use for all idle interfaces
622     physical_network:
623
624 # In the scenario of PVVP + SRIOV, there is choice of how the traffic will be
625 # handled in the middle network. The default (false) will use vswitch, while
626 # SRIOV can be used by toggling below setting.
627 use_sriov_middle_net: false
628
629 # EXT chain only. Prefix names of edge networks or list of edge network names
630 # used to send traffic via traffic generator.
631 #
632 # If service_chain_shared_net is true, the left and right networks must pre-exist and match exactly by name.
633 #
634 # If service_chain_shared_net is false, each chain must have its own pre-existing left and right networks.
635 # left and right can take either a string prefix or a list of arbitrary network names
636 # If a string prefix is passed, an index will be appended to each network name to form the final name.
637 # Example:
638 # external_networks:
639 #    left:  'ext-lnet'
640 #    right: 'ext-rnet'
641 # ext-lnet0 ext-rnet0 for chain #0
642 # ext-lnet1 ext-rnet1 for chain #1
643 # etc...
644 # If a list of strings is passed, each string in the list must be the name of the network used for the
645 # chain indexed by the entry position in the list.
646 # The list must have at least as many entries as there are chains
647 # Example:
648 # external_networks:
649 #   left:  ['ext-lnet', 'ext-lnet2']
650 #   right: ['ext-rnet', 'ext-rnet2']
651 #
652 external_networks:
653     left:
654     right:
655
656 # PVP with L3 router in the packet path only.
657 # Only use when l3_router option is True (see l3_router)
658 # Prefix names of edge networks which will be used to send traffic via traffic generator.
659 # If a network with given name already exists it will be reused.
660 # Otherwise a new edge network will be created with that name, subnet and CIDR.
661 #
662 # gateway can be set in case of L3 traffic with edge networks - refer to edge_networks
663 #
664 # segmentation_id can be set to enforce a specific VLAN id - by default (empty) the VLAN id
665 #                 will be assigned by Neutron.
666 #                 Must be unique for each network
667 # physical_network can be set to pick a specific phsyical network - by default (empty) the
668 #                   default physical network will be picked
669 #
670 edge_networks:
671     left:
672         name: 'nfvbench-net2'
673         router_name: 'router_left'
674         subnet: 'nfvbench-subnet2'
675         cidr: '192.168.3.0/24'
676         gateway:
677         network_type:
678         segmentation_id:
679         physical_network:
680     right:
681         name: 'nfvbench-net3'
682         router_name: 'router_right'
683         subnet: 'nfvbench-subnet3'
684         cidr: '192.168.4.0/24'
685         gateway:
686         network_type:
687         segmentation_id:
688         physical_network:
689
690 # Use 'true' to enable VXLAN encapsulation support and sent by the traffic generator
691 # When this option enabled internal networks 'network type' parameter value should be 'vxlan'
692 # VxLAN and MPLS encapsulations are mutual exclusive if 'vxlan' is true then 'mpls' should be false
693 # and vise versa
694 vxlan: false
695 # Use 'true' to enable MPLS encapsulation support and sent by the traffic generator
696 # When this option enabled internal networks 'network type' parameter value should be 'mpls'
697 # MPLS and VxLAN encapsulations are mutual exclusive if 'mpls' is 'true' then 'vxlan' should be set to 'false'
698 # and vise versa. no_flow_stats, no_latency_stats, no_latency_streams should be set to 'true' because these
699 # features are not supported at the moment. In future when these features will be supported they will require
700 # special NIC hardware. Only 2 label stack supported at the moment where one label is transport and another
701 # is VPN for more details please refer to 'mpls_transport_labels' and 'segmentation_id' in networks configuration
702 mpls: false
703 # Use 'true' to enable VLAN tagging of packets generated and sent by the traffic generator
704 # Leave empty or set to false if you do not want the traffic generator to insert the VLAN tag (this is
705 # needed for example if VLAN tagging is enabled on switch (access mode) or if you want to hook
706 # directly to a NIC).
707 # By default is set to true (which is the nominal use case with TOR and trunk mode to Trex ports)
708 # If VxLAN or MPLS are enabled, this option should be set to false (vlan tagging for encapsulated packets
709 # is not supported). Use the vtep_vlan option to enable vlan tagging for the VxLAN overlay network.
710 vlan_tagging: true
711
712 # Used only in the case of EXT chain and no OpenStack or not admin access to specify the VLAN IDs to use.
713 # This property is ignored when OpenStack is used or when 'vlan_tagging' is disabled.
714 # If OpenStack is used leave the list empty, VLAN IDs are retrieved from OpenStack networks using Neutron API.
715 # If networks are shared across all chains (service_chain_shared_net=true), the list should have exactly 2 values
716 # If networks are not shared across chains (service_chain_shared_net=false), the list should have
717 # 2 list of vlan IDs
718 # Examples:
719 #   [1998, 1999] left network uses vlan 1998 right network uses vlan 1999
720 #   [[1,2],[3,4]] chain 0 left vlan 1, right vlan 2 - chain 1 left vlan 3 right vlan 4
721 #   [1010, 1010] same vlan ID on both sides, for a typical l2-loopback test (*)
722 # The vlan lists may be oversized, compared to the actual service chain count
723 # (lowest indexes are used) but an exception is raised if they are too short.
724 vlans: []
725 # (*) actually there is no restriction, left/right IDs may differ
726 #     for some exotic purpose - see also the l2_loopback parameter.
727
728 # ARP is used to discover the MAC address of VNFs that run L3 routing.
729 # Used only with EXT chain.
730 # False (default): ARP requests are sent to find out dest MAC addresses.
731 # True: do not send ARP but use provisioned dest macs instead
732 #       (see mac_addrs_left and mac_addrs_right)
733 no_arp: false
734
735 # Loop VM (VPP forwarder) can use ARP to discover next hop mac address
736 # False (default): do not send ARP but use static config devices macs instead (TRex gratuitous ARP are not interpreted by VPP)
737 # True: ARP requests are sent to find out next hop MAC addresses (for instance SDN-GW)
738 loop_vm_arp: false
739
740 # Traffic Profiles
741 # You can add here more profiles as needed
742 # `l2frame_size` can be specified in any none zero integer value to represent the size in bytes
743 # of the L2 frame, or "IMIX" to represent the standard 3-packet size mixed sequence (IMIX1).
744 traffic_profile:
745     - name: traffic_profile_64B
746       l2frame_size: ['64']
747     - name: traffic_profile_IMIX
748       l2frame_size: ['IMIX']
749     - name: traffic_profile_1518B
750       l2frame_size: ['1518']
751     - name: traffic_profile_3sizes
752       l2frame_size: ['64', 'IMIX', '1518']
753
754 # Traffic Configuration
755 # bidirectional: to have traffic generated from both direction, set bidirectional to true
756 # profile: must be one of the profiles defined in traffic_profile
757 # The traffic profile can be overriden with the options --frame-size and --uni-dir
758 traffic:
759     bidirectional: true
760     profile: traffic_profile_64B
761
762 # Check config and connectivity only - do not generate traffic
763 # Can be overriden by --no-traffic
764 no_traffic: false
765
766 # Use an L3 router in the packet path. This option if set will create or reuse an OpenStack neutron
767 # router (PVP, PVVP) or reuse an existing L3 router (EXT) to route traffic to the destination VM.
768 # Can be overriden by --l3-router
769 l3_router: false
770
771 # If l3_router is true and depending on ARP stale time SUT configuration
772 # Gratuitous ARP (GARP) from TG port to the router is needed to keep traffic up
773 # Default value: 1 packet per second
774 # This value needs to be defined inferior to SUT ARP stale time to avoid GARP packets drop
775 # in case of high load traffic
776 periodic_gratuitous_arp: false
777 gratuitous_arp_pps: 1
778
779 # Test configuration
780
781 # The rate pps for traffic going in reverse direction in case of unidirectional flow. Default to 1.
782 unidir_reverse_traffic_pps: 1
783
784 # The rate specifies if NFVbench should determine the NDR/PDR
785 #  or if NFVbench should just generate traffic at a given fixed rate
786 # for a given duration (called "single run" mode)
787 # Supported rate format:
788 # NDR/PDR test: `ndr`, `pdr`, `ndr_pdr` (default)
789 # Or for single run mode:
790 # Packet per second: pps (e.g. `50pps`)
791 # Bits per second: bps, kbps, Mbps, etc (e.g. `1Gbps`, `1000bps`)
792 # Load percentage: % (e.g. `50%`)
793 # Can be overridden by --rate
794 rate: ndr_pdr
795
796 # Default run duration (single run at given rate only)
797 # Can be overridden by --duration
798 duration_sec: 60
799
800 # Interval between intermediate reports when interval reporting is enabled
801 # Can be overridden by --interval
802 interval_sec: 10
803
804 # Default pause between iterations of a binary search (NDR/PDR)
805 pause_sec: 2
806
807 # NDR / PDR configuration
808 measurement:
809     # Drop rates represent the ratio of dropped packet to the total number of packets sent.
810     # Values provided here are percentages. A value of 0.01 means that at most 0.01% of all
811     # packets sent are dropped (or 1 packet every 10,000 packets sent)
812
813     # No Drop Rate in percentage; Default to 0.001%
814     NDR: 0.001
815     # Partial Drop Rate in percentage; NDR should always be less than PDR
816     PDR: 0.1
817     # The accuracy of NDR and PDR as a percnetage of line rate; The exact NDR
818     # or PDR should be within `load_epsilon` line rate % from the one calculated.
819     # For example, with a value 0.1, and a line rate of 10Gbps, the accuracy
820     # of NDR and PDR will be within 0.1% Of 10Gbps or 10Mbps.
821     # The lower the value the more iterations and the longer it will take to find the NDR/PDR.
822     # In practice, due to the precision of the traffic generator it is not recommended to
823     # set it to lower than 0.1
824     load_epsilon: 0.1
825
826 # Location where to store results in a JSON format. Must be container specific path.
827 # Can be overriden by --json
828 json:
829
830 # Location where to store results in the NFVbench standard JSON format:
831 # <service-chain-type>-<service-chain-count>-<flow-count>-<packet-sizes>.json
832 # Example: PVP-1-10-64-IMIX.json
833 # Must be container specific path.
834 # Can be overriden by --std-json
835 std_json:
836
837 # Prints debug messages (verbose mode)
838 # Can be overriden by --debug
839 debug: false
840
841 # Set to a valid path name if logging to file is to be enabled
842 # Defaults to disabled
843 log_file:
844
845 # One can specify a user ID for changing ownership of output log/json files
846 #   - empty: depends on file existency
847 #     . yes? replacement, owner is unchanged
848 #     . no ? creation with root as user
849 #   - 0: this is the root user ID
850 #   - other: will corresponds (or not) to an existing user/group in the host
851 #            (the current user ID can be obtained with the command 'id -u')
852 # Can be overriden by --user-id
853 # Consider also that the default value below is overridable by a USER_ID env variable,
854 # if nfvbench is run into a container, this information can be passed at its creation.
855 # The overall precedence rule is: 'default_config (this) < env < config < command_line'
856 user_id:
857
858 # Similarly, the group ID is defined
859 # Can be overriden by --group-id
860 # Default may be set through env GROUP_ID
861 # Caveat: user and group with a same name may have different numerical IDs
862 #         (the current group ID can be obtained with the command 'id -g')
863 group_id:
864
865 # When enabled, all results and/or logs will be sent to a fluentd servers at the requested IPs and ports
866 # A list of one or more fluentd servers identified by their IPs and  port numbers should be given.
867 # For each recipient it is possible to enable both sending logs and performance
868 # results, or enable either logs or performance results. For enabling logs or results logging_tag or
869 # result_tag should be set.
870
871 fluentd:
872       # by default (logging_tag is empty) nfvbench log messages are not sent to fluentd
873       # to enable logging to fluents, specify a valid fluentd tag name to be used for the
874       # log records
875     - logging_tag:
876
877       # by default (result_tag is empty) nfvbench results are not sent to fluentd
878       # to enable sending nfvbench results to fluentd, specify a valid fluentd tag name
879       # to be used for the results records, which is different than logging_tag
880       result_tag:
881
882       # IP address of the server, defaults to loopback
883       ip: 127.0.0.1
884
885       # port # to use, by default, use the default fluentd forward port
886       port: 24224
887
888       # by default (logging_tag is empty) nfvbench log messages are not sent to fluentd
889       # to enable logging to fluents, specify a valid fluentd tag name to be used for the
890       # log records
891
892 # Module and class name of factory which will be used to provide classes dynamically for other components.
893 factory_module: 'nfvbench.factory'
894 factory_class: 'BasicFactory'
895
896 # Custom label added for every perf record generated during this run.
897 # Can be overriden by --user-label
898 user_label:
899
900 # Custom information to be passed to results post-processing,
901 # they will be included as is in the json report 'config' branch.
902 # Useful for documenting or automating further treatments.
903 # The value is any yaml object (=> open usage) - example:
904 # |user_info:
905 # |    status: explore
906 # |    description:
907 # |        generator: VM
908 # |        attachment: direct
909 # |        target: lab-pf
910 # |        switch: qfx3500
911 # Keys may be merged/overriden using the --user-info command line option
912 # (the command-line parameter value is expressed as a json object string)
913 user_info:
914
915
916 # THESE FIELDS SHOULD BE USED VERY RARELY OR ON PURPOSE
917
918 # Skip vswitch configuration and retrieving of stats
919 # Can be overriden by --no-vswitch-access
920 # Should be left to the default value (false)
921 no_vswitch_access: false
922
923 # Enable service mode for trafic capture from TRex console (for debugging purpose)
924 # Can be overriden by --service-mode
925 # Should be left to the default value (false)
926 service_mode: false
927
928 # Disable extra flow stats (on high load traffic)
929 # Can be overriden by --no-flow-stats
930 # Should be left to the default value (false)
931 no_flow_stats: false
932
933 # Disable flow stats for latency traffic
934 # Can be overriden by --no-latency-stats
935 # Should be left to the default value (false)
936 no_latency_stats: false
937
938 # Disable latency measurements (no streams)
939 # Can be overriden by --no-latency-streams
940 # Should be left to the default value (false)
941 no_latency_streams: false
942
943 # Skip "end to end" connectivity check on traffic setup
944 # Can be overriden by --no-e2e-check
945 # Should be left to the default value (false)
946 # This flag is usable for traffic generation only
947 no_e2e_check: false
948
949 # General purpose register (debugging flags)
950 # Can be overriden by --debug-mask
951 # Designed for development needs
952 # The hexadecimal notation (0x...) is accepted.
953 debug_mask: 0x00000000