cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1239
Views
1
Helpful
4
Replies

Require all base packet available options to create user defined streams

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

4 Replies 4

Team,

Please, reply for my query.

-Anurag

ibarnea
Cisco Employee
Cisco Employee

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)

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

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