From: Shyam Shrivastav <shrivastav.shyam@gmail.com>
To: Chris Hall <chris.hall@stackpath.com>
Cc: "users@dpdk.org" <users@dpdk.org>
Subject: Re: [dpdk-users] pktgen - IP address randomness
Date: Tue, 23 May 2017 10:46:52 +0530 [thread overview]
Message-ID: <CAGSp03nANkqUV68WDR7grLeG6GhWu-6yGw2aqpzQ0=D+EToDBQ@mail.gmail.com> (raw)
In-Reply-To: <DM5PR10MB14180DB693EB33564F509E2B92F80@DM5PR10MB1418.namprd10.prod.outlook.com>
Sometime back I used lua in moongen to continuously generate ip:tcp packets
with random ip src and random tcp src/dst ports. Here is the corresponding
lua script fragment, don't know how much useful it can be with pktgen as I
have not looked at or used pktgen till now but just in case ...
x1 = math.random(1,254);
x2 = math.random(1,254);
x3 = math.random(1,254);
x4 = math.random(1,254);
p1 = math.random(1025,65534);
p2 = math.random(1025,65534);
pkt.ip.src:set(x1*256*256*256 + x2*256*256 + x3*256
+ x4)
pkt.tcp:setSrcPort(p1);
pkt.tcp:setDstPort(p2);
On Tue, May 23, 2017 at 5:01 AM, Chris Hall <chris.hall@stackpath.com>
wrote:
> Hello,
>
> pktgen-3.2.4
>
> I Looking to get as much randomness out of src ip’s as possible. Using
> this config in lua…
>
> pktgen.src_ip('0', 'start',"0.0.0.1");
> pktgen.src_ip('0', 'min', "0.0.0.1");
> pktgen.src_ip('0', 'max', "255.255.255.254");
> pktgen.src_ip('0', 'inc', "1.1.1.1");
>
> running a packet capture of 5Million packets on the receiving host,
> parsing the pcap file, based on source ip, seems I can only get about 32769
> uniq ip's, (each connected about 150 times).
>
> As a comparison I used hping3 with --rand-source option (5million packets)
> I can get about 4942744 uniq ip’s.
>
> Is there a configure option(s) somewhere that could be tuned for more
> randomness or is the above parms just wrong ?
>
> Thanks much.
>
> * Chris
>
>
>
>
next prev parent reply other threads:[~2017-05-23 5:16 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-22 23:31 Chris Hall
2017-05-23 5:16 ` Shyam Shrivastav [this message]
2017-05-23 11:50 ` Wiles, Keith
2017-05-23 11:49 ` Wiles, Keith
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAGSp03nANkqUV68WDR7grLeG6GhWu-6yGw2aqpzQ0=D+EToDBQ@mail.gmail.com' \
--to=shrivastav.shyam@gmail.com \
--cc=chris.hall@stackpath.com \
--cc=users@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).