summaryrefslogtreecommitdiffstats
path: root/trex_config.asciidoc
diff options
context:
space:
mode:
Diffstat (limited to 'trex_config.asciidoc')
-rwxr-xr-xtrex_config.asciidoc48
1 files changed, 44 insertions, 4 deletions
diff --git a/trex_config.asciidoc b/trex_config.asciidoc
index ca68bbe7..5fc5a0fc 100755
--- a/trex_config.asciidoc
+++ b/trex_config.asciidoc
@@ -127,7 +127,9 @@ or use the default config file `/etc/trex_cfg.yaml`
* Below is an example of how to configure TRex IP addresses. TRex will issue ARP for default_gw,
and send gratuitous ARP for ip, on each port. This works, starting from TRex version 2.10.
If you want to configure MAC addresses manually (equivalent to static
-ARP), or running older TRex version, please see the full description of config file parameters in the manual.
+ARP), or running older TRex version, information is available at the end of the presentation.
+Full description of config file parameters can be found in the manual.
+
[source,python]
----
@@ -243,13 +245,51 @@ the switch to learn the MAC addresses of both sides.
$./t-rex-64 -f cap2/dns.yaml -m 1 -d 10 -l 1000
...........................................
+== MAC based configuration
+
+* If you use TRex version older than 2.10, or wish to have MAC based configuration, TRex config
+file must contain the following (instead of the ``ip'' and ``default_gw'').
+[source,python]
+----
+ - port_limit : 2
+ port_info : # set eh mac addr
+ - dest_mac : [0x0,0x0,0x0,0x1,0x0,0x0] <1>
+ src_mac : [0x0,0x0,0x0,0x2,0x0,0x0] <2>
+ - dest_mac : [0x0,0x0,0x0,0x3,0x0,0x0] <3>
+ src_mac : [0x0,0x0,0x0,0x4,0x0,0x0] <4>
+----
+=============================================================================
+. Should be Router's TenG 0/0/0 mac-address.
+. Router should be configured to send to this mac-address.
+. Should be Router's TenG 0/0/1 mac-address.
+. Router should be configured to send to this mac-address.
+=============================================================================
+
+* On the router side, you must add the following static ARP configuration.
+
+[source,python]
+----
+ arp 12.12.12.2 0000.0002.0000 ARPA <1>
+ arp 11.11.11.2 0000.0004.0000 ARPA <2>
+----
+<1> TRex port 0 source mac-address.
+<2> TRex port 1 source mac-address.
+
== Linux config
* Assuming the same setup with Linux as DUT instead of the router, you can do the following.
* Configure IPs of Linux interfaces to 12.12.12.1 and 11.11.11.1
-* route add -net 48.0.0.0 netmask 255.0.0.0 gw 12.12.12.2
-* route add -net 16.0.0.0 netmask 255.0.0.0 gw 11.11.11.2
-
+[source,python]
+----
+route add -net 48.0.0.0 netmask 255.0.0.0 gw 12.12.12.2
+route add -net 16.0.0.0 netmask 255.0.0.0 gw 11.11.11.2
+----
+* If you have MAC based TRex config, you should also add:
+[source,python]
+----
+arp -s 12.12.12.2 00:00:00:04:00:00
+arp -s 11.11.11.2 00:00:00:04:00:00
+----
== Static route configuration - IPV6