summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--draft_trex_stateless.asciidoc66
-rwxr-xr-xtrex_book.asciidoc2
-rwxr-xr-xwscript2
3 files changed, 62 insertions, 8 deletions
diff --git a/draft_trex_stateless.asciidoc b/draft_trex_stateless.asciidoc
index 0a3eed5c..32126b8c 100644
--- a/draft_trex_stateless.asciidoc
+++ b/draft_trex_stateless.asciidoc
@@ -35,7 +35,7 @@ endif::backend-xhtml11[]
** Field engine program
*** Ability to change any field inside the packet, for example src_ip = 10.0.0.1-10.0.0.255
*** Ability to change the packet size (e.g. Random packet size 64-9K)
-** Mode -Continues/Burst/Multi burst support
+** Mode - Continuous/Burst/Multi burst support
** Rate can be specified in:
*** Packet per second -(e.g. 14MPPS)
*** L1 bandwidth (e.g. 500Mb/sec)
@@ -78,7 +78,7 @@ TRex has limited functionality compared to IXIA, but has some advantages. The fo
| Multi stream | 255 | [green]*Unlimited* |
| Packet build flexibility | Limited | [green]*Scapy- Unlimited* | e.g GRE/VXLAN/NSH is supported. Can be extended to future protocols
| Packet Field engine | limited | [green]*Unlimited* |
-| Tx Mode | Continues/Burst/Multi burst | Continues/Burst/Multi burst|
+| Tx Mode | Continuous/Burst/Multi burst | Continuous/Burst/Multi burst|
| ARP Emulation | Yes | Not yet - workaround |
| Automation | TCL/Python wrapper to TCL | [green]*native Python/Scapy* |
| Automation speed sec| 30sec | [green]*1msec* | test of load/start/stop/get counters
@@ -136,10 +136,34 @@ image::images/stateless_objects.png[title="TRex Entities",align="left",width={p_
** *Mode*: How to send the packet. Continuous/Burst/Multi Burst
** *Rx Stats*: Which Statstistic to collect for each stream
** *Rate*: Specified in Packet Per Second (pps) or bandwidth (bps)
-** *Action*: The next stream to go after this stream is finished. Valid for Burst/Continues mode
+** *Action*: The next stream to go after this stream is finished. Valid for Burst/Continuous mode
-==== TRex package folders
+=== Statful vs Stateless
+
+TRex Stateless support is basic L2/L3 tests more for Switch/Router.
+With Stateless it is possible to define a Stream that has a *one* packet template, define a program to change any fields in the packet and run it in continues/burst/multi-burst mode.
+With Statless you *can't* learn NAT translation because there is no context of flow/client/server. In Stateful the basic building block is a flow/application (That compose from many packets).
+However, Using Stateless mode, it is much more flexible as you can define any type of packets and build simple program and in a way you can mimic Stateful but not everything.
+For example, you can load a pcap with the number of packets as a link of streams
+a->b->c->d-> back to a
+And create a program for each stream to change src_ip=10. 0.0.1-10.0.0.254 this will create something similar to Stateful but the underline is totally different.
+If you are confused you probably need Stateless.
+
+.Statful vs Stateless
+[cols="1^,3^,3^", options="header"]
+|=================
+| Feature | Stateless |Statful
+| Flow base | No | Yes
+| NAT | No | Yes
+| Tunnel | Yes | Only specific
+| L7 App emulation | No | Yes
+| Any type of packet | Yes | No
+| Latency Jitter | Per Stream | Global/Per flow
+|=================
+
+
+=== TRex package folders
[cols="5,5", options="header",width="100%"]
|=============================
@@ -203,7 +227,7 @@ def register():
return STLS1()
----
<1> Define the packet, in this case it IP/UDP with 10 bytes of 'x'(0x78) .See more here link:http://www.secdev.org/projects/scapy/doc/[Scapy]
-<2> Mode is Continues with a rate of 1 pps (default rate is 1 PPS)
+<2> Mode is Continuous with a rate of 1 pps (default rate is 1 PPS)
<3> get_streams function is mandatory
<4> Each Traffic profile module should have a `register` function
@@ -796,7 +820,7 @@ def register():
return STLS1()
----
<1> Define the packet, in this case it IP/UDP with 10 bytes of 'x'
-<2> Mode is Continues with rate of 1 PPS (default rate is 1 PPS)
+<2> Mode is Continuous with rate of 1 PPS (default rate is 1 PPS)
<3> Each Traffic profile module should have a `register` function
Now let try to run it throw TRex simulator limiting the number of packets to 10
@@ -3048,6 +3072,36 @@ get keyboard
=== Appendix
+==== Scapy packet examples
+
+[source,python]
+----
+
+# udp header
+Ether()/IP(src="16.0.0.1",dst="48.0.0.1")/UDP(dport=12,sport=1025)
+
+# UDP over one valn
+Ether()/Dot1Q(vlan=12)/IP(src="16.0.0.1",dst="48.0.0.1")/UDP(dport=12,sport=1025)
+
+# UDP QinQ
+Ether()/Dot1Q(vlan=12)/Dot1Q(vlan=12)/IP(src="16.0.0.1",dst="48.0.0.1")/UDP(dport=12,sport=1025)
+
+#TCP over IP ove VALN
+Ether()/Dot1Q(vlan=12)/IP(src="16.0.0.1",dst="48.0.0.1")/TCP(dport=12,sport=1025)
+
+# IPv6 over valn
+Ether()/Dot1Q(vlan=12)/IPv6(src="::5")/TCP(dport=12,sport=1025)
+
+#Ipv6 over UDP over IP
+Ether()/IP()/UDP()/IPv6(src="::5")/TCP(dport=12,sport=1025)
+
+#DNS packet
+Ether()/IP()/UDP()/DNS()
+
+#HTTP packet
+Ether()/IP()/TCP()/"GET / HTTP/1.1\r\nHost: www.google.com\r\n\r\n"
+----
+
==== HLT supported Arguments anchor:altapi-support[]
diff --git a/trex_book.asciidoc b/trex_book.asciidoc
index 3c7b30fd..ed6d8b37 100755
--- a/trex_book.asciidoc
+++ b/trex_book.asciidoc
@@ -107,7 +107,7 @@ TRex curretly works on x86 architecture and can operates well on Cisco UCS hardw
| Bandwidth | Chipset | Example
| 1Gb/sec | Intel I350 | Intel 4x1GE 350-T4 NIC
| 10Gb/sec | Intel 82599 | Intel x520-D2 Cisco Order tool 2X Intel N2XX-AIPCI01, Intel X520 Dual Port 10Gb SFP+ Adapter
-| 40Gb/sec | Intel XL710 Intel X710 | QSFP+, SFP+
+| 40Gb/sec | Intel XL710 Intel X710 | QSFP+ (copper/optical), SFP+
| VMXNET / +
VMXNET3 (read notes) | VMware paravirtualize | connect using vmWare vSwitch
| E1000 | paravirtualize | vmWare/KVM/VirtualBox
diff --git a/wscript b/wscript
index f7e5024d..c7823d1c 100755
--- a/wscript
+++ b/wscript
@@ -179,7 +179,7 @@ def build(bld):
source='trex_book.asciidoc waf.css', target='trex_manual.html', scan=ascii_doc_scan)
bld(rule='${ASCIIDOC} -a docinfo -a stylesheet=${SRC[1].abspath()} -a icons=true -a toc2 -a max-width=55em -d book -o ${TGT} ${SRC[0].abspath()}',
- source='draft_trex_stateless.asciidoc waf.css', target='draft_trex_stateless.html', scan=ascii_doc_scan)
+ source='draft_trex_stateless.asciidoc waf.css', target='draft_trex_stateless1.html', scan=ascii_doc_scan)
bld(rule=convert_to_pdf_book,
source='trex_book.asciidoc waf.css', target='trex_book.pdf', scan=ascii_doc_scan)