Require all base packet available options to create user defined streams

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-04-2017 07:39 AM
Hi Team,
I'm unable to find all the specific options available to define the packet for the user streams. Please provide the same.
Require options under each layer mode,
L2: vlan_num, vlan_mode,vlan_priority
L3: IP incremental range, dscp/tos/precedence, fragmentation, ttl
L4: tcp flags
Also, instead of using the mac defined in yaml file, how do we overwrite during the packet definition in stream?
pkt = STLPktBuilder( pkt = Ether(src=src_mac,dst=dst_mac)/IP(src=src_ip,dst=dst_ip)/UDP(dport=12,sport=1025)/(10*'x') )
STLStream( packet = pkt,mode = STLTXCont())
Regards,
Anurag
- Labels:
-
TRex

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-07-2017 11:30 PM
Team,
Please, reply for my query.
-Anurag

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-08-2017 01:05 AM
Hi Anurag,
All packets are built using Scapy library, which is quite popular, so google on every scapy issue gives you the answer.
For example (google for scapy + tcp flags):
How to Build a TCP Connection in Scapy
https://stackoverflow.com/questions/20429674/get-tcp-flags-with-scapy
Regarding setting MAC address, this is exactly like you described:
Ether(src=src_mac,dst=dst_mac)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-08-2017 02:09 AM
hi Ido,
Thanks for the search options, I'm able to install scapy-python3 in my local machine and get the options available for packet creation.
However, I've a small query regarding my post above, when I start the trex server below yaml contents,
- port_limit : 2
version : 2
interfaces : ["86:00.0","86:00.1"]
prefix : server_iot
zmq_pub_port : 5001
zmq_rpc_port : 5002
port_info :
- src_mac : '00:00:00:71:00:01'
- src_mac : '00:00:00:71:00:02'
I'm able to receive bi-directional traffic only when i specify the same mac addresses defined in my yaml file. Could you please help me on how we overwrite them as we've options in GUI to use 'Fixed/Increment/Decrement/TreXConfig'?
-Anurag

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-08-2017 02:53 AM
Hi Anurag,
Are TRex ports connected in loopback, or you have some DUT?
Maybe your DUT drops the packets?
Can you specify what you send and what you expect to receive?
Thanks,
Ido
