'push_remote' command says success in pushing Pcap but no packets are sent

465 views
Skip to first unread message

Luc Lemieux

unread,
Mar 18, 2021, 11:15:12 AM3/18/21
to TRex Traffic Generator
Launch TRex with 'sudo ./t-rex-64 -i' connect to console.

Push command: 

         trex>push -r -f '/tmp/ipv6.pcap' -p 0 -c 1

         Pushing remote PCAP on port(s) [0]:                          [SUCCESS]

         2.56 [ms]

         trex>

         2021-03-18 15:03:02 - [server][info]     - Port 0 job done

It says success but no packets are sent. 

Pcap contains 500 frames looking like:

Capture_packet.PNG
The port works because I have code generating streams and sending packets on this port without issues.

Thank you,

Luc Lemieux

Luc Lemieux

unread,
Mar 18, 2021, 2:58:42 PM3/18/21
to TRex Traffic Generator
Forgot to mention that before trying with the console, I tried coding it in my Generator/Validator app that uses the Python API like this:

            if client.isPcap():
                    self.trex_client.push_remote(pcap_filename = client.pcap_file,
                        ports = client.trex_port_number,
                        ipg_usec = 100,
                        count = client.getPcapLoopCount())

and that did not work either.

The server is launched locally as a process so the Pcap file is on the same server in /tmp

My application has no issue generating traffic from crafted packets using STLStream and STLPktBuilder and sending theses streams on the same port used in both examples. 

I have not tried push_pcap because i do not want to modify the packets when sending and want to be able to use big files to replay traffic.
Message has been deleted

Luc Lemieux

unread,
Mar 19, 2021, 9:07:05 AM3/19/21
to TRex Traffic Generator
Hi, i did not because you example of using 'push_remote' does not, and if i do:

port 0: Ethernet Controller X710 for 10GbE SFP+
     Port 0 : *** command 'start' cannot be executed on current state: 'IDLE on profile_id(_).

The example in TRex doc:
Example_push_remote.PNG

So if I write it close to 100% like the example (except using my client variable that is connected instead of 'c' rest even rest ports is the same) above it does not send.

But yesterday, I created another branch and tried to use 'load_pcap' to load streams into a profile and do start like I usually do when I craft the packets myself and that worked...
Problem with that is I want to be able at some point to replay big files and I think the doc mentions that the functions that load the packets as streams are pretty much limited to 1 MB files.

So this works, with the same file:

    def generateFromPcap(pcap_file, ipg_usec, loop_count, client_id, trex_client_port):
        print(f'    Send traffic of Pcap file {pcap_file}: trex port: {trex_client_port} loop count: {loop_count}')
        return STLProfile.load_pcap(pcap_file, ipg_usec = 10, loop_count = loop_count).get_streams()

Full output of test using 'load_pcap':
Full_test_result.PNG

Luc Lemieux

unread,
Mar 23, 2021, 8:17:45 AM3/23/21
to TRex Traffic Generator
Hi all, any idea? Is 'push_remote' deprecated?

Thank you,

Luc

hanoh haim

unread,
Mar 24, 2021, 8:41:03 AM3/24/21
to Luc Lemieux, TRex Traffic Generator
Hi Luc, 
It is not deprecated and it should work without start. In this case the pcap file is read in the server side. 
Suggest to try another pcap file and look into the counters to get more information. 

Did you try a simple pcap file (http_simple.pcap for example)?
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/b0282c3a-ec20-4ed1-a234-c9d292dc50fan%40googlegroups.com.


--
Hanoh
Sent from my iPhone
Reply all
Reply to author
Forward
0 new messages