1 # Copyright 2015-2017 Intel Corporation.
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
7 # http://www.apache.org/licenses/LICENSE-2.0
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
15 # ############################
16 # Traffic gen configuration
17 # ############################
19 # log file for all traffic generator related commands
20 LOG_FILE_TRAFFIC_GEN = 'traffic-gen.log'
22 # TRAFFIC dictionary defines traffic parameters used by all traffic generators.
23 # Detailed description of TRAFFIC dictionary items follows:
25 # 'traffic_type' - One of the supported traffic types.
26 # E.g. rfc2544_throughput, rfc2544_back2back
27 # or rfc2544_continuous
29 # Default value: "rfc2544_throughput".
30 # 'bidir' - Specifies if generated traffic will be full-duplex (True)
31 # or half-duplex (False)
33 # Supported values: "True", "False"
34 # Default value: "False".
35 # 'frame_rate' - Defines desired percentage of frame rate used during
36 # continuous stream tests.
39 # 'multistream' - Defines number of flows simulated by traffic generator.
40 # Value 0 disables multistream feature
42 # Supported values: 0-65536 for 'L4' stream type
43 # unlimited for 'L2' and 'L3' stream types
45 # 'stream_type' - Stream type is an extension of the "multistream" feature.
46 # If multistream is disabled, then stream type will be
47 # ignored. Stream type defines ISO OSI network layer used
48 # for simulation of multiple streams.
51 # "L2" - iteration of destination MAC address
52 # "L3" - iteration of destination IP address
53 # "L4" - iteration of destination port
54 # of selected transport protocol
55 # Default value: "L4".
56 # 'pre_installed_flows'
57 # - Pre-installed flows is an extension of the "multistream"
58 # feature. If enabled, it will implicitly insert a flow
59 # for each stream. If multistream is disabled, then
60 # pre-installed flows will be ignored.
61 # Note: It is supported only for p2p deployment scenario.
64 # "Yes" - flows will be inserted into OVS
65 # "No" - flows won't be inserted into OVS
66 # Default value: "No".
67 # 'flow_type' - Defines flows complexity.
70 # "port" - flow is defined by ingress ports
71 # "IP" - flow is defined by ingress ports
72 # and src and dst IP addresses
73 # Default value: "port"
74 # 'flow_control' - Controls flow control support by traffic generator.
76 # False - flow control is disabled
77 # True - flow control is enabled
78 # Default value: False
79 # Note: Currently it is supported by IxNet only
80 # 'learning_frames' - Controls learning frames support by traffic generator.
82 # False - learning freames are disabled
83 # True - learning freames are enabled
85 # Note: Currently it is supported by IxNet only
86 # 'l2' - A dictionary with l2 network layer details. Supported
88 # 'srcmac' - Specifies source MAC address filled by traffic generator.
89 # NOTE: It can be modified by vsperf in some scenarios.
91 # Default value: "00:00:00:00:00:00".
92 # 'dstmac' - Specifies destination MAC address filled by traffic generator.
93 # NOTE: It can be modified by vsperf in some scenarios.
95 # Default value: "00:00:00:00:00:00".
96 # 'framesize' - Specifies default frame size. This value should not be
97 # changed directly. It will be overridden during testcase
98 # execution by values specified by list TRAFFICGEN_PKT_SIZES.
101 # 'l3' - A dictionary with l3 network layer details. Supported
103 # 'enabled' - Specifies if l3 layer should be enabled or disabled.
105 # Default value: True
106 # NOTE: Supported only by IxNet trafficgen class
107 # 'srcip' - Specifies source MAC address filled by traffic generator.
108 # NOTE: It can be modified by vsperf in some scenarios.
110 # Default value: "1.1.1.1".
111 # 'dstip' - Specifies destination MAC address filled by traffic generator.
112 # NOTE: It can be modified by vsperf in some scenarios.
114 # Default value: "90.90.90.90".
115 # 'proto' - Specifies deflaut protocol type.
116 # Please check particular traffic generator implementation
117 # for supported protocol types.
119 # Default value: "udp".
120 # 'l4' - A dictionary with l4 network layer details. Supported
122 # 'enabled' - Specifies if l4 layer should be enabled or disabled.
124 # Default value: True
125 # NOTE: Supported only by IxNet trafficgen class
126 # 'srcport' - Specifies source port of selected transport protocol.
127 # NOTE: It can be modified by vsperf in some scenarios.
129 # Default value: 3000
130 # 'dstport' - Specifies destination port of selected transport protocol.
131 # NOTE: It can be modified by vsperf in some scenarios.
133 # Default value: 3001
134 # 'vlan' - A dictionary with vlan encapsulation details. Supported
136 # 'enabled' - Specifies if vlan encapsulation should be enabled or
139 # Default value: False
140 # 'id' - Specifies vlan id.
141 # Data type: int (NOTE: must fit to 12 bits)
143 # 'priority' - Specifies a vlan priority (PCP header field).
144 # Data type: int (NOTE: must fit to 3 bits)
146 # 'cfi' - Specifies if frames can or cannot be dropped during
147 # congestion (DEI header field).
148 # Data type: int (NOTE: must fit to 1 bit)
151 'traffic_type' : 'rfc2544_throughput',
153 'bidir' : 'True', # will be passed as string in title format to tgen
155 'stream_type' : 'L4',
156 'pre_installed_flows' : 'No', # used by vswitch implementation
157 'flow_type' : 'port', # used by vswitch implementation
158 'flow_control' : False, # supported only by IxNet
159 'learning_frames' : True, # supported only by IxNet
162 'srcmac': '00:00:00:00:00:00',
163 'dstmac': '00:00:00:00:00:00',
169 'dstip': '90.90.90.90',
184 #path to traffic generators directory.
185 TRAFFICGEN_DIR = os.path.join(ROOT_DIR, 'tools/pkt_gen')
187 # traffic generator to use in tests
188 #TRAFFICGEN = 'TestCenter'
190 #TRAFFICGEN = 'IxNet'
193 #TRAFFICGEN = 'Moongen'
196 # List of packet sizes to send.
197 # Expand like this: (64, 128, 256, 512, 1024)
198 TRAFFICGEN_PKT_SIZES = (64,)
200 TRAFFICGEN_DURATION = 30
202 TRAFFICGEN_RFC2544_TESTS = 1
203 TRAFFICGEN_RFC2889_TRIALS = 1
204 TRAFFICGEN_LOSSRATE = 0.0
206 ##############################
207 # DUMMY Configuration -- BEGIN
209 # By default, dummy traffic generator asks for "measured" values.
210 # Following dictionary allows to preconfigure these values and
211 # to avoid user interaction. It can be useful for automated
213 # Example of values for continuous traffic type:
214 # TRAFFICGEN_DUMMY_RESULTS{'frames rx': 500000,
215 # 'frames tx': 500000,
221 # 'avg latency': 2.5,
224 TRAFFICGEN_DUMMY_RESULTS = {}
226 # DUMMY Configuration -- END
227 ############################
229 #############################
230 # IXIA Configuration -- BEGIN
232 # path to 'ixos' install path
233 TRAFFICGEN_IXIA_ROOT_DIR = '/opt/ixos'
235 # network address of IXIA chassis
236 TRAFFICGEN_IXIA_HOST = ''
238 TRAFFICGEN_IXIA_CARD = ''
240 TRAFFICGEN_IXIA_PORT1 = ''
242 TRAFFICGEN_IXIA_PORT2 = ''
244 TRAFFICGEN_IXNET_LIB_PATH = '/opt/ixnetwork/lib/IxTclNetwork'
246 # IxNetwork host IP address
247 TRAFFICGEN_IXNET_MACHINE = ''
248 TRAFFICGEN_IXNET_PORT = ''
249 TRAFFICGEN_IXNET_USER = ''
250 TRAFFICGEN_IXNET_CHASSIS = ''
252 # The result directory on $TRAFFICGEN_IXNET_MACHINE
253 TRAFFICGEN_IXNET_TESTER_RESULT_DIR = ''
255 # The result directory on DUT. This needs to map to the same directory
256 # as the previous one
257 TRAFFICGEN_IXNET_DUT_RESULT_DIR = ''
259 # directory with 3rd party scripts generated by IXIA tools
260 TRAFFICGEN_IXIA_3RD_PARTY = os.path.join(ROOT_DIR, '3rd_party/ixia')
262 # default TCL script, which will be used for IXNETWORK configuration
263 TRAFFICGEN_IXNET_TCL_SCRIPT = 'ixnetrfc2544.tcl'
265 # IXIA Configuration -- END
266 ###########################
269 ###########################################
270 # Spirent TestCenter Configuration -- BEGIN
272 # Path to Python 2 executable
273 TRAFFICGEN_STC_PYTHON2_PATH = "/bin/python2.7"
275 # Path to the location of the TestCenter files
276 TRAFFICGEN_STC_TESTCENTER_PATH = os.path.join(ROOT_DIR, 'tools/pkt_gen/testcenter')
278 # Name of the TestCenter RFC2544 Tput helper python script
279 TRAFFICGEN_STC_RFC2544_TPUT_TEST_FILE_NAME = "testcenter-rfc2544-throughput.py"
281 # Name of the Testcenter RFC2899 Tput Helper Python Scripts
282 TRAFFICGEN_STC_RFC2889_TEST_FILE_NAME = "testcenter-rfc2889-rest.py"
284 # 2889 Port Locations
285 TRAFFICGEN_STC_RFC2889_LOCATION = ""
287 # The address of the Spirent Lab Server to use
288 TRAFFICGEN_STC_LAB_SERVER_ADDR = ""
290 # The address of the Spirent License Server in your environment
291 TRAFFICGEN_STC_LICENSE_SERVER_ADDR = ""
293 # The address of the TestCenter chassis that holds the east port
294 TRAFFICGEN_STC_EAST_CHASSIS_ADDR = ""
296 # The slot number of the card that holds the east port
297 TRAFFICGEN_STC_EAST_SLOT_NUM = ""
299 # The port number on the card that holds the east port
300 TRAFFICGEN_STC_EAST_PORT_NUM = ""
302 # The address of the TestCenter chassis that holds the west port
303 TRAFFICGEN_STC_WEST_CHASSIS_ADDR = ""
305 # The slot number of the card that holds the west port
306 TRAFFICGEN_STC_WEST_SLOT_NUM = ""
308 # The port number on the card that holds the west port
309 TRAFFICGEN_STC_WEST_PORT_NUM = ""
311 # The friendly name to identify the Spirent Lab Server test session
312 TRAFFICGEN_STC_TEST_SESSION_NAME = "RFC2544 Tput"
313 # The directory to copy results to
315 TRAFFICGEN_STC_RESULTS_DIR = os.path.join(ROOT_DIR, "Results")
316 # The prefix for the CSV results file
318 TRAFFICGEN_STC_CSV_RESULTS_FILE_PREFIX = "RFC2544_tput"
319 # The number of trials to execute during the test
321 TRAFFICGEN_STC_NUMBER_OF_TRIALS = "1"
323 # The duration of each trial executed during the test, in seconds
324 TRAFFICGEN_STC_TRIAL_DURATION_SEC = "60"
326 # The traffic pattern between endpoints, BACKBONE, MESH or PAIR
327 TRAFFICGEN_STC_TRAFFIC_PATTERN = "PAIR"
329 # The search mode used to find the throughput rate, COMBO, STEP or BINARY
330 TRAFFICGEN_STC_SEARCH_MODE = "BINARY"
332 # The learning mode used during the test, AUTO, L2_LEARNING, L3_LERNING, or NONE
333 TRAFFICGEN_STC_LEARNING_MODE = "AUTO"
335 # The minimum percent line rate that will be used during the test
336 TRAFFICGEN_STC_RATE_LOWER_LIMIT_PCT = "1.0"
338 # The maximum percent line rate that will be used during the test
339 TRAFFICGEN_STC_RATE_UPPER_LIMIT_PCT = "99.0"
341 # If SearchMode is BINARY, the percent line rate that will be used at the start of the test
342 TRAFFICGEN_STC_RATE_INITIAL_PCT = "99.0"
344 # When SearchMode is STEP, the percent increase in load per step
345 TRAFFICGEN_STC_RATE_STEP_PCT = "10.0"
347 # The minimum percentage of load adjustment between iterations
348 TRAFFICGEN_STC_RESOLUTION_PCT = "1.0"
350 # The frame size, in bytes
351 TRAFFICGEN_STC_FRAME_SIZE = "256"
353 # The maximum acceptable frame loss percent in any iteration
354 TRAFFICGEN_STC_ACCEPTABLE_FRAME_LOSS_PCT = "0.0"
356 # The address to assign to the first emulated device interface on the first east port
357 TRAFFICGEN_STC_EAST_INTF_ADDR = ""
359 # The gateway address to assign to the first emulated device interface on the first east port
360 TRAFFICGEN_STC_EAST_INTF_GATEWAY_ADDR = ""
362 # The address to assign to the first emulated device interface on the first west port
363 TRAFFICGEN_STC_WEST_INTF_ADDR = ""
365 # The gateway address to assign to the first emulated device interface on the first west port
366 TRAFFICGEN_STC_WEST_INTF_GATEWAY_ADDR = ""
368 # Print additional information to the terminal during the test
369 TRAFFICGEN_STC_VERBOSE = "True"
371 # Spirent TestCenter Configuration -- END
372 #########################################
374 #############################
375 # Xena Configuration -- BEGIN
377 # Xena traffic generator connection info
378 TRAFFICGEN_XENA_IP = ''
379 TRAFFICGEN_XENA_PORT1 = ''
380 TRAFFICGEN_XENA_PORT2 = ''
381 TRAFFICGEN_XENA_USER = ''
382 TRAFFICGEN_XENA_PASSWORD = ''
383 TRAFFICGEN_XENA_MODULE1 = ''
384 TRAFFICGEN_XENA_MODULE2 = ''
387 TRAFFICGEN_XENA_PORT0_IP = '192.168.199.10'
388 TRAFFICGEN_XENA_PORT0_CIDR = 24
389 TRAFFICGEN_XENA_PORT0_GATEWAY = '192.168.199.1'
390 TRAFFICGEN_XENA_PORT1_IP = '192.168.199.11'
391 TRAFFICGEN_XENA_PORT1_CIDR = 24
392 TRAFFICGEN_XENA_PORT1_GATEWAY = '192.168.199.1'
394 # Xena RFC 2544 options
395 # Please reference xena documentation before making changes to these settings
396 TRAFFICGEN_XENA_2544_TPUT_INIT_VALUE = '10.0'
397 TRAFFICGEN_XENA_2544_TPUT_MIN_VALUE = '0.1'
398 TRAFFICGEN_XENA_2544_TPUT_MAX_VALUE = '100.0'
399 TRAFFICGEN_XENA_2544_TPUT_VALUE_RESOLUTION = '0.5'
400 TRAFFICGEN_XENA_2544_TPUT_USEPASS_THRESHHOLD = 'false'
401 TRAFFICGEN_XENA_2544_TPUT_PASS_THRESHHOLD = '0.0'
403 # Xena RFC 2544 final verification options
404 TRAFFICGEN_XENA_RFC2544_VERIFY = False
405 TRAFFICGEN_XENA_RFC2544_VERIFY_DURATION = 120 # in seconds
406 # Number of verify attempts before giving up...
407 TRAFFICGEN_XENA_RFC2544_MAXIMUM_VERIFY_ATTEMPTS = 10
408 # Logic for restarting binary search, see documentation for details
409 TRAFFICGEN_XENA_RFC2544_BINARY_RESTART_SMART_SEARCH = True
411 # Xena Continuous traffic options
412 # Please reference xena documentation before making changes to these settings
413 TRAFFICGEN_XENA_CONT_PORT_LEARNING_ENABLED = True
414 TRAFFICGEN_XENA_CONT_PORT_LEARNING_DURATION = 3
416 # Xena Configuration -- END
417 ###########################
419 ###################################################
420 # MoonGen Configuration and Connection Info-- BEGIN
422 # Ex: TRAFFICGEN_MOONGEN_HOST_IP_ADDR = "192.10.1.1"
423 TRAFFICGEN_MOONGEN_HOST_IP_ADDR = ''
424 TRAFFICGEN_MOONGEN_USER = ''
425 TRAFFICGEN_MOONGEN_BASE_DIR = ''
426 TRAFFICGEN_MOONGEN_PORTS = ''
427 # Ex. 10 Gbps: TRAFFICGEN_MOONGEN_LINE_SPEED_GBPS = '10'
428 # Today only 10 Gbps is supported
429 TRAFFICGEN_MOONGEN_LINE_SPEED_GBPS = ''
431 # MoonGen Configuration and Connection Info-- END
432 #################################################
434 ################################################
435 # Trex Configuration and Connection Info-- BEGIN
437 # Example: TRAFFICGEN_TREX_HOST_IP_ADDR = "192.10.1.1"
438 # Example: TRAFFICGEN_TREX_USER = 'root'
439 # Example: TRAFFICGEN_TREX_BASE_DIR = '/traffic_gen/trex/'
440 # Example: TRAFFICGEN_TREX_PORT1 = '00:00:00:00:00:00'
441 TRAFFICGEN_TREX_HOST_IP_ADDR = ''
442 TRAFFICGEN_TREX_USER = ''
443 TRAFFICGEN_TREX_BASE_DIR = ''
444 TRAFFICGEN_TREX_PORT1 = ''
445 TRAFFICGEN_TREX_PORT2 = ''
446 # RFC2544 Throughput execution will end after threshold below is reached.
447 # It defines maximal difference between frame rate of successful (i.e. defined
448 # frameloss reached) and unsuccessful (i.e. frameloss exceeded) iterations.
449 TRAFFICGEN_TREX_RFC2544_TPUT_THRESHOLD = 0.05
450 # Latency statistics are collected by separate stream created for each interface.
451 # Parameter below defines frequency of packets used for latency measurement in PPS.
452 # Value 0 will disable latency specific streams.
453 TRAFFICGEN_TREX_LATENCY_PPS = 1000
454 # Example 10 Gbps: TRAFFICGEN_TREXINE_SPEED_GBPS = '10'
455 # Today only 10 Gbps is supported
456 TRAFFICGEN_TREX_LINE_SPEED_GBPS = '10'
457 # Enable of learning packets before sending test traffic
458 TRAFFICGEN_TREX_LEARNING_MODE = True
459 TRAFFICGEN_TREX_LEARNING_DURATION = 5
460 # FOR SR-IOV or multistream layer 2 tests to work with T-Rex enable Promiscuous mode
461 TRAFFICGEN_TREX_PROMISCUOUS = False
462 PATHS['trafficgen'] = {
466 'path': os.path.join(ROOT_DIR, 'src/trex/trex/scripts/automation/trex_control_plane/stl')
470 # TREX Configuration and Connection Info-- END
471 ##############################################