NFVBENCH-117 Streamline VxLAN vni config and use auto-indexing
[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 openrc_file:
29
30 # Forwarder to use in nfvbenchvm image. Available options: ['vpp', 'testpmd']
31 vm_forwarder: testpmd
32
33 # By default (empty) NFVbench will try to locate a VM image file
34 # from the package root directory named "nfvbench-<version>.qcow2" and
35 # upload that file. The image name will be "nfvbench-<version>"
36 # This can be overridden by specifying here a pathname of a file
37 # that follows the same naming convention.
38 # In most cases, this field should be left empty as the packaging should
39 # include the proper VM image file
40 vm_image_file:
41
42 # Name of the flavor to use for the loopback VMs
43 #
44 # If the provided name is an exact match to a flavor name known by OpenStack
45 # (as shown from 'nova flavor-list'), that flavor will be reused.
46 # Otherwise, a new flavor will be created with attributes listed below.
47 flavor_type: 'nfvbench.medium'
48
49 # Custom flavor attributes
50 flavor:
51   # Number of vCPUs for the flavor
52   vcpus: 2
53   # Memory for the flavor in MB
54   ram: 4096
55   # Size of local disk in GB
56   disk: 0
57   # metadata are supported and can be added if needed, optional
58   # note that if your openstack does not have NUMA optimization
59   # (cpu pinning and huge pages)
60   # you must comment out extra_specs completely otherwise
61   # loopback VM creation will fail
62   extra_specs:
63       "hw:cpu_policy": dedicated
64       "hw:mem_page_size": large
65
66 # Name of the availability zone to use for the test VMs
67 # Must be one of the zones listed by 'nova availability-zone-list'
68 # availability_zone: 'nova'
69 availability_zone:
70 # To force placement on a given hypervisor, set the name here
71 # (if multiple names are provided, the first will be used)
72 # Leave empty to let openstack pick the hypervisor
73 compute_nodes:
74
75 # Type of service chain to run, possible options are PVP, PVVP and EXT
76 # PVP - port to VM to port
77 # PVVP - port to VM to VM to port
78 # EXT - external chain used only for running traffic and checking traffic generator counters,
79 #       all other parts of chain must be configured manually
80 # Can be overriden by --service-chain
81 service_chain: 'PVP'
82
83 # Total number of service chains, every chain has own traffic stream
84 # Can be overriden by --service-chain-count
85 service_chain_count: 1
86
87 # Specifies if all chains share the same right/left/middle networks
88 service_chain_shared_net: false
89
90 # Total number of traffic flows for all chains and directions generated by the traffic generator.
91 # Minimum is '2 * service_chain_count', it is automatically adjusted if too small
92 # value was configured. Must be even.
93 # Every flow has packets with different IPs in headers
94 # Can be overriden by --flow-count
95 flow_count: 10000
96
97 # set to true if service chains should use SRIOV
98 # This requires SRIOV to be available on compute nodes
99 sriov: false
100
101 # Perform port to port loopback (direct or through switch)
102 # Should be used with EXT service chain and no ARP (no_arp: true)
103 # When enabled, the vlans property must contain the same VLAN id for all chains.
104 # Can be overriden by --l2-loopback
105 l2_loopback: false
106
107 # Resources created by NFVbench will not be removed
108 # Can be overriden by --no-cleanup
109 no_cleanup: false
110
111 # Configuration for traffic generator
112 traffic_generator:
113     # Name of the traffic generator, only for informational purposes
114     host_name: 'nfvbench_tg'
115     # this is the default traffic generator profile to use
116     # the name must be defined under generator_profile
117     # you can override the traffic generator to use using the
118     # -g or --traffic-gen option at the command line
119     default_profile: trex-local
120
121     # IP addresses for L3 traffic.
122     # This section describes the addresses to use to fill in the UDP packets sent by the
123     # traffic generator. If you VNFs are L2 forwarders, these fields below do not need to change.
124     # If your VNFs are L3 routers, the fields below must match the static routes in your VNFs
125     # so that UDP packets can be routed back to the peer port of the traffic generator.
126
127     # All of the IPs are used as base for IP sequence computed based on chain or flow count.
128     # (sim-devices-left)---(tg-gateway-left)---(vnf-left)- ...
129     #                                      -(vnf-right)---(tg-gateway-right)---(sim-devices-right)
130     #
131     # `ip_addrs` base IPs used as src and dst in packet header, quantity depends on flow count
132     #            these are used for addressing virtual devices simulated by the traffic generator
133     #            and be a different subnet than tg_gateway_ip_addrs and gateway_ip_addrs
134     # `ip_addrs_step`: step for generating IP sequence. Use "random" for random patterns, default is 0.0.0.1.
135     ip_addrs: ['10.0.0.0/8', '20.0.0.0/8']
136     ip_addrs_step: 0.0.0.1
137     # `tg_gateway_ip_addrs` base IP for traffic generator ports in the left and right networks to the VNFs
138     #                       chain count consecutive IP addresses spaced by tg_gateway_ip_addrs_step will be used
139     # `tg_gateway_ip_addrs__step`: step for generating traffic generator gateway sequences. default is 0.0.0.1
140     tg_gateway_ip_addrs: ['1.1.0.100', '2.2.0.100']
141     tg_gateway_ip_addrs_step: 0.0.0.1
142     # `gateway_ip_addrs`: base IPs of VNF router gateways (left and right), quantity used depends on chain count
143     #                     must correspond to the public IP on the left and right networks
144     #                     for each left-most and right-most VNF of every chain.
145     #                     must be the same subnet but not same IP as tg_gateway_ip_addrs.
146     #                     chain count consecutive IP addresses spaced by gateway_ip_addrs_step will be used
147     # `gateway_ip_addrs_step`: step for generating router gateway sequences. default is 0.0.0.1
148     gateway_ip_addrs: ['1.1.0.2', '2.2.0.2']
149     gateway_ip_addrs_step: 0.0.0.1
150     # `udp_src_port`: the source port for sending UDP traffic, default is picked by TRex (53)
151     # `udp_dst_port`: the destination port for sending UDP traffic, default is picked by TRex (53)
152     udp_src_port:
153     udp_dst_port:
154
155     # VxLAN only: optionally specify what VLAN tag to use for the VxLAN overlay
156     # This is used if the vxlan tunnels are running on a specific VLAN.
157     # Leave empty if there is no VLAN tagging required, or specify the VLAN id to use
158     # for all VxLAN tunneled traffic
159     vtep_vlan:
160     # VxLAN only: local/source vteps IP addresses for port 0 and 1 ['10.1.1.230', '10.1.1.231']
161     src_vteps:
162     # VxLAN only: remote IP address of the remote VTEPs that terminate all tunnels originating from local VTEPs
163     dst_vtep:
164
165     # L2 ADDRESSING OF UDP PACKETS
166     # Lists of dest MAC addresses to use on each traffic generator port (one dest MAC per chain)
167     # Leave empty for PVP, PVVP, EXT with ARP
168     # Only used when `service_chain` is EXT and `no_arp` is true.
169     #   - If both lists are empty the far end MAC of the traffic generator will be used for left and right
170     #     (this is typicaly used to loop back on the first hop switch or using a loopback cable)
171     #   - The length of each list must match the number of chains being used!
172     #   - The index of each list must correspond to the chain index to ensure proper pairing.
173     #   - Below is an example of using two chains:
174     #     - mac_addrs_left: ['00:00:00:00:01:00', '00:00:00:00:02:00']
175     #     - mac_addrs_right: ['00:00:00:00:01:01', '00:00:00:00:02:01']
176     #     UDP packets sent on port 0 will use dest MAC '00:00:00:00:01:00' for chain #0 and
177     #                                         dest MAC '00:00:00:00:02:00' for chain #1
178     #     UDP packets sent on port 1 will use dest MAC '00:00:00:00:01:01' for chain #0 and
179     #                                         dest MAC '00:00:00:00:02:01' for chain #1
180     #     It is expected that the looping device (L2 forwarder) will rewrite the src and dst MAC
181     #     of the looping UDP packet so that it can reach back to the peer port of the traffic
182     #     generator.
183     #
184     mac_addrs_left:
185     mac_addrs_right:
186
187     # Traffic Generator Profiles
188     # In case you have multiple testbeds or traffic generators,
189     # you can define one traffic generator profile per testbed/traffic generator.
190     # In most cases you only need to fill in the pci address for the 2 ports used by the
191     # traffic generator and leave all other fields unchanged
192     #
193     # Generator profiles are listed in the following format:
194     # `name`: Traffic generator profile name (use a unique name, no space or special character)
195     #         DFo not change this field
196     # `tool`: Traffic generator tool to be used (currently supported is `TRex`).
197     #         Do not change this field
198     # `ip`: IP address of the traffic generator.
199     #       The default loopback address is used when the traffic generator runs on the same host
200     #       as NFVbench.
201     # `cores`: Specify the number of cores for running the TRex traffic generator.
202     #          ONLY applies to trex-local.
203     # `software_mode`: Advice TRex to use software mode which provides the best compability. But
204     #                  note that TRex will not use any hardware acceleration technology under
205     #                  software mode, therefore the performance of TRex will be significantly
206     #                  lower. ONLY applies to trex-local.
207     #                  Recommended to leave the default value (false)
208     # `interfaces`: Configuration of traffic generator interfaces.
209     # `interfaces.port`: The port of the traffic generator to be used (leave as 0 and 1 resp.)
210     # `interfaces.switch_port`: Leave empty (deprecated)
211     # `interfaces.pci`: The PCI address of the intel NIC interface associated to this port
212     #                   This field is required and cannot be empty
213     #                   Use lspci to list the PCI address of all devices
214     #                   Example of value: "0000:5e:00.0"
215     # `intf_speed`: The speed of the interfaces used by the traffic generator (per direction).
216     #               Empty value (default) to use the speed discovered by the traffic generator.
217     #               Recommended to leave this field empty.
218     #               Do not use unless you want to override the speed discovered by the
219     #               traffic generator. Expected format: 10Gbps
220     #
221     generator_profile:
222         - name: trex-local
223           tool: TRex
224           ip: 127.0.0.1
225           cores: 4
226           software_mode: false
227           interfaces:
228             - port: 0
229               pci:
230               switch_port:
231             - port: 1
232               pci:
233               switch_port:
234           intf_speed:
235
236 # Simpler override for trex core count and mbuf multilier factor
237 # if empty defaults to the one specified in generator_profile.cores
238 cores:
239
240 # mbuffer ratio to use for TRex (see TRex documentation for more details)
241 mbuf_factor: 0.2
242
243 # -----------------------------------------------------------------------------
244 # These variables are not likely to be changed
245
246 # Number of seconds to wait for VMs to pass traffic in both directions
247 check_traffic_time_sec: 200
248
249 # General retry count
250 generic_retry_count: 100
251
252 # General poll period
253 generic_poll_sec: 2
254
255 # name of the loop VM
256 loop_vm_name: 'nfvbench-loop-vm'
257
258 # Default names, subnets and CIDRs for PVP/PVVP networks (openstack only)
259 #
260 # If a network with given name already exists it will be reused.
261 # - PVP only uses left and right
262 # - PVVP uses left, middle and right
263 # - for EXT chains, this structure is not relevant - refer to external_networks
264 # Otherwise a new internal network will be created with that name, subnet and CIDR.
265 #
266 # network_type must be 'vlan' (for VLAN and SRIOV) or 'vxlan' (for VxLAN)
267 #              all 3 networks must use the same network type in this release
268 # segmentation_id can be set to enforce a specific segmentation id (vlan ID or VNI if vxlan)
269 #                 by default (empty) the segmentation id will be assigned by Neutron.
270 #                 If specified, it must be unique for each network
271 #                 For multi-chaining, see notes below
272 # physical_network can be set to pick a specific phsyical network - by default (empty) the
273 #                   default physical network will be picked
274 # SR-IOV: both physical_network and VLAN segmentation ID must be provided
275 # VxLAN: the VNI must generally be provided (except special Neutron VxLAN implementations)
276 #
277 # For example to setup 1xPVP using 2 different SR-IOV ports, you must put the appropriate physnet
278 # names under left.physical_network and right.physical_network.
279 # For multi-chaining and non shared networks,
280 # Example of override configuration to force PVP to run on 2 SRIOV ports (phys_sriov0 and phys_sriov1)
281 # using VLAN ID 2000 and 2001:
282 # internal_networks:
283 #    left:
284 #        segmentation_id: 2000
285 #        physical_network: phys_sriov0
286 #    right:
287 #        segmentation_id: 2001
288 #        physical_network: phys_sriov1
289 #
290 # For multi-chaining and non shared network mode (VLAN, SRIOV, VxLAN):
291 # - the segmentation_id field if provided must be a list of values (as many as chains)
292 # - segmentation_id auto-indexing:
293 #   the segmentation_id field can also be a single value that represents the base value from which
294 #   values for each chain is derived using the chain ID as an offset. For example
295 #   if 2000 is specified, NFVbench will use 2000 for chain 0, 2001 for chain 1 etc...
296 #   The ranges of all the networks must not overlap.
297 # - the physical_network can be a single name (all VFs to be allocated on same physnet)
298 #   of a list of physnet names to use different PFs
299 #
300 # Example of 2-chain configuration:
301 # internal_networks:
302 #    left:
303 #        segmentation_id: [2000, 2001]
304 #        physical_network: phys_sriov0
305 #    right:
306 #        segmentation_id: [2010, 2011]
307 #        physical_network: phys_sriov1
308 #
309 # Equivalent to (using auto-indexing):
310 # internal_networks:
311 #    left:
312 #        segmentation_id: 2000
313 #        physical_network: phys_sriov0
314 #    right:
315 #        segmentation_id: 2010
316 #        physical_network: phys_sriov1
317
318 internal_networks:
319     left:
320         name: 'nfvbench-lnet'
321         subnet: 'nfvbench-lsubnet'
322         cidr: '192.168.1.0/24'
323         network_type: 'vlan'
324         segmentation_id:
325         physical_network:
326     right:
327         name: 'nfvbench-rnet'
328         subnet: 'nfvbench-rsubnet'
329         cidr: '192.168.2.0/24'
330         network_type: 'vlan'
331         segmentation_id:
332         physical_network:
333     middle:
334         name: 'nfvbench-mnet'
335         subnet: 'nfvbench-msubnet'
336         cidr: '192.168.3.0/24'
337         network_type: 'vlan'
338         segmentation_id:
339         physical_network:
340
341 # In the scenario of PVVP + SRIOV, there is choice of how the traffic will be
342 # handled in the middle network. The default (false) will use vswitch, while
343 # SRIOV can be used by toggling below setting.
344 use_sriov_middle_net: false
345
346 # EXT chain only. Prefix names of edge networks which will be used to send traffic via traffic generator.
347 #
348 # If service_chain_shared_net is true, the left and right networks must pre-exist and match exactly by name.
349 #
350 # If service_chain_shared_net is false, each chain must have its own pre-existing left and right networks.
351 # An index will be appended to each network name to form the final name:
352 # ext-lnet0 ext-rnet0 for chain #0
353 # ext-lnet1 ext-rnet1 for chain #1
354 # etc...
355 external_networks:
356     left: 'ext-lnet'
357     right: 'ext-rnet'
358
359 # Use 'true' to enable VXLAN encapsulation support and sent by the traffic generator
360 # When this option enabled internal networks 'network type' parameter value should be 'vxlan'
361 vxlan: false
362
363 # Use 'true' to enable VLAN tagging of packets generated and sent by the traffic generator
364 # Leave empty or set to false if you do not want the traffic generator to insert the VLAN tag (this is
365 # needed for example if VLAN tagging is enabled on switch (access mode) or if you want to hook
366 # directly to a NIC).
367 # By default is set to true (which is the nominal use case with TOR and trunk mode to Trex ports)
368 # If VxLAN is enabled, this option should be set to false (vlan tagging for encapsulated packets
369 # is not supported). Use the vtep_vlan option to enable vlan tagging for the VxLAN overlay network.
370 vlan_tagging: true
371
372 # Used only in the case of EXT chain and no openstack to specify the VLAN IDs to use.
373 # This property is ignored when OpenStakc is used or in the case of l2-loopback.
374 # If OpenStack is used leave the list empty, VLAN IDs are retrieved from OpenStack networks using Neutron API.
375 # If networks are shared across all chains (service_chain_shared_net=true), the list should have exactly 2 values
376 # If networks are not shared across chains (service_chain_shared_net=false), the list should have
377 # 2 list of vlan IDs
378 # In the special case of l2-loopback the list should have the same VLAN id for all chains
379 # Examples:
380 #   [1998, 1999] left network uses vlan 1998 right network uses vlan 1999
381 #   [[1,2],[3,4]] chain 0 left vlan 1, right vlan 2 - chain 1 left vlan 3 right vlan 4
382 #   [1010, 1010] same VLAN id with l2-loopback enabled
383 #
384 vlans: []
385
386 # ARP is used to discover the MAC address of VNFs that run L3 routing.
387 # Used only with EXT chain.
388 # False (default): ARP requests are sent to find out dest MAC addresses.
389 # True: do not send ARP but use provisioned dest macs instead
390 #       (see mac_addrs_left and mac_addrs_right)
391 no_arp: false
392
393 # Traffic Profiles
394 # You can add here more profiles as needed
395 # `l2frame_size` can be specified in any none zero integer value to represent the size in bytes
396 # of the L2 frame, or "IMIX" to represent the standard 3-packet size mixed sequence (IMIX1).
397 traffic_profile:
398     - name: traffic_profile_64B
399       l2frame_size: ['64']
400     - name: traffic_profile_IMIX
401       l2frame_size: ['IMIX']
402     - name: traffic_profile_1518B
403       l2frame_size: ['1518']
404     - name: traffic_profile_3sizes
405       l2frame_size: ['64', 'IMIX', '1518']
406
407 # Traffic Configuration
408 # bidirectional: to have traffic generated from both direction, set bidirectional to true
409 # profile: must be one of the profiles defined in traffic_profile
410 # The traffic profile can be overriden with the options --frame-size and --uni-dir
411 traffic:
412     bidirectional: true
413     profile: traffic_profile_64B
414
415 # Check config and connectivity only - do not generate traffic
416 # Can be overriden by --no-traffic
417 no_traffic: false
418
419 # Test configuration
420
421 # The rate pps for traffic going in reverse direction in case of unidirectional flow. Default to 1.
422 unidir_reverse_traffic_pps: 1
423
424 # The rate specifies if NFVbench should determine the NDR/PDR
425 #  or if NFVbench should just generate traffic at a given fixed rate
426 # for a given duration (called "single run" mode)
427 # Supported rate format:
428 # NDR/PDR test: `ndr`, `pdr`, `ndr_pdr` (default)
429 # Or for single run mode:
430 # Packet per second: pps (e.g. `50pps`)
431 # Bits per second: bps, kbps, Mbps, etc (e.g. `1Gbps`, `1000bps`)
432 # Load percentage: % (e.g. `50%`)
433 # Can be overridden by --rate
434 rate: ndr_pdr
435
436 # Default run duration (single run at given rate only)
437 # Can be overridden by --duration
438 duration_sec: 60
439
440 # Interval between intermediate reports when interval reporting is enabled
441 # Can be overridden by --interval
442 interval_sec: 10
443
444 # Default pause between iterations of a binary search (NDR/PDR)
445 pause_sec: 2
446
447 # NDR / PDR configuration
448 measurement:
449     # Drop rates represent the ratio of dropped packet to the total number of packets sent.
450     # Values provided here are percentages. A value of 0.01 means that at most 0.01% of all
451     # packets sent are dropped (or 1 packet every 10,000 packets sent)
452
453     # No Drop Rate in percentage; Default to 0.001%
454     NDR: 0.001
455     # Partial Drop Rate in percentage; NDR should always be less than PDR
456     PDR: 0.1
457     # The accuracy of NDR and PDR as a percnetage of line rate; The exact NDR
458     # or PDR should be within `load_epsilon` line rate % from the one calculated.
459     # For example, with a value 0.1, and a line rate of 10Gbps, the accuracy
460     # of NDR and PDR will be within 0.1% Of 10Gbps or 10Mbps.
461     # The lower the value the more iterations and the longer it will take to find the NDR/PDR.
462     # In practice, due to the precision of the traffic generator it is not recommended to
463     # set it to lower than 0.1
464     load_epsilon: 0.1
465
466 # Location where to store results in a JSON format. Must be container specific path.
467 # Can be overriden by --json
468 json:
469
470 # Location where to store results in the NFVbench standard JSON format:
471 # <service-chain-type>-<service-chain-count>-<flow-count>-<packet-sizes>.json
472 # Example: PVP-1-10-64-IMIX.json
473 # Must be container specific path.
474 # Can be overriden by --std-json
475 std_json:
476
477 # Prints debug messages (verbose mode)
478 # Can be overriden by --debug
479 debug: false
480
481 # Set to a valid path name if logging to file is to be enabled
482 # Defaults to disabled
483 log_file:
484
485 # When enabled, all results and/or logs will be sent to a fluentd servers at the requested IPs and ports
486 # A list of one or more fluentd servers identified by their IPs and  port numbers should be given.
487 # For each recipient it is possible to enable both sending logs and performance
488 # results, or enable either logs or performance results. For enabling logs or results logging_tag or
489 # result_tag should be set.
490
491 fluentd:
492       # by default (logging_tag is empty) nfvbench log messages are not sent to fluentd
493       # to enable logging to fluents, specify a valid fluentd tag name to be used for the
494       # log records
495     - logging_tag:
496
497       # by default (result_tag is empty) nfvbench results are not sent to fluentd
498       # to enable sending nfvbench results to fluentd, specify a valid fluentd tag name
499       # to be used for the results records, which is different than logging_tag
500       result_tag:
501
502       # IP address of the server, defaults to loopback
503       ip: 127.0.0.1
504
505       # port # to use, by default, use the default fluentd forward port
506       port: 24224
507
508       # by default (logging_tag is empty) nfvbench log messages are not sent to fluentd
509       # to enable logging to fluents, specify a valid fluentd tag name to be used for the
510       # log records
511
512 # Module and class name of factory which will be used to provide classes dynamically for other components.
513 factory_module: 'nfvbench.factory'
514 factory_class: 'BasicFactory'
515
516 # Custom label added for every perf record generated during this run.
517 # Can be overriden by --user-label
518 user_label:
519
520
521 # THESE FIELDS SHOULD BE USED VERY RARELY
522
523 # Skip vswitch configuration and retrieving of stats
524 # Can be overriden by --no-vswitch-access
525 # Should be left to the default value (false)
526 no_vswitch_access: false