I am trying to create multiple flows in a single stream using example scripts stl/bench.py in stateless mode. The setup is L2 loopback in a VM.
Command: start -f stl/bench.py -t vm=tuple,size=64 -p 0 --force
But the packet capture shows me single src and dst port both in RX and TX.
The definition of multiple flows if I understand correctly is this one https://tools.ietf.org/html/rfc3917#section-2.1
I believe TRex also follows this definition.
I want to create traffic between a single source and destination IP with multiple UDP ports. I achieved this by creating streams but we have a limit of 20k streams per port. I want to create around 500K-1M flows. Please guide how can I achieve this?
Thanks,
Deepanshu
--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/trex-tgn/a09cbb5a-8263-4b46-b093-d23067175721%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/trex-tgn/e2b2c517-ad3a-4e4f-b214-b62dda11cf45%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
def create_stream (self, packet_len):For multiple src and dst ports, I have made these changes in udp_1pkt_tuple_gen.py:
# Create base packet and pad it to size
base_pkt = Ether() / IP(src="50.0.50.6", dst="50.0.50.8") / UDP(dport=12, sport=1025)
pad = max(0, packet_len - len(base_pkt)) * 'x'
vm = STLScVmRaw([STLVmTupleGen(ip_min="50.0.50.6", ip_max="50.0.50.6",
port_min=1025, port_max=65535,
name="tuple"), # define tuple gen
STLVmWrFlowVar(fv_name="tuple.ip", pkt_offset="IP.src"), # write ip to packet IP.src
STLVmFixIpv4(offset="IP"), # fix checksum
STLVmWrFlowVar(fv_name="tuple.port", pkt_offset="UDP.sport") # write udp.port
]
);
pkt = STLPktBuilder(pkt = base_pkt/pad,
vm = vm)
return STLStream(packet = pkt,
mode = STLTXCont())
def create_stream (self, packet_len):Both aren't working though.
# Create base packet and pad it to size
base_pkt = Ether() / IP(src="50.0.50.6", dst="50.0.50.8") / UDP(dport=12, sport=1025)
pad = max(0, packet_len - len(base_pkt)) * 'x'
vm = STLScVmRaw([STLVmTupleGen(ip_min="50.0.50.6", ip_max="50.0.50.6",
port_min=1025, port_max=65535,
name="tuple"), # define tuple gen
STLVmTupleGen(ip_min="50.0.50.8", ip_max="50.0.50.8",
port_min=1025, port_max=65535,
name="tuple2"), # define tuple gen
STLVmWrFlowVar(fv_name="tuple.ip", pkt_offset="IP.src"), # write ip to packet IP.src
STLVmWrFlowVar(fv_name="tuple2.ip", pkt_offset="IP.dst"), # write ip to packet IP.dst
STLVmFixIpv4(offset="IP"), # fix checksum
STLVmWrFlowVar(fv_name="tuple.port", pkt_offset="UDP.sport"), # write udp.port
STLVmWrFlowVar(fv_name="tuple2.port", pkt_offset="UDP.dport") # write udp.port
]
);
pkt = STLPktBuilder(pkt = base_pkt/pad,
vm = vm)
return STLStream(packet = pkt,
mode = STLTXCont())
To view this discussion on the web visit https://groups.google.com/d/msgid/trex-tgn/e2b2c517-ad3a-4e4f-b214-b62dda11cf45%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--HanohSent from my iPhone
--
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/CALwLA3XU4Sfoz0tHcL%3D1TrAgm2x6ORY6qCzOxKJ8_4mX7VFWwQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
def create_stream (self):
# UDP
base_pkt = Ether()/IP(src="50.0.50.6", dst="50.0.50.8")/UDP()
# vm
vm = STLScVmRaw( [
STLVmFlowVar(name="src_port",
min_value=1025,
max_value=65000,
size=2, op="random"),
STLVmFlowVar(name="dst_port",
min_value=1025,
max_value=65000,
size=2, op="random"),
STLVmFixIpv4(offset = "IP"), # fix checksum
STLVmWrFlowVar(fv_name="src_port",
pkt_offset= "UDP.sport"), # fix udp len
STLVmWrFlowVar(fv_name="dst_port",
pkt_offset="UDP.dport") # fix udp len
]
)
pkt = STLPktBuilder(pkt = base_pkt,
vm = vm)
return STLStream(packet = pkt,
random_seed = 0x1234,# can be remove. will give the same random value any run
mode = STLTXCont())
Hanoh
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/trex-tgn/e2b2c517-ad3a-4e4f-b214-b62dda11cf45%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--HanohSent from my iPhone
--
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 view this discussion on the web visit https://groups.google.com/d/msgid/trex-tgn/CALwLA3XU4Sfoz0tHcL%3D1TrAgm2x6ORY6qCzOxKJ8_4mX7VFWwQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.