summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rwxr-xr-xdoc/trex_book.asciidoc44
1 files changed, 30 insertions, 14 deletions
diff --git a/doc/trex_book.asciidoc b/doc/trex_book.asciidoc
index 366102b8..c59aa1f1 100755
--- a/doc/trex_book.asciidoc
+++ b/doc/trex_book.asciidoc
@@ -664,15 +664,30 @@ include::trex_book_basic.asciidoc[]
== Advanced features
+=== VLAN (dot1q) support
+
+If you want VLAN tag to be added to all traffic generated by TRex, you can acheive that by adding ``vlan'' keyword in each
+port section in the platform config file, like described xref:trex_config[here]. +
+You can specify different VLAN tag for each port, or even use VLAN only on some of the ports. +
+One useful application of this can be in a lab setup where you have one TRex and many DUTs, and you want to test different
+DUT on each run, without changing cable connections. You can put each DUT on a VLAN of its own, and use different TRex
+platform config files with different VLANs on each run.
+
+
=== Utilizing maximum port bandwidth in case of asymmetric traffic profile
-anchor:trex_vlan[]
+anchor:trex_load_bal[]
+
+[NOTE]
+If you want simple VLAN support, this is probably *not* the feature you want. This is used for load balancing.
+If you want VLAN support, please look at ``vlan'' field xref:trex_config[here].
+
The VLAN Trunk TRex feature attempts to solve the router port bandwidth limitation when the traffic profile is asymmetric. Example: Asymmetric SFR profile.
This feature converts asymmetric traffic to symmetric, from the port perspective, using router sub-interfaces.
This requires TRex to send the traffic on two VLANs, as described below.
-.YAML format
+.YAML format - This goes into traffic yaml file
[source,python]
----
vlan : { enable : 1 , vlan0 : 100 , vlan1 : 200 }
@@ -685,27 +700,29 @@ This requires TRex to send the traffic on two VLANs, as described below.
- duration : 0.1
vlan : { enable : 1 , vlan0 : 100 , vlan1 : 200 } <1>
----
-<1> Enable VLAN feature, vlan0==100 , vlan1==200
-
+<1> Enable load balance feature, vlan0==100 , vlan1==200
+For a full file example please look in TRex source at scripts/cap2/ipv4_load_balance.yaml
+
*Problem definition:*::
Scenario: TRex with two ports and an SFR traffic profile.
-.Without VLAN/sub interfaces
+.Without VLAN/sub interfaces, all client emulated traffic is sent on port 0, and all server emulated traffic (HTTP response for example) on port 1.
[source,python]
----
-0 ( client) -> [ ] - 1 ( server)
+TRex port 0 ( client) <-> [ DUT ] <-> TRex port 1 ( server)
----
-Without VLAN support the traffic is asymmetric. 10% of the traffic is sent from port 0 (client side), 90% is from port 1 (server). Port 1 become the bottlneck (10Gb/s limit) before port 0.
+Without VLAN support the traffic is asymmetric. 10% of the traffic is sent from port 0 (client side), 90% is from port 1 (server). Port 1 is the bottlneck (10Gb/s limit).
.With VLAN/sub interfaces
[source,python]
----
-port 0 ( client VLAN0) <-> | | <-> port 1 ( server-VLAN0)
-port 0 ( server VLAN1) <-> | | <-> port 1 ( client-VLAN1)
+TRex port 0 ( client VLAN0) <-> | DUT | <-> TRex port 1 ( server-VLAN0)
+TRex port 0 ( server VLAN1) <-> | DUT | <-> TRex port 1 ( client-VLAN1)
----
-In this case both ports have the same amount of traffic.
+In this case, traffic on vlan0 is sent as before, while for traffic on vlan1, order is reversed (client traffic sent on port1 and server traffic on port0).
+TRex divids the flows evenly between the vlans. This results an equal amount of traffic on each port.
*Router configuation:*::
[source,python]
@@ -766,8 +783,7 @@ In this case both ports have the same amount of traffic.
set ip next-hop 11.88.11.12
!
----
-<1> Disable the IP on the main port it is important.
-// above, clarify what's important
+<1> Main interface must not have IP address.
<2> Enable VLAN1
<3> PBR configuration
<4> Enable VLAN2
@@ -1307,7 +1323,7 @@ Cpu Utilization : 0.1 %
<4> true (default) indicates that the IPG is taken from the cap file (also taking into account cap_ipg_min and cap_override_ipg if they exist). false indicates that IPG is taken from per template section.
<5> The following two options can set the min ipg in microseconds: (if (pkt_ipg<cap_ipg_min) { pkt_ipg=cap_override_ipg} )
<6> Value to override (microseconds), as described in note above.
-<7> Enable vlan feature. See xref:trex_vlan[trex_vlan section] for info.
+<7> Enable load balance feature. See xref:trex_load_bal[trex load balance section] for info.
<8> Enable MAC address replacement by client IP.
@@ -1397,7 +1413,7 @@ the result as dest MAC. If no dest_mac given, and no ARP response received, TRex
<11> Source MAC to use when sending packets from this interface. If not given (since version 2.10), MAC address of the port will be used.
<12> If given (since version 2.10), TRex will issue gratitues ARP for the ip + src MAC pair on appropriate port. In stateful mode,
gratitues ARP for each ip will be sent every 120 seconds (Can be changed using --arp-refresh-period argument).
-<13> If given, gratitues ARP and ARP request will be sent using the given VLAN tag.
+<13> If given (since version 2.18), all traffic on the port will be sent with this VLAN tag.
<14> Old MAC address format. New format is supported since version v2.09.
[NOTE]