Some questions

1,670 views
Skip to first unread message

AndersKn

unread,
Dec 10, 2015, 8:20:01 AM12/10/15
to TRex Traffic Generator
Hi!

I’m using the TRex traffic generator and I have some general questions:

It seems like TRex only supports the protocol stack Ethernet—IP—TCP/UDP.
When I try with other type of traffic (e.g. pure Ethernet, ICMP or SCTP), I get the error message
"ERROR packet 1 is not supported, should be IP(0x0800)/TCP/UDP format try to convert it using Wireshark !"
Am I correct about the limitation? Can other traffic types (e.g. pure Ethernet, ICMP, SCTP) be used with TRex?

I have received the error messages
"more than one flow in this cap ignore it !!",
"ERORR in one of the cap file, you should have one flow per cap file or valid plugin" and
"ERROR reading YAML template files, please verify that they are valid"
What do these messages mean? What is meant by "flow"? Is it, in some way, possible to use a pcap file with more than one flow and if yes, how?

When using a pcap file with packets larger that 2048 I get the error message
"ERROR packet is too big, bigger than 2048"
Can this size be increased and if yes, how?

Regards
Anders

Dan Klein

unread,
Dec 10, 2015, 8:56:49 AM12/10/15
to TRex Traffic Generator
Hi Andres...

Thanks for using TRex.

I'll leave the answers to the first and last questions to Hanoch who can elaborate more on trex roadmap and exact capabilities with protocols since this is ongoing process he can answer best.

As to your question about Flows in cap files:

Statefull TRex is designed to simulate traffic similar as possible to client-server applications.

Each cap file specified in the .yanl configuration file describes a SINGLE flow, matching a single interaction of client and server for specific traffic profile, for example DNS.

A flow means that a the cap file should only include a correspondence between a single client and a single server based of the flow 5-tuple:
Source IP / Source Port / Destination IP / Destination Port/ Protocol in use.

So, each cap file should only include a single flow, and you can extend the number of flows by adding more flows (possibly same cap) to the yaml file.

This is all true for STATEFULL TRex, stateless mode is another thing.

Thanks,
Dan

hanoh haim

unread,
Dec 10, 2015, 10:55:33 AM12/10/15
to Dan Klein, TRex Traffic Generator

Hi Andres,



TRex in Stateful mode must have a five tuple flow. IP packet does not have a flow. SCTP has a flow but it is not supported yet. Only flows over UDP/TCP are supported.

To summarize the limitation:

 

1) Packet size is limited of 2K

2) Fragments   

3) TCP/UDP over various tunnels - e.g MPLS/GRE/


We plan to add support for it


You can support application with more than one "flow" in the pcap but for that you need to add emulation or plugin to tell TRex how the flows are related  ( see RTSP/SIP example) 

For IP and non IP packets we have stateless support coming soon that will solve any type of packet 

 

You can always join and contribute to make it better

 

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 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/1eab201b-d09e-448b-ad46-5c8af381d3e8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Hanoh
Sent from my iPhone

twardow...@gmail.com

unread,
Jan 26, 2017, 3:22:49 AM1/26/17
to TRex Traffic Generator, anders.k...@gmail.com
Hi,
I have similar problem - when I would like to send GRE packets:Ethernet/IP/GRE/IP/UDP I have the same error:
"ERROR packet 1 is not supported, should be Ethernet/IP(0x0800)/(TCP|UDP) format try to convert it using Wireshark !

ERROR reading YAML template files, please verify that they are valid"

Question is - have you added a support for GRE in stateful mode?
Or the only way to send GRE packets is stateless mode?

BR,
Aleksander Twardowski

Yaroslav Brustinov

unread,
Jan 26, 2017, 7:16:42 AM1/26/17
to twardow...@gmail.com, TRex Traffic Generator, anders.k...@gmail.com
Hi, Aleksander.

The stateful is still usual flows of Ether/IP/TCP etc.

Thanks,
Yaroslav.

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

To post to this group, send email to trex...@googlegroups.com.

twardow...@gmail.com

unread,
Jan 26, 2017, 7:19:47 AM1/26/17
to TRex Traffic Generator, twardow...@gmail.com, anders.k...@gmail.com
Hi,

Thanks for your answer!
Finally I found the solution for my problem. I am using stateless mode.
The problem was that I have to automate this (t-rex-64 and trex-console) using Python but I finally fixed it with threads in Python.

BR,
Aleksander Twardowski

wesleynien

unread,
Nov 2, 2018, 5:52:33 AM11/2/18
to TRex Traffic Generator
Hi folks,

I would like to generate traffic of VoIP call (SIP + RTP, with consistent SDP and RTP IP-port)
where are the related files for RTSP/SIP example?

in 4.7. SFR traffic YAML of the TRex (stateful) manual
https://trex-tgn.cisco.com/trex/doc/trex_manual.html
I found some notes as below

- name: avl/delay_10_rtp_160k_full.pcap
cps : 2.776
ipg : 10000
rtt : 10000
w : 1
one_app_server : false
plugin_id : 1 2

- name: avl/delay_10_sip_video_call_full.pcap
cps : 29.347
ipg : 10000
rtt : 10000
w : 1
plugin_id : 2 1

1 Plugin for SIP protocol, used to replace the IP/port in the control flow base on the data-flow.
2 Plugin for RTSP protocol used to replace the IP/port in the control flow base on the data-flow.

Is there any document/source code I can reference to understand the "plugin" mechanism?

