795ed5d8d1fae717a2cc4a048368f39c1b8b1e0c
[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     ip_addrs: ['10.0.0.0/8', '20.0.0.0/8']
156     ip_addrs_step: 0.0.0.1
157     tg_gateway_ip_addrs: ['1.1.0.100', '2.2.0.100']
158     tg_gateway_ip_addrs_step: 0.0.0.1
159     gateway_ip_addrs: ['1.1.0.2', '2.2.0.2']
160     gateway_ip_addrs_step: 0.0.0.1
161
162     # Traffic Generator Profiles
163     # In case you have multiple testbeds or traffic generators,
164     # you can define one traffic generator profile per testbed/traffic generator.
165     #
166     # Generator profiles are listed in the following format:
167     # `name`: Traffic generator profile name (use a unique name, no space or special character)
168     # `tool`: Traffic generator tool to be used (currently supported is `TRex`).
169     # `ip`: IP address of the traffic generator.
170     # `cores`: Specify the number of cores for TRex traffic generator. ONLY applies to trex-local.
171     # `interfaces`: Configuration of traffic generator interfaces.
172     # `interfaces.port`: The port of the traffic generator to be used (leave as 0 and 1 resp.)
173     # `interfaces.switch_port`: Leave empty (reserved for advanced use cases)
174     # `interfaces.pci`: The PCI address of the intel NIC interface associated to this port
175     # `intf_speed`: The speed of the interfaces used by the traffic generator (per direction).
176     #
177     generator_profile:
178         - name: trex-local
179           tool: TRex
180           ip: 127.0.0.1
181           cores: 3
182           interfaces:
183             - port: 0
184               switch_port:
185               pci:
186             - port: 1
187               switch_port:
188               pci:
189           intf_speed: 10Gbps
190
191 # -----------------------------------------------------------------------------
192 # These variables are not likely to be changed
193
194 # The openrc file
195 openrc_file:
196
197 # General retry count
198 generic_retry_count: 100
199
200 # General poll period
201 generic_poll_sec: 2
202
203 # name of the loop VM
204 loop_vm_name: 'nfvbench-loop-vm'
205
206 # Default names, subnets and CIDRs for internal networks used by the script.
207 # If a network with given name already exists it will be reused.
208 # Otherwise a new internal network will be created with that name, subnet and CIDR.
209 internal_networks:
210     # Required only when segmentation_id specified
211     physical_network:
212     left:
213         name: 'nfvbench-net0'
214         subnet: 'nfvbench-subnet0'
215         cidr: '192.168.1.0/24'
216         network_type: 'vlan'
217         segmentation_id:
218     right:
219         name: 'nfvbench-net1'
220         subnet: 'nfvbench-subnet1'
221         cidr: '192.168.2.0/24'
222         network_type: 'vlan'
223         segmentation_id:
224     middle:
225         name: 'nfvbench-net2'
226         subnet: 'nfvbench-subnet2'
227         cidr: '192.168.3.0/24'
228         network_type: 'vlan'
229         segmentation_id:
230
231 # EXT chain only. Names of edge networks which will be used to send traffic via traffic generator.
232 external_networks:
233     left: 'nfvbench-net0'
234     right: 'nfvbench-net1'
235
236 # Use 'true' to enable VLAN tagging of packets coming from traffic generator
237 # Leave empty if VLAN tagging is enabled on switch or if you want to hook directly to a NIC
238 # Else by default is set to true (which is the nominal use case with TOR and trunk mode to Trex)
239 vlan_tagging: true
240
241 # Specify only when you want to override VLAN IDs used for tagging with own values (exactly 2).
242 # Default behavior of VLAN tagging is to retrieve VLAN IDs from OpenStack networks provided above.
243 # In case of VxLAN this setting is ignored and only vtep_vlan from traffic generator profile is used.
244 # Example: [1998, 1999]
245 vlans: []
246
247 # Used only with EXT chain. MAC addresses of traffic generator ports are used as destination
248 # if 'no_arp' is set to 'true'. Otherwise ARP requests are sent to find out destination MAC addresses.
249 no_arp: false
250
251 # Traffic Profiles
252 # You can add here more profiles as needed
253 # `l2frame_size` can be specified in any none zero integer value to represent the size in bytes
254 # of the L2 frame, or "IMIX" to represent the standard 3-packet size mixed sequence (IMIX1).
255 traffic_profile:
256     - name: traffic_profile_64B
257       l2frame_size: ['64']
258     - name: traffic_profile_IMIX
259       l2frame_size: ['IMIX']
260     - name: traffic_profile_1518B
261       l2frame_size: ['1518']
262     - name: traffic_profile_3sizes
263       l2frame_size: ['64', 'IMIX', '1518']
264
265 # Traffic Configuration
266 # bidirectional: to have traffic generated from both direction, set bidirectional to true
267 # profile: must be one of the profiles defined in traffic_profile
268 # The traffic profile can be overriden with the options --frame-size and --uni-dir
269 traffic:
270     bidirectional: true
271     profile: traffic_profile_64B
272
273 # Check config and connectivity only - do not generate traffic
274 # Can be overriden by --no-traffic
275 no_traffic: false
276
277 # Do not reset tx/rx counters prior to running
278 # Can be overriden by --no-reset
279 no_reset: false
280
281 # Test configuration
282
283 # The rate pps for traffic going in reverse direction in case of unidirectional flow. Default to 1.
284 unidir_reverse_traffic_pps: 1
285
286 # The rate specifies if NFVbench should determine the NDR/PDR
287 #  or if NFVbench should just generate traffic at a given fixed rate
288 # for a given duration (called "single run" mode)
289 # Supported rate format:
290 # NDR/PDR test: `ndr`, `pdr`, `ndr_pdr` (default)
291 # Or for single run mode:
292 # Packet per second: pps (e.g. `50pps`)
293 # Bits per second: bps, kbps, Mbps, etc (e.g. `1Gbps`, `1000bps`)
294 # Load percentage: % (e.g. `50%`)
295 # Can be overridden by --rate
296 rate: ndr_pdr
297
298 # Default run duration (single run at given rate only)
299 # Can be overridden by --duration
300 duration_sec: 60
301
302 # Interval between intermediate reports when interval reporting is enabled
303 # Can be overridden by --interval
304 interval_sec: 10
305
306 # NDR / PDR configuration ZZ
307 measurement:
308     # Drop rates represent the ratio of dropped packet to the total number of packets sent.
309     # Values provided here are percentages. A value of 0.01 means that at most 0.01% of all
310     # packets sent are dropped (or 1 packet every 10,000 packets sent)
311
312     # No Drop Rate in percentage; Default to 0.001%
313     NDR: 0.001
314     # Partial Drop Rate in percentage; NDR should always be less than PDR
315     PDR: 0.1
316     # The accuracy of NDR and PDR load percentiles; The actual load percentile that match NDR
317     # or PDR should be within `load_epsilon` difference than the one calculated.
318     load_epsilon: 0.1
319
320 # Location where to store results in a JSON format. Must be container specific path.
321 # Can be overriden by --json
322 json:
323
324 # Location where to store results in the NFVbench standard JSON format:
325 # <service-chain-type>-<service-chain-count>-<flow-count>-<packet-sizes>.json
326 # Example: PVP-1-10-64-IMIX.json
327 # Must be container specific path.
328 # Can be overriden by --std-json
329 std_json:
330
331 # Prints debug messages (verbose mode)
332 # Can be overriden by --debug
333 debug: false
334
335 # Module and class name of factory which will be used to provide classes dynamically for other components.
336 factory_module: 'nfvbench.factory'
337 factory_class: 'BasicFactory'