Can we generate the traffic from external pcap file in TREX traffic generator

2,198 views
Skip to first unread message

akanksha...@gmail.com

unread,
Feb 11, 2019, 12:50:48 PM2/11/19
to TRex Traffic Generator
As we can see /trex-core/scripts/cap2 contains .yaml file and .pcap files, like we can run sudo ./t-rex-64 -f cap2/dns.yaml -m 10 -d 10 ..... This dns.yaml file contains dns.pcap(which generates the traffic from trex server) in cap_info which generates traffic.
So if I am having some 5GB pcap file, will I be able to generate the traffic from any command or I have to create some .yaml for this(this pcap is generated from our sources)

Yaroslav Brustinov

unread,
Feb 12, 2019, 5:43:47 AM2/12/19
to akanksha...@gmail.com, TRex Traffic Generator
Hi,

If it's OK to send the pcap via single interface, you could use stateless mode:
1. Run server: sudo ./t-rex-64 -i
2. Run console in another shell: ./trex-console
3. Use push -r command at console (make sure path is available at server): push -r --port 0 -f <path to pcap>

Thanks,
Yaroslav.

On Mon, Feb 11, 2019 at 7:50 PM <akanksha...@gmail.com> wrote:
As we can see /trex-core/scripts/cap2 contains .yaml file and .pcap files, like we can run sudo ./t-rex-64 -f cap2/dns.yaml -m 10 -d 10 ..... This dns.yaml file contains dns.pcap(which generates the traffic from trex server) in cap_info which generates traffic.
So if I am having some 5GB pcap file, will I be able to generate the traffic from any command or I have to create some .yaml for this(this pcap is generated from our sources)

--
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 post to this group, send email to trex...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trex-tgn/241b3bd4-97aa-434f-8030-4e7310b18e2c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

akanksha...@gmail.com

unread,
Feb 12, 2019, 5:57:13 AM2/12/19
to TRex Traffic Generator
Thanks a lot. It worked for me.

er.sune...@gmail.com

unread,
Jun 19, 2020, 3:45:38 PM6/19/20
to TRex Traffic Generator
Thank you Yaoslav. I also had the same question, now resolved by the following steps.
One additional question I have,  this 'push -r --port 0 -f <path to pcap>' replays each packet using the same timestamp what mentioned in PCAP ?

On Tuesday, February 12, 2019 at 8:43:47 AM UTC-2, Yaroslav Brustinov wrote:
Hi,

If it's OK to send the pcap via single interface, you could use stateless mode:
1. Run server: sudo ./t-rex-64 -i
2. Run console in another shell: ./trex-console
3. Use push -r command at console (make sure path is available at server): push -r --port 0 -f <path to pcap>

Thanks,
Yaroslav.

On Mon, Feb 11, 2019 at 7:50 PM <akanksha...@gmail.com> wrote:
As we can see /trex-core/scripts/cap2 contains .yaml file and .pcap files, like we can run sudo ./t-rex-64 -f cap2/dns.yaml -m 10 -d 10 ..... This dns.yaml file contains dns.pcap(which generates the traffic from trex server) in cap_info which generates traffic.
So if I am having some 5GB pcap file, will I be able to generate the traffic from any command or I have to create some .yaml for this(this pcap is generated from our sources)

--
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...@googlegroups.com.

Yaroslav Brustinov

unread,
Jun 20, 2020, 2:44:19 PM6/20/20
to er.sune...@gmail.com, TRex Traffic Generator
> One additional question I have,  this 'push -r --port 0 -f <path to pcap>' replays each packet using the same timestamp what mentioned in PCAP ?
It uses timestamps in pcap and has inaccuracy of IO - reading from file.

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/c7058b06-f330-4ce8-83d0-9614528dedd2o%40googlegroups.com.

Maxim Ciornii

unread,
Sep 18, 2020, 10:21:48 AM9/18/20
to TRex Traffic Generator
Hi, 

using push, is it possible to change src and dst IP addresses?
thanks.

Reply all
Reply to author
Forward
0 new messages