Thanks in adavance.

BR,
wesleynien


Hanoch Haim於 2015年12月10日星期四 UTC+8下午11時55分33秒寫道:

hanoh haim

unread,
Nov 2, 2018, 5:57:29 AM11/2/18
to wesleynien, TRex Traffic Generator
Hi,
There is no documentation on this, this is more of a hack to solve this specific use-case (RTP/RTSP).
I think we should have more general solution for ASTF.
have a look into the old bp_sim.cpp grep for “plugin”.

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 post to this group, send email to trex...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

George

unread,
Feb 26, 2021, 2:54:51 AM2/26/21
to TRex Traffic Generator
I know that this thread is quite old, but I also have a relevant question - are custom protocols supported in stateless mode? dankl[...] Dan mentioned "...stateless mode is another thing"

open stack

unread,
Mar 1, 2021, 9:13:00 AM3/1/21
to TRex Traffic Generator
Hello,

I have a question probably related with root of this topic.
Can trex be used to make performance tests using SCTP protocol and as DUT statefull firewall?

What i'm wondering about is the scenario like on diagram attached. One baremetal server with two NIC cards plugged directly to statefull firewall (which support SCTP protocol). Can trex support such scenario? if yes, please could someone show me direction, what /where to find information needed to achieve this?


What i understood after brief searching of this group and documentation, to test Firewall -  i need STF mode or rather ASTF. In the ASTF documentation (https://trex-tgn.cisco.com/trex/doc/trex_astf.html), i didn't find any information about using SCTP protocol (instead of UDP or TCP). In this topic i see, that for sure in the past SCTP was not supported at all, some time later support was added but in stateless mode. On the other hand in this document: https://trex-tgn.cisco.com/trex/doc/trex_manual.html#_measuring_jitter_latency specify using SCTP for jitter measuring... but from faq - i understood that it is rather used as a kind of transport for internal measurement ? And so how it looks like today? 

Br.
trex_sctp_dut.png

Manoj Singh

unread,
May 8, 2021, 3:37:23 PM5/8/21
to TRex Traffic Generator
We are trying to play ftp pcap which has 2 flows. One with control (DST port - 21 ) and other random data port. While running the ASTF profile we are seeing below issue.

ASTF Profile:

from trex.astf.api import *


class Prof1():
    def get_profile(self):
        # ip generator
        ip_gen_c = ASTFIPGenDist(ip_range=["11.1.20.2","11.1.20.2"],
                                 distribution="seq")
        ip_gen_s = ASTFIPGenDist(ip_range=["11.1.20.4","11.1.20.4"],
                                  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="/ftp.pcap"
                                      ,cps=1)
                                     ])
def register():
    return Prof1()

Error:
converting astf profile astf/trex_astf_profile.py to json /tmp/astf.json
ERROR: Could not convert astf profile to JSON:

Python Traceback follows:

  File "astf/trex_astf_profile.py", line 18, in get_profile
    ,cps=1)
  File "/root/trex-core/scripts/automation/trex_control_plane/interactive/trex/astf/trex_astf_profile.py", line 1636, in __init__
    prog_c = ASTFProgram(file=cap_file, side="c")
  File "/root/trex-core/scripts/automation/trex_control_plane/interactive/trex/astf/trex_astf_profile.py", line 303, in __init__
    cap.analyze()
  File "/root/trex-core/scripts/automation/trex_control_plane/interactive/trex/astf/cap_handling.py", line 280, in analyze
    self.obj.analyze()
  File "/root/trex-core/scripts/automation/trex_control_plane/interactive/trex/astf/cap_handling.py", line 196, in analyze
    self.fail('Packet #%s is SYN+ACK, but there was already SYN+ACK in cap file' % index)
  File "/root/trex-core/scripts/automation/trex_control_plane/interactive/trex/astf/cap_handling.py", line 48, in fail
    raise ASTFError('\nError for file %s: %s\n' % (self.file_name, msg))
ASTFError:
******

Exception stack (most recent call last):

#6     trex_astf_profile.py:1768        - 'profile = module.register().get_profile(**kwargs)'
#5     trex_astf_profile.py:18          - ',cps=1)'
#4     trex_astf_profile.py:1636        - 'prog_c = ASTFProgram(file=cap_file, side="c")'
#3     trex_astf_profile.py:303         - 'cap.analyze()'
#2     cap_handling.py:280              - 'self.obj.analyze()'
#1     cap_handling.py:196              - 'self.fail('Packet #%s is SYN+ACK, but there was already SYN+ACK in cap file' % index)'
#0     cap_handling.py:48               - 'raise ASTFError('\nError for file %s: %s\n' % (self.file_name, msg))'

Summary error message:


Error for file /root/trex-core/scripts/avl/ftp.pcap: Packet #15 is SYN+ACK, but there was already SYN+ACK in cap file

Is there a way to run this pcap file with both the flows. Is it achievable with trex. If yes share the steps

Thanks,
Manoj

tariro mukute

unread,
Aug 1, 2022, 5:14:43 AM8/1/22
to TRex Traffic Generator

Hi,

I also have a question similar to the above. How do I get to use ASTF with the SCTP protocol? Did you manage to find any pointers or solution?

My goal is to generate traffic NGAP traffic. In the unfortunate event that this is not yet supported, are there any pointers to how we can extend the ASTF to support an additional protocol?

Thanks,
Tariro
Reply all
Reply to author
Forward
0 new messages