[dpdk-users] DPDK-pktgen Flows
Wiles, Keith
keith.wiles at intel.com
Mon Jan 4 15:21:10 CET 2021
> On Jan 3, 2021, at 10:03 AM, Merve Orakcı <merveorakci58 at gmail.com> wrote:
>
> Hi everyone, I will get flows using the "range" command. So I am reviewing
> documents and sample codes about this topic. I would like to ask a few
> things that I cannot understand. What is the flow generation procedure of
> range command? Take port 0 as an example. 128 different ip addresses and
> 2000 different port numbers are used for source and destination. As far as
> I understand, these lines are repeated for each package.But how is the flow
> creation procedure?
> My opinions:
> First: Is it a random port number and ip address for each pass over the
> file? So total 128 * 2000= 256000 flows were created here.
> Second: when we think of increment operator, generated packets:
> 1. packet: dst_ip: 192.168.1.1 , src_ip: 192.168.0.1 , dst_port: 2000 ,
> src_port: 5000
> 2. packet dst_ip: 192.168.1.2 , src_ip: 192.168.0.2 , dst_port: 2001 ,
> src_port: 5001
> ................................
> 128. packet: dst_ip: 192.168.1.128 , src_ip: 192.168.0.128 , dst_port:
> 2128 , src_port: 5128
> 129.packet dst_ip: 192.168.1.1 , src_ip: 192.168.0.1 , dst_port:
> 2129, src_port: 5129 or (???) dst_ip: 192.168.1.128 , src_ip:
> 192.168.0.128 , dst_port: 2129, src_port: 5129
>
> then it will end when source and destination port numbers reach their
> highest value..
>
The flow generation in Pktgen is pretty simple. Every time a packet is sent it fields you have setup are updated. This means if you have four fields setup to increment then they are changed for each packet sent. They are not random values as you can tell below.
> ........
> Can you help with this issue? I want to measure the performance of the
> system that I have created in different flow numbers with the pktgen tool.
> For this reason, the number of flows is important for me. Thanks for your
> help.
>
> pktgen.range.dst_mac("0", "start", "3c:fd:fe:9c:5c:b8");
>
> pktgen.range.src_mac("0", "start", "3c:fd:fe:9c:5c:d8");
>
> pktgen.range.dst_ip("0", "start", "192.168.1.1");
>
> pktgen.range.dst_ip("0", "inc", "0.0.0.1");
>
> pktgen.range.dst_ip("0", "min", "192.168.1.1");
>
> pktgen.range.dst_ip("0", "max", "192.168.1.128");
>
> pktgen.range.src_ip("0", "start", "192.168.0.1");
>
> pktgen.range.src_ip("0", "inc", "0.0.0.1");
>
> pktgen.range.src_ip("0", "min", "192.168.0.1");
>
>
> pktgen.range.src_ip("0", "max", "192.168.0.128");
>
> pktgen.set_proto("0", "udp");
>
> pktgen.range.dst_port("0", "start", 2000);
>
> pktgen.range.dst_port("0", "inc", 1);
>
> pktgen.range.dst_port("0", "min", 2000);
>
> pktgen.range.dst_port("0", "max", 4000);
>
> pktgen.range.src_port("0", "start", 5000);
>
> pktgen.range.src_port("0", "inc", 1);
>
> pktgen.range.src_port("0", "min", 5000);
>
> pktgen.range.src_port("0", "max", 7000);
>
> pktgen.range.pkt_size("0", "start", 64);
>
> pktgen.range.pkt_size("0", "inc", 0);
>
> pktgen.range.pkt_size("0", "min", 64);
>
> pktgen.range.pkt_size("0", "max", 256);
>
> -- Set up second port
>
> pktgen.range.dst_mac("1", "start", "3c:fd:fe:9c:5c:d8");
>
> pktgen.range.src_mac("1", "start", "3c:fd:fe:9c:5c:b8");
>
>
> pktgen.range.dst_ip("1", "start", "192.168.0.1");
>
> pktgen.range.dst_ip("1", "inc", "0.0.0.1");
>
> pktgen.range.dst_ip("1", "min", "192.168.0.1");
>
> pktgen.range.dst_ip("1", "max", "192.168.0.128");
>
> pktgen.range.src_ip("1", "start", "192.168.1.1");
>
> pktgen.range.src_ip("1", "inc", "0.0.0.1");
>
> pktgen.range.src_ip("1", "min", "192.168.1.1");
>
> pktgen.range.src_ip("1", "max", "192.168.1.128");
>
> pktgen.set_proto("all", "udp");
>
> pktgen.range.dst_port("1", "start", 5000);
>
> pktgen.range.dst_port("1", "inc", 1);
>
> pktgen.range.dst_port("1", "min", 5000);
>
> pktgen.range.dst_port("1", "max", 7000);
>
> pktgen.range.src_port("1", "start", 2000);
>
> pktgen.range.src_port("1", "inc", 1);
>
> pktgen.range.src_port("1", "min", 2000);
>
> pktgen.range.src_port("1", "max", 4000);
>
> pktgen.range.pkt_size("1", "start", 64);
>
> pktgen.range.pkt_size("1", "inc", 0);
>
> pktgen.range.pkt_size("1", "min", 64);
>
> pktgen.range.pkt_size("1", "max", 256);
>
> pktgen.set_range("all", "on");
>
> --
> *Merve Orakcı*
> Research Asistant
> Gazi University - Institute of Informatics
> Computer Forensics
> Phone :+90 0312 202 3814
More information about the users
mailing list