cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2497
Views
0
Helpful
2
Replies

TREX : multiple instances

givohra
Cisco Employee
Cisco Employee

I understand how to create multiple trex instances but my 4 instances are not sending the same rate of traffic. looks like some cpu/mem allocation issue in multiple instances. How can i make these instances send the same rate at the same time?

1 Accepted Solution

Accepted Solutions
2 Replies 2

givohra
Cisco Employee
Cisco Employee

Anu Radha
Level 1
Level 1

I am facing an issue of running multiple streams. Single stream is working fine and I can see the traffic through the network. I am using the below script to send multiple streams with multiple QOS/TOS values and it is not working. Request please to help how to implement multiple streams.

Multiple streams

 

I want that if one flow is on running , then next flow should be added such a way that previous flow is still running and next flow is added to previous flow , so both flows are running , now if another flow come into existence , then this flow should be added to previous two flow and now three flows are running .

 

I want to fulfil above condition and right now using latest version of trex .Anyone have a working script pls advise.

 

 

from trex_stl_lib.api import *
import argparse

class STLS1(object):

    def create_stream (self):

        base_pkt =  Ether()/IP(src="16.0.0.1",dst="48.0.0.1", tos=0)/UDP(dport=12,sport=1025)
        base_pkt2 =  Ether()/IP(src="16.0.0.1",dst="48.0.0.1", tos=1)/UDP(dport=12,sport=1025)
        pad = 10 * 'x'


        return STLProfile( [ STLStream( isg = 1.0, # start in delay in usec
                                        name    ='S0',
                                        packet = STLPktBuilder(pkt = base_pkt/pad),
                                        mode = STLTXSingleBurst(total_pkts = 1),
                                        next = 'S2'),

                             STLStream(  self_start = False,
                                         name    ='S2',
                                         packet = STLPktBuilder(pkt = base_pkt2/pad),
                                         mode    = STLTXSingleBurst(total_pkts = 1))

                            ]).get_streams()


    def get_streams (self, tunables, **kwargs):
        parser = argparse.ArgumentParser(description='Argparser for {}'.format(os.path.basename(__file__)),
                                         formatter_class=argparse.ArgumentDefaultsHelpFormatter)

        args = parser.parse_args(tunables)
        # create 1 stream
        return self.create_stream()