196e40a0655aa285fa959fe5ab58fe235f3f4628
[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 # Name of the image to use for launching the loopback VMs. This name must be
23 # the exact same name used in OpenStack (as shown from 'nova image-list')
24 # Can be overridden by --image or -i
25 image_name: 'nfvbenchvm'
26 # Forwarder to use in nfvbenchvm image. Available options: ['vpp', 'testpmd']
27 vm_forwarder: testpmd
28
29 # NFVbench can automatically upload a VM image if the image named by
30 # image_name is missing, for that you need to specify a file location where
31 # the image can be retrieved
32 #
33 # To upload the image as a file, download it to preferred location
34 # and prepend it with file:// like in this example:
35 # file://<location of the image>
36 # NFVbench (the image must have the same name as defined in image_name above).
37 vm_image_file:
38
39 # Name of the flavor to use for the loopback VMs
40 #
41 # If the provided name is an exact match to a flavor name known by OpenStack
42 # (as shown from 'nova flavor-list'), that flavor will be reused.
43 # Otherwise, a new flavor will be created with attributes listed below.
44 flavor_type: 'nfvbench.medium'
45
46 # Custom flavor attributes
47 flavor:
48   # Number of vCPUs for the flavor
49   vcpus: 2
50   # Memory for the flavor in MB
51   ram: 8192
52   # Size of local disk in GB
53   disk: 0
54   # metadata are supported and can be added if needed, optional
55   # note that if your openstack does not have NUMA optimization
56   # (cpu pinning and huge pages)
57   # you must comment out extra_specs completely otherwise
58   # loopback VM creation will fail
59   extra_specs:
60       "hw:cpu_policy": dedicated
61       "hw:mem_page_size": large
62
63 # Name of the availability zone to use for the test VMs
64 # Must be one of the zones listed by 'nova availability-zone-list'
65 # If the selected zone contains only 1 compute node and PVVP inter-node flow is selected,
66 # application will use intra-node PVVP flow.
67 # List of compute nodes can be specified, must be in given availability zone if not empty
68 #availability_zone: 'nova'
69 availability_zone:
70 compute_nodes:
71
72
73 # Credentials for SSH connection to TOR switches.
74 tor:
75     # Leave type empty or switch list empty to skip TOR switches configuration.
76     # Preferably use 'no_tor_access' to achieve the same behavior.
77     # (skipping TOR config will require the user to pre-stitch the traffic generator interfaces
78     # to the service chain under test, needed only if configured in access mode)
79     type:
80     # Switches are only needed if type is not empty.
81     # You can configure 0, 1 or 2 switches
82     # no switch: in this case NFVbench will not attempt to ssh to the switch
83     #            and stitching of traffic must be done externally
84     # 1 switch: this assumes that both traffic generator interfaces are wired to the same switch
85     # 2 switches: this is the recommended setting wuth redundant switches, in this case each
86     #             traffic generator interface must be wired to a different switch
87     switches:
88         - host:
89           username:
90           password:
91           port:
92
93 # Skip TOR switch configuration and retrieving of stats
94 # Can be overriden by --no-tor-access
95 no_tor_access: false
96
97 # Skip vswitch configuration and retrieving of stats
98 # Can be overriden by --no-vswitch-access
99 no_vswitch_access: false
100
101 # Type of service chain to run, possible options are PVP, PVVP and EXT
102 # PVP - port to VM to port
103 # PVVP - port to VM to VM to port
104 # EXT - external chain used only for running traffic and checking traffic generator counters,
105 #       all other parts of chain must be configured manually
106 # Can be overriden by --service-chain
107 service_chain: 'PVP'
108
109 # Total number of service chains, every chain has own traffic stream
110 # Can be overriden by --service-chain-count
111 service_chain_count: 1
112
113 # Total number of traffic flows for all chains and directions generated by the traffic generator.
114 # Minimum is '2 * service_chain_count', it is automatically adjusted if too small
115 # value was configured. Must be even.
116 # Every flow has packets with different IPs in headers
117 # Can be overriden by --flow-count
118 flow_count: 2
119
120 # Used by PVVP chain to spawn VMs on different compute nodes
121 # Can be overriden by --inter-node
122 inter_node: false
123
124 # set to true if service chains should use SRIOV
125 # This requires SRIOV to be available on compute nodes
126 sriov: false
127
128 # Skip interfaces config on EXT service chain
129 # Can be overriden by --no-int-config
130 no_int_config: false
131
132 # Resources created by NFVbench will not be removed
133 # Can be overriden by --no-cleanup
134 no_cleanup: false
135
136 # Configuration for traffic generator
137 traffic_generator:
138     # Name of the traffic generator, only for informational purposes
139     host_name: 'nfvbench_tg'
140     # this is the default traffic generator profile to use
141     # the name must be defined under generator_profile
142     # you can override the traffic generator to use using the
143     # -g or --traffic-gen option at the command line
144     default_profile: trex-local
145
146     # IP addresses for L3 traffic.
147     # All of the IPs are used as base for IP sequence computed based on chain or flow count.
148     #
149     # `ip_addrs` base IPs used as src and dst in packet header, quantity depends on flow count
150     # `ip_addrs_step`: step for generating IP sequence. Use "random" for random patterns, default is 0.0.0.1.
151     # `tg_gateway_ip_addrs` base IPs for traffic generator ports, quantity depends on chain count
152     # `tg_gateway_ip_addrs__step`: step for generating traffic generator gateway sequences. default is 0.0.0.1
153     # `gateway_ip_addrs`: base IPs of router gateways on both networks, quantity depends on chain count
154     # `gateway_ip_addrs_step`: step for generating router gateway sequences. default is 0.0.0.1
155     # `udp_src_port`: the source port for sending UDP traffic, default is picked by TRex (53)
156     # `udp_dst_port`: the destination port for sending UDP traffic, default is picked by TRex (53)
157     ip_addrs: ['10.0.0.0/8', '20.0.0.0/8']
158     ip_addrs_step: 0.0.0.1
159     tg_gateway_ip_addrs: ['1.1.0.100', '2.2.0.100']
160     tg_gateway_ip_addrs_step: 0.0.0.1
161     gateway_ip_addrs: ['1.1.0.2', '2.2.0.2']
162     gateway_ip_addrs_step: 0.0.0.1
163     udp_src_port:
164     udp_dst_port:
165
166     # Traffic Generator Profiles
167     # In case you have multiple testbeds or traffic generators,
168     # you can define one traffic generator profile per testbed/traffic generator.
169     #
170     # Generator profiles are listed in the following format:
171     # `name`: Traffic generator profile name (use a unique name, no space or special character)
172     # `tool`: Traffic generator tool to be used (currently supported is `TRex`).
173     # `ip`: IP address of the traffic generator.
174     # `cores`: Specify the number of cores for TRex traffic generator. ONLY applies to trex-local.
175     # `interfaces`: Configuration of traffic generator interfaces.
176     # `interfaces.port`: The port of the traffic generator to be used (leave as 0 and 1 resp.)
177     # `interfaces.switch_port`: Leave empty (reserved for advanced use cases)
178     # `interfaces.pci`: The PCI address of the intel NIC interface associated to this port
179     # `intf_speed`: The speed of the interfaces used by the traffic generator (per direction).
180     #
181     generator_profile:
182         - name: trex-local
183           tool: TRex
184           ip: 127.0.0.1
185           cores: 3
186           interfaces:
187             - port: 0
188               switch_port:
189               pci:
190             - port: 1
191               switch_port:
192               pci:
193           intf_speed: 10Gbps
194
195 # -----------------------------------------------------------------------------
196 # These variables are not likely to be changed
197
198 # The openrc file
199 openrc_file:
200
201 # Number of seconds to wait for VMs to pass traffic in both directions
202 check_traffic_time_sec: 200
203
204 # General retry count
205 generic_retry_count: 100
206
207 # General poll period
208 generic_poll_sec: 2
209
210 # name of the loop VM
211 loop_vm_name: 'nfvbench-loop-vm'
212
213 # Default names, subnets and CIDRs for PVP/PVVP networks
214 # If a network with given name already exists it will be reused.
215 # - PVP only uses left and right
216 # - PVVP uses left, middle and right
217 # - for EXT chains, this structure is not relevant - refer to external_networks
218 # Otherwise a new internal network will be created with that name, subnet and CIDR.
219
220 # segmentation_id can be set to enforce a specific VLAN id - by default (empty) the VLAN id 
221 #                 will be assigned by Neutron.
222 #                 Must be unique for each network
223 # physical_network can be set to pick a specific phsyical network - by default (empty) the
224 #                   default physical network will be picked
225 # In the case of SR-IOV, both physical_network and segmentation ID must be provided
226 # For example to setup PVP using 2 different SR-IOV ports, you must put the appropriate physnet
227 # names under left.physical_network and right.physical_network.
228 # Example of override configuration to force PVP to run on 2 SRIOV ports (phys_sriov0 and phys_sriov1)
229 # using VLAN ID 2000 and 2001:
230 # internal_networks:
231 #    left:
232 #        segmentation_id: 2000
233 #        physical_network: phys_sriov0
234 #    right:
235 #        segmentation_id: 2001
236 #        physical_network: phys_sriov1
237
238 internal_networks:
239     left:
240         name: 'nfvbench-net0'
241         subnet: 'nfvbench-subnet0'
242         cidr: '192.168.1.0/24'
243         network_type: 'vlan'
244         segmentation_id:
245         physical_network:
246     right:
247         name: 'nfvbench-net1'
248         subnet: 'nfvbench-subnet1'
249         cidr: '192.168.2.0/24'
250         network_type: 'vlan'
251         segmentation_id:
252         physical_network:
253     middle:
254         name: 'nfvbench-net2'
255         subnet: 'nfvbench-subnet2'
256         cidr: '192.168.3.0/24'
257         network_type: 'vlan'
258         segmentation_id:
259         physical_network:
260
261 # EXT chain only. Names of edge networks which will be used to send traffic via traffic generator.
262 external_networks:
263     left: 'nfvbench-net0'
264     right: 'nfvbench-net1'
265
266 # Use 'true' to enable VLAN tagging of packets generated and sent by the traffic generator
267 # Leave empty you do not want the traffic generator to insert the VLAN tag. This is 
268 # needed for example if VLAN tagging is enabled on switch (trunk mode) or if you want to hook directly to a NIC
269 # By default is set to true (which is the nominal use case with TOR and trunk mode to Trex)
270 vlan_tagging: true
271
272 # Specify only when you want to override VLAN IDs used for tagging with own values (exactly 2).
273 # Default behavior of VLAN tagging is to retrieve VLAN IDs from OpenStack networks provided above.
274 # In case of VxLAN this setting is ignored and only vtep_vlan from traffic generator profile is used.
275 # Example: [1998, 1999]
276 vlans: []
277
278 # Used only with EXT chain. MAC addresses of traffic generator ports are used as destination
279 # if 'no_arp' is set to 'true'. Otherwise ARP requests are sent to find out destination MAC addresses.
280 no_arp: false
281
282 # Traffic Profiles
283 # You can add here more profiles as needed
284 # `l2frame_size` can be specified in any none zero integer value to represent the size in bytes
285 # of the L2 frame, or "IMIX" to represent the standard 3-packet size mixed sequence (IMIX1).
286 traffic_profile:
287     - name: traffic_profile_64B
288       l2frame_size: ['64']
289     - name: traffic_profile_IMIX
290       l2frame_size: ['IMIX']
291     - name: traffic_profile_1518B
292       l2frame_size: ['1518']
293     - name: traffic_profile_3sizes
294       l2frame_size: ['64', 'IMIX', '1518']
295
296 # Traffic Configuration
297 # bidirectional: to have traffic generated from both direction, set bidirectional to true
298 # profile: must be one of the profiles defined in traffic_profile
299 # The traffic profile can be overriden with the options --frame-size and --uni-dir
300 traffic:
301     bidirectional: true
302     profile: traffic_profile_64B
303
304 # Check config and connectivity only - do not generate traffic
305 # Can be overriden by --no-traffic
306 no_traffic: false
307
308 # Do not reset tx/rx counters prior to running
309 # Can be overriden by --no-reset
310 no_reset: false
311
312 # Test configuration
313
314 # The rate pps for traffic going in reverse direction in case of unidirectional flow. Default to 1.
315 unidir_reverse_traffic_pps: 1
316
317 # The rate specifies if NFVbench should determine the NDR/PDR
318 #  or if NFVbench should just generate traffic at a given fixed rate
319 # for a given duration (called "single run" mode)
320 # Supported rate format:
321 # NDR/PDR test: `ndr`, `pdr`, `ndr_pdr` (default)
322 # Or for single run mode:
323 # Packet per second: pps (e.g. `50pps`)
324 # Bits per second: bps, kbps, Mbps, etc (e.g. `1Gbps`, `1000bps`)
325 # Load percentage: % (e.g. `50%`)
326 # Can be overridden by --rate
327 rate: ndr_pdr
328
329 # Default run duration (single run at given rate only)
330 # Can be overridden by --duration
331 duration_sec: 60
332
333 # Interval between intermediate reports when interval reporting is enabled
334 # Can be overridden by --interval
335 interval_sec: 10
336
337 # NDR / PDR configuration
338 measurement:
339     # Drop rates represent the ratio of dropped packet to the total number of packets sent.
340     # Values provided here are percentages. A value of 0.01 means that at most 0.01% of all
341     # packets sent are dropped (or 1 packet every 10,000 packets sent)
342
343     # No Drop Rate in percentage; Default to 0.001%
344     NDR: 0.001
345     # Partial Drop Rate in percentage; NDR should always be less than PDR
346     PDR: 0.1
347     # The accuracy of NDR and PDR as a percnetage of line rate; The exact NDR
348     # or PDR should be within `load_epsilon` line rate % from the one calculated.
349     # For example, with a value 0.1, and a line rate of 10Gbps, the accuracy
350     # of NDR and PDR will be within 0.1% Of 10Gbps or 10Mbps.
351     # The lower the value the more iterations and the longer it will take to find the NDR/PDR.
352     # In practice, due to the precision of the traffic generator it is not recommended to
353     # set it to lower than 0.1
354     load_epsilon: 0.1
355
356 # Location where to store results in a JSON format. Must be container specific path.
357 # Can be overriden by --json
358 json:
359
360 # Location where to store results in the NFVbench standard JSON format:
361 # <service-chain-type>-<service-chain-count>-<flow-count>-<packet-sizes>.json
362 # Example: PVP-1-10-64-IMIX.json
363 # Must be container specific path.
364 # Can be overriden by --std-json
365 std_json:
366
367 # Prints debug messages (verbose mode)
368 # Can be overriden by --debug
369 debug: false
370
371 # Set to a valid path name if logging to file is to be enabled
372 # Defaults to disabled
373 log_file:
374
375 # When enabled, all logs will be sent to a fluentd server at the requested IP and port
376 # The fluentd "tag" and "label" fields for every message will be set to "nfvbench"
377 fluentd:
378     # by default (logging_tag is empty) nfvbench log messages are not sent to fluentd
379     # to enable logging to fluents, specify a valid fluentd tag name to be used for the
380     # log records
381     logging_tag:
382
383     # IP address of the server, defaults to loopback
384     ip: 127.0.0.1
385
386     # port # to use, by default, use the default fluentd forward port
387     port: 24224
388
389 # Module and class name of factory which will be used to provide classes dynamically for other components.
390 factory_module: 'nfvbench.factory'
391 factory_class: 'BasicFactory'