flow pattern in ASTF mode

122 views
Skip to first unread message

m...@mojatatu.com

unread,
Sep 9, 2019, 9:19:52 PM9/9/19
to TRex Traffic Generator
Hello,

I'm setting up trex in ASTF mode to generate flows based on the following profile:

from trex.astf.api import *


class Prof1():
    def __init__(self):
        pass

    def get_profile(self, **kwargs):
        # ip generator
        ip_gen_c = ASTFIPGenDist(ip_range=["16.1.0.0", "16.16.255.255"], distribution="seq")
        ip_gen_s = ASTFIPGenDist(ip_range=["48.1.0.0", "48.16.255.255"], distribution="seq")
        ip_gen = ASTFIPGen(glob=ASTFIPGenGlobal(ip_offset="1.0.0.0"),
                           dist_client=ip_gen_c,
                           dist_server=ip_gen_s)

        return ASTFProfile(default_ip_gen=ip_gen,
                            cap_list=[ASTFCapInfo(file="../avl/http_minipc.pcap",
                            cps=10000.0)])


def register():
    return Prof1()


Does trex guarantee that a single flow will look like this for example:

16.1.0.1:PortA -> 48.1.0.1:PortB
...
16.1.0.254:PortA -> 48.1.0.254:PortB
...


Or trex will run through source/destination port values for a pair of fixed src/dst IPs:

...
...
...

??

Thanks.

hanoh haim

unread,
Sep 10, 2019, 6:48:29 AM9/10/19
to m...@mojatatu.com, TRex Traffic Generator
TRex simulates clients and allocate the src port dynamically. So it is not guaranteed.

Src-dst IPs depends on the pool generation type (random vs seq)


Thanks
Hanoh 
--
You received this message because you are subscribed to the Google Groups "TRex Traffic Generator" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trex-tgn+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trex-tgn/2be78291-cc41-4a39-a0fb-02e79e098911%40googlegroups.com.
--
Hanoh
Sent from my iPhone

roman....@gmail.com

unread,
Sep 10, 2019, 10:54:59 AM9/10/19
to TRex Traffic Generator
Hi,

OK I understand about source ports, trex will use reference PCAP file to generate ports.

As for src/dst IPs. With 'seq' generation type does it increment e.g. last octet on both source and dest IP for the same flow, or it will set source IP first and then sequentially increment dest IP, then increment source IP and repeat dest IP sequence etc. etc.?
To unsubscribe from this group and stop receiving emails from it, send an email to trex...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages