aboutsummaryrefslogtreecommitdiffstats
path: root/resources/traffic_profiles
diff options
context:
space:
mode:
Diffstat (limited to 'resources/traffic_profiles')
-rw-r--r--resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst1000-1cnf.py52
-rw-r--r--resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst1000-2cnf.py52
-rw-r--r--resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst1000-4cnf.py52
-rw-r--r--resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst1000-8cnf.py52
-rw-r--r--resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst10000-1cnf.py52
-rw-r--r--resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst10000-2cnf.py52
-rw-r--r--resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst10000-4cnf.py52
-rw-r--r--resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst10000-8cnf.py52
-rw-r--r--resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst20000-1cnf.py52
-rw-r--r--resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst20000-2cnf.py52
-rw-r--r--resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst20000-4cnf.py52
-rw-r--r--resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst20000-8cnf.py52
-rw-r--r--resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst4-1cnf.py52
-rw-r--r--resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst4-2cnf.py50
-rw-r--r--resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst4-4cnf.py52
-rw-r--r--resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst40-1cnf.py52
-rw-r--r--resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst40-2cnf.py50
-rw-r--r--resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst40-4cnf.py52
-rw-r--r--resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst40-8cnf.py52
-rw-r--r--resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst400-1cnf.py48
-rw-r--r--resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst400-2cnf.py48
-rw-r--r--resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst400-4cnf.py48
-rw-r--r--resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst400-8cnf.py48
-rw-r--r--resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst40000-1cnf.py52
-rw-r--r--resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst40000-2cnf.py52
-rw-r--r--resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst40000-4cnf.py52
-rw-r--r--resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst40000-8cnf.py52
-rw-r--r--resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst5000-1cnf.py52
-rw-r--r--resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst5000-2cnf.py52
-rw-r--r--resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst5000-4cnf.py52
-rw-r--r--resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst5000-8cnf.py52
-rw-r--r--resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst60000-1cnf.py52
-rw-r--r--resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst60000-2cnf.py52
-rw-r--r--resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst60000-4cnf.py52
-rw-r--r--resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst60000-8cnf.py52
35 files changed, 1040 insertions, 760 deletions
diff --git a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst1000-1cnf.py b/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst1000-1cnf.py
index 47a3f371be..ab03d9506a 100644
--- a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst1000-1cnf.py
+++ b/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst1000-1cnf.py
@@ -18,10 +18,10 @@ Stream profile:
- Packet: ETH / IP /
- Direction 0 --> 1:
- Source IP address range: 10.0.0.1
- - Destination IP address range: 20.0.0.0 - 20.0.3.231
+ - Destination IP address range: 20.0.0.0 - 20.0.1.143
- Direction 1 --> 0:
- Source IP address range: 20.0.0.1
- - Destination IP address range: 10.0.0.0 - 10.0.3.231
+ - Destination IP address range: 10.0.0.0 - 10.0.1.143
"""
from trex.stl.api import *
@@ -36,17 +36,20 @@ class TrafficStreams(TrafficStreamsBaseClass):
super(TrafficStreamsBaseClass, self).__init__()
- self.p2_dst_start_mac = '02:02:00:00:00:00'
- self.p2_dst_end_mac = '02:02:00:00:00:00'
+ self.p1_dst_start_mac = u"02:02:00:00:12:00"
+ self.p1_dst_end_mac = u"02:02:00:00:12:00"
+
+ self.p2_dst_start_mac = u"02:02:00:00:02:00"
+ self.p2_dst_end_mac = u"02:02:00:00:02:00"
# IPs used in packet headers.
- self.p1_src_start_ip = '10.0.0.1'
- self.p1_dst_start_ip = '20.0.0.0'
- self.p1_dst_end_ip = '20.0.3.231'
+ self.p1_src_start_ip = u"10.0.0.1"
+ self.p1_dst_start_ip = u"20.0.0.0"
+ self.p1_dst_end_ip = u"20.0.3.231"
- self.p2_src_start_ip = '20.0.0.1'
- self.p2_dst_start_ip = '10.0.0.0'
- self.p2_dst_end_ip = '10.0.3.231'
+ self.p2_src_start_ip = u"20.0.0.1"
+ self.p2_dst_start_ip = u"10.0.0.0"
+ self.p2_dst_end_ip = u"10.0.3.231"
def define_packets(self):
"""Defines the packets to be sent from the traffic generator.
@@ -58,7 +61,7 @@ class TrafficStreams(TrafficStreamsBaseClass):
"""
# Direction 0 --> 1
- base_pkt_a = (Ether() /
+ base_pkt_a = (Ether(dst=self.p1_dst_start_mac) /
IP(src=self.p1_src_start_ip,
dst=self.p1_dst_start_ip,
proto=61))
@@ -69,24 +72,29 @@ class TrafficStreams(TrafficStreamsBaseClass):
proto=61))
# Direction 0 --> 1
- vm1 = STLScVmRaw([STLVmFlowVar(name="dst",
+ vm1 = STLScVmRaw([STLVmFlowVar(name=u"mac_dst",
+ min_value=0,
+ max_value=0,
+ size=1, op=u"inc"),
+ STLVmWrFlowVar(fv_name=u"mac_dst", pkt_offset=5),
+ STLVmFlowVar(name=u"dst",
min_value=self.p1_dst_start_ip,
max_value=self.p1_dst_end_ip,
- size=4, op="inc"),
- STLVmWrFlowVar(fv_name="dst", pkt_offset="IP.dst"),
- STLVmFixIpv4(offset="IP")])
+ size=4, op=u"inc"),
+ STLVmWrFlowVar(fv_name=u"dst", pkt_offset=u"IP.dst"),
+ STLVmFixIpv4(offset=u"IP")])
# Direction 1 --> 0
- vm2 = STLScVmRaw([STLVmFlowVar(name="mac_dst",
+ vm2 = STLScVmRaw([STLVmFlowVar(name=u"mac_dst",
min_value=0,
max_value=0,
- size=1, op="inc"),
- STLVmWrFlowVar(fv_name="mac_dst", pkt_offset=5),
- STLVmFlowVar(name="dst",
+ size=1, op=u"inc"),
+ STLVmWrFlowVar(fv_name=u"mac_dst", pkt_offset=5),
+ STLVmFlowVar(name=u"dst",
min_value=self.p2_dst_start_ip,
max_value=self.p2_dst_end_ip,
- size=4, op="inc"),
- STLVmWrFlowVar(fv_name="dst", pkt_offset="IP.dst"),
- STLVmFixIpv4(offset="IP")])
+ size=4, op=u"inc"),
+ STLVmWrFlowVar(fv_name=u"dst", pkt_offset=u"IP.dst"),
+ STLVmFixIpv4(offset=u"IP")])
return base_pkt_a, base_pkt_b, vm1, vm2
diff --git a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst1000-2cnf.py b/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst1000-2cnf.py
index 4ea5bc72f2..b93835478e 100644
--- a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst1000-2cnf.py
+++ b/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst1000-2cnf.py
@@ -18,10 +18,10 @@ Stream profile:
- Packet: ETH / IP /
- Direction 0 --> 1:
- Source IP address range: 10.0.0.1
- - Destination IP address range: 20.0.0.0 - 20.0.3.231
+ - Destination IP address range: 20.0.0.0 - 20.0.1.143
- Direction 1 --> 0:
- Source IP address range: 20.0.0.1
- - Destination IP address range: 10.0.0.0 - 10.0.3.231
+ - Destination IP address range: 10.0.0.0 - 10.0.1.143
"""
from trex.stl.api import *
@@ -36,17 +36,20 @@ class TrafficStreams(TrafficStreamsBaseClass):
super(TrafficStreamsBaseClass, self).__init__()
- self.p2_dst_start_mac = '02:02:00:00:00:00'
- self.p2_dst_end_mac = '02:02:00:00:00:01'
+ self.p1_dst_start_mac = u"02:02:00:00:12:00"
+ self.p1_dst_end_mac = u"02:02:00:00:12:01"
+
+ self.p2_dst_start_mac = u"02:02:00:00:02:00"
+ self.p2_dst_end_mac = u"02:02:00:00:02:01"
# IPs used in packet headers.
- self.p1_src_start_ip = '10.0.0.1'
- self.p1_dst_start_ip = '20.0.0.0'
- self.p1_dst_end_ip = '20.0.3.231'
+ self.p1_src_start_ip = u"10.0.0.1"
+ self.p1_dst_start_ip = u"20.0.0.0"
+ self.p1_dst_end_ip = u"20.0.3.231"
- self.p2_src_start_ip = '20.0.0.1'
- self.p2_dst_start_ip = '10.0.0.0'
- self.p2_dst_end_ip = '10.0.3.231'
+ self.p2_src_start_ip = u"20.0.0.1"
+ self.p2_dst_start_ip = u"10.0.0.0"
+ self.p2_dst_end_ip = u"10.0.3.231"
def define_packets(self):
"""Defines the packets to be sent from the traffic generator.
@@ -58,7 +61,7 @@ class TrafficStreams(TrafficStreamsBaseClass):
"""
# Direction 0 --> 1
- base_pkt_a = (Ether() /
+ base_pkt_a = (Ether(dst=self.p1_dst_start_mac) /
IP(src=self.p1_src_start_ip,
dst=self.p1_dst_start_ip,
proto=61))
@@ -69,24 +72,29 @@ class TrafficStreams(TrafficStreamsBaseClass):
proto=61))
# Direction 0 --> 1
- vm1 = STLScVmRaw([STLVmFlowVar(name="dst",
+ vm1 = STLScVmRaw([STLVmFlowVar(name=u"mac_dst",
+ min_value=0,
+ max_value=1,
+ size=1, op=u"inc"),
+ STLVmWrFlowVar(fv_name=u"mac_dst", pkt_offset=5),
+ STLVmFlowVar(name=u"dst",
min_value=self.p1_dst_start_ip,
max_value=self.p1_dst_end_ip,
- size=4, op="inc"),
- STLVmWrFlowVar(fv_name="dst", pkt_offset="IP.dst"),
- STLVmFixIpv4(offset="IP")])
+ size=4, op=u"inc"),
+ STLVmWrFlowVar(fv_name=u"dst", pkt_offset=u"IP.dst"),
+ STLVmFixIpv4(offset=u"IP")])
# Direction 1 --> 0
- vm2 = STLScVmRaw([STLVmFlowVar(name="mac_dst",
+ vm2 = STLScVmRaw([STLVmFlowVar(name=u"mac_dst",
min_value=0,
max_value=1,
- size=1, op="inc"),
- STLVmWrFlowVar(fv_name="mac_dst", pkt_offset=5),
- STLVmFlowVar(name="dst",
+ size=1, op=u"inc"),
+ STLVmWrFlowVar(fv_name=u"mac_dst", pkt_offset=5),
+ STLVmFlowVar(name=u"dst",
min_value=self.p2_dst_start_ip,
max_value=self.p2_dst_end_ip,
- size=4, op="inc"),
- STLVmWrFlowVar(fv_name="dst", pkt_offset="IP.dst"),
- STLVmFixIpv4(offset="IP")])
+ size=4, op=u"inc"),
+ STLVmWrFlowVar(fv_name=u"dst", pkt_offset=u"IP.dst"),
+ STLVmFixIpv4(offset=u"IP")])
return base_pkt_a, base_pkt_b, vm1, vm2
diff --git a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst1000-4cnf.py b/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst1000-4cnf.py
index e230915069..4c72ab958b 100644
--- a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst1000-4cnf.py
+++ b/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst1000-4cnf.py
@@ -18,10 +18,10 @@ Stream profile:
- Packet: ETH / IP /
- Direction 0 --> 1:
- Source IP address range: 10.0.0.1
- - Destination IP address range: 20.0.0.0 - 20.0.3.231
+ - Destination IP address range: 20.0.0.0 - 20.0.1.143
- Direction 1 --> 0:
- Source IP address range: 20.0.0.1
- - Destination IP address range: 10.0.0.0 - 10.0.3.231
+ - Destination IP address range: 10.0.0.0 - 10.0.1.143
"""
from trex.stl.api import *
@@ -36,17 +36,20 @@ class TrafficStreams(TrafficStreamsBaseClass):
super(TrafficStreamsBaseClass, self).__init__()
- self.p2_dst_start_mac = '02:02:00:00:00:00'
- self.p2_dst_end_mac = '02:02:00:00:00:03'
+ self.p1_dst_start_mac = u"02:02:00:00:12:00"
+ self.p1_dst_end_mac = u"02:02:00:00:12:03"
+
+ self.p2_dst_start_mac = u"02:02:00:00:02:00"
+ self.p2_dst_end_mac = u"02:02:00:00:02:03"
# IPs used in packet headers.
- self.p1_src_start_ip = '10.0.0.1'
- self.p1_dst_start_ip = '20.0.0.0'
- self.p1_dst_end_ip = '20.0.3.231'
+ self.p1_src_start_ip = u"10.0.0.1"
+ self.p1_dst_start_ip = u"20.0.0.0"
+ self.p1_dst_end_ip = u"20.0.3.231"
- self.p2_src_start_ip = '20.0.0.1'
- self.p2_dst_start_ip = '10.0.0.0'
- self.p2_dst_end_ip = '10.0.3.231'
+ self.p2_src_start_ip = u"20.0.0.1"
+ self.p2_dst_start_ip = u"10.0.0.0"
+ self.p2_dst_end_ip = u"10.0.3.231"
def define_packets(self):
"""Defines the packets to be sent from the traffic generator.
@@ -58,7 +61,7 @@ class TrafficStreams(TrafficStreamsBaseClass):
"""
# Direction 0 --> 1
- base_pkt_a = (Ether() /
+ base_pkt_a = (Ether(dst=self.p1_dst_start_mac) /
IP(src=self.p1_src_start_ip,
dst=self.p1_dst_start_ip,
proto=61))
@@ -69,24 +72,29 @@ class TrafficStreams(TrafficStreamsBaseClass):
proto=61))
# Direction 0 --> 1
- vm1 = STLScVmRaw([STLVmFlowVar(name="dst",
+ vm1 = STLScVmRaw([STLVmFlowVar(name=u"mac_dst",
+ min_value=0,
+ max_value=3,
+ size=1, op=u"inc"),
+ STLVmWrFlowVar(fv_name=u"mac_dst", pkt_offset=5),
+ STLVmFlowVar(name=u"dst",
min_value=self.p1_dst_start_ip,
max_value=self.p1_dst_end_ip,
- size=4, op="inc"),
- STLVmWrFlowVar(fv_name="dst", pkt_offset="IP.dst"),
- STLVmFixIpv4(offset="IP")])
+ size=4, op=u"inc"),
+ STLVmWrFlowVar(fv_name=u"dst", pkt_offset=u"IP.dst"),
+ STLVmFixIpv4(offset=u"IP")])
# Direction 1 --> 0
- vm2 = STLScVmRaw([STLVmFlowVar(name="mac_dst",
+ vm2 = STLScVmRaw([STLVmFlowVar(name=u"mac_dst",
min_value=0,
max_value=3,
- size=1, op="inc"),
- STLVmWrFlowVar(fv_name="mac_dst", pkt_offset=5),
- STLVmFlowVar(name="dst",
+ size=1, op=u"inc"),
+ STLVmWrFlowVar(fv_name=u"mac_dst", pkt_offset=5),
+ STLVmFlowVar(name=u"dst",
min_value=self.p2_dst_start_ip,
max_value=self.p2_dst_end_ip,
- size=4, op="inc"),
- STLVmWrFlowVar(fv_name="dst", pkt_offset="IP.dst"),
- STLVmFixIpv4(offset="IP")])
+ size=4, op=u"inc"),
+ STLVmWrFlowVar(fv_name=u"dst", pkt_offset=u"IP.dst"),
+ STLVmFixIpv4(offset=u"IP")])
return base_pkt_a, base_pkt_b, vm1, vm2
diff --git a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst1000-8cnf.py b/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst1000-8cnf.py
index c34c8a0b05..a09b459f34 100644
--- a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst1000-8cnf.py
+++ b/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst1000-8cnf.py
@@ -18,10 +18,10 @@ Stream profile:
- Packet: ETH / IP /
- Direction 0 --> 1:
- Source IP address range: 10.0.0.1
- - Destination IP address range: 20.0.0.0 - 20.0.3.231
+ - Destination IP address range: 20.0.0.0 - 20.0.1.143
- Direction 1 --> 0:
- Source IP address range: 20.0.0.1
- - Destination IP address range: 10.0.0.0 - 10.0.3.231
+ - Destination IP address range: 10.0.0.0 - 10.0.1.143
"""
from trex.stl.api import *
@@ -36,17 +36,20 @@ class TrafficStreams(TrafficStreamsBaseClass):
super(TrafficStreamsBaseClass, self).__init__()
- self.p2_dst_start_mac = '02:02:00:00:00:00'
- self.p2_dst_end_mac = '02:02:00:00:00:07'
+ self.p1_dst_start_mac = u"02:02:00:00:12:00"
+ self.p1_dst_end_mac = u"02:02:00:00:12:07"
+
+ self.p2_dst_start_mac = u"02:02:00:00:02:00"
+ self.p2_dst_end_mac = u"02:02:00:00:02:07"
# IPs used in packet headers.
- self.p1_src_start_ip = '10.0.0.1'
- self.p1_dst_start_ip = '20.0.0.0'
- self.p1_dst_end_ip = '20.0.3.231'
+ self.p1_src_start_ip = u"10.0.0.1"
+ self.p1_dst_start_ip = u"20.0.0.0"
+ self.p1_dst_end_ip = u"20.0.3.231"
- self.p2_src_start_ip = '20.0.0.1'
- self.p2_dst_start_ip = '10.0.0.0'
- self.p2_dst_end_ip = '10.0.3.231'
+ self.p2_src_start_ip = u"20.0.0.1"
+ self.p2_dst_start_ip = u"10.0.0.0"
+ self.p2_dst_end_ip = u"10.0.3.231"
def define_packets(self):
"""Defines the packets to be sent from the traffic generator.
@@ -58,7 +61,7 @@ class TrafficStreams(TrafficStreamsBaseClass):
"""
# Direction 0 --> 1
- base_pkt_a = (Ether() /
+ base_pkt_a = (Ether(dst=self.p1_dst_start_mac) /
IP(src=self.p1_src_start_ip,
dst=self.p1_dst_start_ip,
proto=61))
@@ -69,24 +72,29 @@ class TrafficStreams(TrafficStreamsBaseClass):
proto=61))
# Direction 0 --> 1
- vm1 = STLScVmRaw([STLVmFlowVar(name="dst",
+ vm1 = STLScVmRaw([STLVmFlowVar(name=u"mac_dst",
+ min_value=0,
+ max_value=7,
+ size=1, op=u"inc"),
+ STLVmWrFlowVar(fv_name=u"mac_dst", pkt_offset=5),
+ STLVmFlowVar(name=u"dst",
min_value=self.p1_dst_start_ip,
max_value=self.p1_dst_end_ip,
- size=4, op="inc"),
- STLVmWrFlowVar(fv_name="dst", pkt_offset="IP.dst"),
- STLVmFixIpv4(offset="IP")])
+ size=4, op=u"inc"),
+ STLVmWrFlowVar(fv_name=u"dst", pkt_offset=u"IP.dst"),
+ STLVmFixIpv4(offset=u"IP")])
# Direction 1 --> 0
- vm2 = STLScVmRaw([STLVmFlowVar(name="mac_dst",
+ vm2 = STLScVmRaw([STLVmFlowVar(name=u"mac_dst",
min_value=0,
max_value=7,
- size=1, op="inc"),
- STLVmWrFlowVar(fv_name="mac_dst", pkt_offset=5),
- STLVmFlowVar(name="dst",
+ size=1, op=u"inc"),
+ STLVmWrFlowVar(fv_name=u"mac_dst", pkt_offset=5),
+ STLVmFlowVar(name=u"dst",
min_value=self.p2_dst_start_ip,
max_value=self.p2_dst_end_ip,
- size=4, op="inc"),
- STLVmWrFlowVar(fv_name="dst", pkt_offset="IP.dst"),
- STLVmFixIpv4(offset="IP")])
+ size=4, op=u"inc"),
+ STLVmWrFlowVar(fv_name=u"dst", pkt_offset=u"IP.dst"),
+ STLVmFixIpv4(offset=u"IP")])
return base_pkt_a, base_pkt_b, vm1, vm2
diff --git a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst10000-1cnf.py b/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst10000-1cnf.py
index 897e06f324..28c9873c22 100644
--- a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst10000-1cnf.py
+++ b/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst10000-1cnf.py
@@ -18,10 +18,10 @@ Stream profile:
- Packet: ETH / IP /
- Direction 0 --> 1:
- Source IP address range: 10.0.0.1
- - Destination IP address range: 20.0.0.0 - 20.0.39.15
+ - Destination IP address range: 20.0.0.0 - 20.0.1.143
- Direction 1 --> 0:
- Source IP address range: 20.0.0.1
- - Destination IP address range: 10.0.0.0 - 10.0.39.15
+ - Destination IP address range: 10.0.0.0 - 10.0.1.143
"""
from trex.stl.api import *
@@ -36,17 +36,20 @@ class TrafficStreams(TrafficStreamsBaseClass):
super(TrafficStreamsBaseClass, self).__init__()
- self.p2_dst_start_mac = '02:02:00:00:00:00'
- self.p2_dst_end_mac = '02:02:00:00:00:00'
+ self.p1_dst_start_mac = u"02:02:00:00:12:00"
+ self.p1_dst_end_mac = u"02:02:00:00:12:00"
+
+ self.p2_dst_start_mac = u"02:02:00:00:02:00"
+ self.p2_dst_end_mac = u"02:02:00:00:02:00"
# IPs used in packet headers.
- self.p1_src_start_ip = '10.0.0.1'
- self.p1_dst_start_ip = '20.0.0.0'
- self.p1_dst_end_ip = '20.0.39.15'
+ self.p1_src_start_ip = u"10.0.0.1"
+ self.p1_dst_start_ip = u"20.0.0.0"
+ self.p1_dst_end_ip = u"20.0.39.15"
- self.p2_src_start_ip = '20.0.0.1'
- self.p2_dst_start_ip = '10.0.0.0'
- self.p2_dst_end_ip = '10.0.39.15'
+ self.p2_src_start_ip = u"20.0.0.1"
+ self.p2_dst_start_ip = u"10.0.0.0"
+ self.p2_dst_end_ip = u"10.0.39.15"
def define_packets(self):
"""Defines the packets to be sent from the traffic generator.
@@ -58,7 +61,7 @@ class TrafficStreams(TrafficStreamsBaseClass):
"""
# Direction 0 --> 1
- base_pkt_a = (Ether() /
+ base_pkt_a = (Ether(dst=self.p1_dst_start_mac) /
IP(src=self.p1_src_start_ip,
dst=self.p1_dst_start_ip,
proto=61))
@@ -69,24 +72,29 @@ class TrafficStreams(TrafficStreamsBaseClass):
proto=61))
# Direction 0 --> 1
- vm1 = STLScVmRaw([STLVmFlowVar(name="dst",
+ vm1 = STLScVmRaw([STLVmFlowVar(name=u"mac_dst",
+ min_value=0,
+ max_value=0,
+ size=1, op=u"inc"),
+ STLVmWrFlowVar(fv_name=u"mac_dst", pkt_offset=5),
+ STLVmFlowVar(name=u"dst",
min_value=self.p1_dst_start_ip,
max_value=self.p1_dst_end_ip,
- size=4, op="inc"),
- STLVmWrFlowVar(fv_name="dst", pkt_offset="IP.dst"),
- STLVmFixIpv4(offset="IP")])
+ size=4, op=u"inc"),
+ STLVmWrFlowVar(fv_name=u"dst", pkt_offset=u"IP.dst"),
+ STLVmFixIpv4(offset=u"IP")])
# Direction 1 --> 0
- vm2 = STLScVmRaw([STLVmFlowVar(name="mac_dst",
+ vm2 = STLScVmRaw([STLVmFlowVar(name=u"mac_dst",
min_value=0,
max_value=0,
- size=1, op="inc"),
- STLVmWrFlowVar(fv_name="mac_dst", pkt_offset=5),
- STLVmFlowVar(name="dst",
+ size=1, op=u"inc"),
+ STLVmWrFlowVar(fv_name=u"mac_dst", pkt_offset=5),
+ STLVmFlowVar(name=u"dst",
min_value=self.p2_dst_start_ip,
max_value=self.p2_dst_end_ip,
- size=4, op="inc"),
- STLVmWrFlowVar(fv_name="dst", pkt_offset="IP.dst"),
- STLVmFixIpv4(offset="IP")])
+ size=4, op=u"inc"),
+ STLVmWrFlowVar(fv_name=u"dst", pkt_offset=u"IP.dst"),
+ STLVmFixIpv4(offset=u"IP")])
return base_pkt_a, base_pkt_b, vm1, vm2
diff --git a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst10000-2cnf.py b/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst10000-2cnf.py
index 7d2ce04c88..f845b2aeb2 100644
--- a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst10000-2cnf.py
+++ b/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst10000-2cnf.py
@@ -18,10 +18,10 @@ Stream profile:
- Packet: ETH / IP /
- Direction 0 --> 1:
- Source IP address range: 10.0.0.1
- - Destination IP address range: 20.0.0.0 - 20.0.39.15
+ - Destination IP address range: 20.0.0.0 - 20.0.1.143
- Direction 1 --> 0:
- Source IP address range: 20.0.0.1
- - Destination IP address range: 10.0.0.0 - 10.0.39.15
+ - Destination IP address range: 10.0.0.0 - 10.0.1.143
"""
from trex.stl.api import *
@@ -36,17 +36,20 @@ class TrafficStreams(TrafficStreamsBaseClass):
super(TrafficStreamsBaseClass, self).__init__()
- self.p2_dst_start_mac = '02:02:00:00:00:00'
- self.p2_dst_end_mac = '02:02:00:00:00:01'
+ self.p1_dst_start_mac = u"02:02:00:00:12:00"
+ self.p1_dst_end_mac = u"02:02:00:00:12:01"
+
+ self.p2_dst_start_mac = u"02:02:00:00:02:00"
+ self.p2_dst_end_mac = u"02:02:00:00:02:01"
# IPs used in packet headers.
- self.p1_src_start_ip = '10.0.0.1'
- self.p1_dst_start_ip = '20.0.0.0'
- self.p1_dst_end_ip = '20.0.39.15'
+ self.p1_src_start_ip = u"10.0.0.1"
+ self.p1_dst_start_ip = u"20.0.0.0"
+ self.p1_dst_end_ip = u"20.0.39.15"
- self.p2_src_start_ip = '20.0.0.1'
- self.p2_dst_start_ip = '10.0.0.0'
- self.p2_dst_end_ip = '10.0.39.15'
+ self.p2_src_start_ip = u"20.0.0.1"
+ self.p2_dst_start_ip = u"10.0.0.0"
+ self.p2_dst_end_ip = u"10.0.39.15"
def define_packets(self):
"""Defines the packets to be sent from the traffic generator.
@@ -58,7 +61,7 @@ class TrafficStreams(TrafficStreamsBaseClass):
"""
# Direction 0 --> 1
- base_pkt_a = (Ether() /
+ base_pkt_a = (Ether(dst=self.p1_dst_start_mac) /
IP(src=self.p1_src_start_ip,
dst=self.p1_dst_start_ip,
proto=61))
@@ -69,24 +72,29 @@ class TrafficStreams(TrafficStreamsBaseClass):
proto=61))
# Direction 0 --> 1
- vm1 = STLScVmRaw([STLVmFlowVar(name="dst",
+ vm1 = STLScVmRaw([STLVmFlowVar(name=u"mac_dst",
+ min_value=0,
+ max_value=1,
+ size=1, op=u"inc"),
+ STLVmWrFlowVar(fv_name=u"mac_dst", pkt_offset=5),
+ STLVmFlowVar(name=u"dst",
min_value=self.p1_dst_start_ip,
max_value=self.p1_dst_end_ip,
- size=4, op="inc"),
- STLVmWrFlowVar(fv_name="dst", pkt_offset="IP.dst"),
- STLVmFixIpv4(offset="IP")])
+ size=4, op=u"inc"),
+ STLVmWrFlowVar(fv_name=u"dst", pkt_offset=u"IP.dst"),
+ STLVmFixIpv4(offset=u"IP")])
# Direction 1 --> 0
- vm2 = STLScVmRaw([STLVmFlowVar(name="mac_dst",
+ vm2 = STLScVmRaw([STLVmFlowVar(name=u"mac_dst",
min_value=0,
max_value=1,
- size=1, op="inc"),
- STLVmWrFlowVar(fv_name="mac_dst", pkt_offset=5),
- STLVmFlowVar(name="dst",
+ size=1, op=u"inc"),
+ STLVmWrFlowVar(fv_name=u"mac_dst", pkt_offset=5),
+ STLVmFlowVar(name=u"dst",
min_value=self.p2_dst_start_ip,
max_value=self.p2_dst_end_ip,
- size=4, op="inc"),
- STLVmWrFlowVar(fv_name="dst", pkt_offset="IP.dst"),
- STLVmFixIpv4(offset="IP")])
+ size=4, op=u"inc"),
+ STLVmWrFlowVar(fv_name=u"dst", pkt_offset=u"IP.dst"),
+ STLVmFixIpv4(offset=u"IP")])
return base_pkt_a, base_pkt_b, vm1, vm2
diff --git a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst10000-4cnf.py b/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst10000-4cnf.py
index 12f057cfb0..70fc18965c 100644
--- a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst10000-4cnf.py
+++ b/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst10000-4cnf.py
@@ -18,10 +18,10 @@ Stream profile:
- Packet: ETH / IP /
- Direction 0 --> 1:
- Source IP address range: 10.0.0.1
- - Destination IP address range: 20.0.0.0 - 20.0.39.15
+ - Destination IP address range: 20.0.0.0 - 20.0.1.143
- Direction 1 --> 0:
- Source IP address range: 20.0.0.1
- - Destination IP address range: 10.0.0.0 - 10.0.39.15
+ - Destination IP address range: 10.0.0.0 - 10.0.1.143
"""
from trex.stl.api import *
@@ -36,17 +36,20 @@ class TrafficStreams(TrafficStreamsBaseClass):
super(TrafficStreamsBaseClass, self).__init__()
- self.p2_dst_start_mac = '02:02:00:00:00:00'
- self.p2_dst_end_mac = '02:02:00:00:00:03'
+ self.p1_dst_start_mac = u"02:02:00:00:12:00"
+ self.p1_dst_end_mac = u"02:02:00:00:12:03"
+
+ self.p2_dst_start_mac = u"02:02:00:00:02:00"
+ self.p2_dst_end_mac = u"02:02:00:00:02:03"
# IPs used in packet headers.
- self.p1_src_start_ip = '10.0.0.1'
- self.p1_dst_start_ip = '20.0.0.0'
- self.p1_dst_end_ip = '20.0.39.15'
+ self.p1_src_start_ip = u"10.0.0.1"
+ self.p1_dst_start_ip = u"20.0.0.0"
+ self.p1_dst_end_ip = u"20.0.39.15"
- self.p2_src_start_ip = '20.0.0.1'
- self.p2_dst_start_ip = '10.0.0.0'
- self.p2_dst_end_ip = '10.0.39.15'
+ self.p2_src_start_ip = u"20.0.0.1"
+ self.p2_dst_start_ip = u"10.0.0.0"
+ self.p2_dst_end_ip = u"10.0.39.15"
def define_packets(self):
"""Defines the packets to be sent from the traffic generator.
@@ -58,7 +61,7 @@ class TrafficStreams(TrafficStreamsBaseClass):
"""
# Direction 0 --> 1
- base_pkt_a = (Ether() /
+ base_pkt_a = (Ether(dst=self.p1_dst_start_mac) /
IP(src=self.p1_src_start_ip,
dst=self.p1_dst_start_ip,
proto=61))
@@ -69,24 +72,29 @@ class TrafficStreams(TrafficStreamsBaseClass):
proto=61))
# Direction 0 --> 1
- vm1 = STLScVmRaw([STLVmFlowVar(name="dst",
+ vm1 = STLScVmRaw([STLVmFlowVar(name=u"mac_dst",
+ min_value=0,
+ max_value=3,
+ size=1, op=u"inc"),
+ STLVmWrFlowVar(fv_name=u"mac_dst", pkt_offset=5),
+ STLVmFlowVar(name=u"dst",
min_value=self.p1_dst_start_ip,
max_value=self.p1_dst_end_ip,
- size=4, op="inc"),
- STLVmWrFlowVar(fv_name="dst", pkt_offset="IP.dst"),
- STLVmFixIpv4(offset="IP")])
+ size=4, op=u"inc"),
+ STLVmWrFlowVar(fv_name=u"dst", pkt_offset=u"IP.dst"),
+ STLVmFixIpv4(offset=u"IP")])
# Direction 1 --> 0
- vm2 = STLScVmRaw([STLVmFlowVar(name="mac_dst",
+ vm2 = STLScVmRaw([STLVmFlowVar(name=u"mac_dst",
min_value=0,
max_value=3,
- size=1, op="inc"),
- STLVmWrFlowVar(fv_name="mac_dst", pkt_offset=5),
- STLVmFlowVar(name="dst",
+ size=1, op=u"inc"),
+ STLVmWrFlowVar(fv_name=u"mac_dst", pkt_offset=5),
+ STLVmFlowVar(name=u"dst",
min_value=self.p2_dst_start_ip,
max_value=self.p2_dst_end_ip,
- size=4, op="inc"),
- STLVmWrFlowVar(fv_name="dst", pkt_offset="IP.dst"),
- STLVmFixIpv4(offset="IP")])
+ size=4, op=u"inc"),
+ STLVmWrFlowVar(fv_name=u"dst", pkt_offset=u"IP.dst"),
+ STLVmFixIpv4(offset=u"IP")])
return base_pkt_a, base_pkt_b, vm1, vm2
diff --git a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst10000-8cnf.py b/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst10000-8cnf.py
index 0d588b7d65..8a1697a71e 100644
--- a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst10000-8cnf.py
+++ b/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst10000-8cnf.py
@@ -18,10 +18,10 @@ Stream profile:
- Packet: ETH / IP /
- Direction 0 --> 1:
- Source IP address range: 10.0.0.1
- - Destination IP address range: 20.0.0.0 - 20.0.39.15
+ - Destination IP address range: 20.0.0.0 - 20.0.1.143
- Direction 1 --> 0:
- Source IP address range: 20.0.0.1
- - Destination IP address range: 10.0.0.0 - 10.0.39.15
+ - Destination IP address range: 10.0.0.0 - 10.0.1.143
"""
from trex.stl.api import *
@@ -36,17 +36,20 @@ class TrafficStreams(TrafficStreamsBaseClass):
super(TrafficStreamsBaseClass, self).__init__()
- self.p2_dst_start_mac = '02:02:00:00:00:00'
- self.p2_dst_end_mac = '02:02:00:00:00:07'
+ self.p1_dst_start_mac = u"02:02:00:00:12:00"
+ self.p1_dst_end_mac = u"02:02:00:00:12:07"
+
+ self.p2_dst_start_mac = u"02:02:00:00:02:00"
+ self.p2_dst_end_mac = u"02:02:00:00:02:07"
# IPs used in packet headers.
- self.p1_src_start_ip = '10.0.0.1'
- self.p1_dst_start_ip = '20.0.0.0'
- self.p1_dst_end_ip = '20.0.39.15'
+ self.p1_src_start_ip = u"10.0.0.1"
+ self.p1_dst_start_ip = u"20.0.0.0"
+ self.p1_dst_end_ip = u"20.0.39.15"
- self.p2_src_start_ip = '20.0.0.1'
- self.p2_dst_start_ip = '10.0.0.0'
- self.p2_dst_end_ip = '10.0.39.15'
+ self.p2_src_start_ip = u"20.0.0.1"
+ self.p2_dst_start_ip = u"10.0.0.0"
+ self.p2_dst_end_ip = u"10.0.39.15"
def define_packets(self):
"""Defines the packets to be sent from the traffic generator.
@@ -58,7 +61,7 @@ class TrafficStreams(TrafficStreamsBaseClass):
"""
# Direction 0 --> 1
- base_pkt_a = (Ether() /
+ base_pkt_a = (Ether(dst=self.p1_dst_start_mac) /
IP(src=self.p1_src_start_ip,
dst=self.p1_dst_start_ip,
proto=61))
@@ -69,24 +72,29 @@ class TrafficStreams(TrafficStreamsBaseClass):
proto=61))
# Direction 0 --> 1
- vm1 = STLScVmRaw([STLVmFlowVar(name="dst",
+ vm1 = STLScVmRaw([STLVmFlowVar(name=u"mac_dst",
+ min_value=0,
+ max_value=7,
+ size=1, op=u"inc"),
+ STLVmWrFlowVar(fv_name=u"mac_dst", pkt_offset=5),
+ STLVmFlowVar(name=u"dst",
min_value=self.p1_dst_start_ip,
max_value=self.p1_dst_end_ip,
- size=4, op="inc"),
- STLVmWrFlowVar(fv_name="dst", pkt_offset="IP.dst"),
- STLVmFixIpv4(offset="IP")])
+ size=4, op=u"inc"),
+ STLVmWrFlowVar(fv_name=u"dst", pkt_offset=u"IP.dst"),
+ STLVmFixIpv4(offset=u"IP")])
# Direction 1 --> 0
- vm2 = STLScVmRaw([STLVmFlowVar(name="mac_dst",
+ vm2 = STLScVmRaw([STLVmFlowVar(name=u"mac_dst",
min_value=0,
max_value=7,
- size=1, op="inc"),
- STLVmWrFlowVar(fv_name="mac_dst", pkt_offset=5),
- STLVmFlowVar(name="dst",
+ size=1, op=u"inc"),
+ STLVmWrFlowVar(fv_name=u"mac_dst", pkt_offset=5),
+ STLVmFlowVar(name=u"dst",
min_value=self.p2_dst_start_ip,
max_value=self.p2_dst_end_ip,
- size=4, op="inc"),
- STLVmWrFlowVar(fv_name="dst", pkt_offset="IP.dst"),
- STLVmFixIpv4(offset="IP")])
+ size=4, op=u"inc"),
+ STLVmWrFlowVar(fv_name=u"dst", pkt_offset=u"IP.dst"),
+ STLVmFixIpv4(offset=u"IP")])
return base_pkt_a, base_pkt_b, vm1, vm2
diff --git a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst20000-1cnf.py b/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst20000-1cnf.py
index bee55a6197..56e40a9b7e 100644
--- a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst20000-1cnf.py
+++ b/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst20000-1cnf.py
@@ -18,10 +18,10 @@ Stream profile:
- Packet: ETH / IP /
- Direction 0 --> 1:
- Source IP address range: 10.0.0.1
- - Destination IP address range: 20.0.0.0 - 20.0.78.31
+ - Destination IP address range: 20.0.0.0 - 20.0.1.143
- Direction 1 --> 0:
- Source IP address range: 20.0.0.1
- - Destination IP address range: 10.0.0.0 - 10.0.78.31
+ - Destination IP address range: 10.0.0.0 - 10.0.1.143
"""
from trex.stl.api import *
@@ -36,17 +36,20 @@ class TrafficStreams(TrafficStreamsBaseClass):
super(TrafficStreamsBaseClass, self).__init__()
- self.p2_dst_start_mac = '02:02:00:00:00:00'
- self.p2_dst_end_mac = '02:02:00:00:00:00'
+ self.p1_dst_start_mac = u"02:02:00:00:12:00"
+ self.p1_dst_end_mac = u"02:02:00:00:12:00"
+
+ self.p2_dst_start_mac = u"02:02:00:00:02:00"
+ self.p2_dst_end_mac = u"02:02:00:00:02:00"
# IPs used in packet headers.
- self.p1_src_start_ip = '10.0.0.1'
- self.p1_dst_start_ip = '20.0.0.0'
- self.p1_dst_end_ip = '20.0.78.31'
+ self.p1_src_start_ip = u"10.0.0.1"
+ self.p1_dst_start_ip = u"20.0.0.0"
+ self.p1_dst_end_ip = u"20.0.78.31"
- self.p2_src_start_ip = '20.0.0.1'
- self.p2_dst_start_ip = '10.0.0.0'
- self.p2_dst_end_ip = '10.0.78.31'
+ self.p2_src_start_ip = u"20.0.0.1"
+ self.p2_dst_start_ip = u"10.0.0.0"
+ self.p2_dst_end_ip = u"10.0.78.31"
def define_packets(self):
"""Defines the packets to be sent from the traffic generator.
@@ -58,7 +61,7 @@ class TrafficStreams(TrafficStreamsBaseClass):
"""
# Direction 0 --> 1
- base_pkt_a = (Ether() /
+ base_pkt_a = (Ether(dst=self.p1_dst_start_mac) /
IP(src=self.p1_src_start_ip,
dst=self.p1_dst_start_ip,
proto=61))
@@ -69,24 +72,29 @@ class TrafficStreams(TrafficStreamsBaseClass):
proto=61))
# Direction 0 --> 1
- vm1 = STLScVmRaw([STLVmFlowVar(name="dst",
+ vm1 = STLScVmRaw([STLVmFlowVar(name=u"mac_dst",
+ min_value=0,
+ max_value=0,
+ size=1, op=u"inc"),
+ STLVmWrFlowVar(fv_name=u"mac_dst", pkt_offset=5),
+ STLVmFlowVar(name=u"dst",
min_value=self.p1_dst_start_ip,
max_value=self.p1_dst_end_ip,
- size=4, op="inc"),
- STLVmWrFlowVar(fv_name="dst", pkt_offset="IP.dst"),
- STLVmFixIpv4(offset="IP")])
+ size=4, op=u"inc"),
+ STLVmWrFlowVar(fv_name=u"dst", pkt_offset=u"IP.dst"),
+ STLVmFixIpv4(offset=u"IP")])
# Direction 1 --> 0
- vm2 = STLScVmRaw([STLVmFlowVar(name="mac_dst",
+ vm2 = STLScVmRaw([STLVmFlowVar(name=u"mac_dst",
min_value=0,
max_value=0,
- size=1, op="inc"),
- STLVmWrFlowVar(fv_name="mac_dst", pkt_offset=5),
- STLVmFlowVar(name="dst",
+ size=1, op=u"inc"),
+ STLVmWrFlowVar(fv_name=u"mac_dst", pkt_offset=5),
+ STLVmFlowVar(name=u"dst",
min_value=self.p2_dst_start_ip,
max_value=self.p2_dst_end_ip,
- size=4, op="inc"),
- STLVmWrFlowVar(fv_name="dst", pkt_offset="IP.dst"),
- STLVmFixIpv4(offset="IP")])
+ size=4, op=u"inc"),
+ STLVmWrFlowVar(fv_name=u"dst", pkt_offset=u"IP.dst"),
+ STLVmFixIpv4(offset=u"IP")])
return base_pkt_a, base_pkt_b, vm1, vm2
diff --git a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst20000-2cnf.py b/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst20000-2cnf.py
index 477a516e6e..584b9a4378 100644
--- a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst20000-2cnf.py
+++ b/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst20000-2cnf.py
@@ -18,10 +18,10 @@ Stream profile:
- Packet: ETH / IP /
- Direction 0 --> 1:
- Source IP address range: 10.0.0.1
- - Destination IP address range: 20.0.0.0 - 20.0.78.31
+ - Destination IP address range: 20.0.0.0 - 20.0.1.143
- Direction 1 --> 0:
- Source IP address range: 20.0.0.1
- - Destination IP address range: 10.0.0.0 - 10.0.78.31
+ - Destination IP address range: 10.0.0.0 - 10.0.1.143
"""
from trex.stl.api import *
@@ -36,17 +36,20 @@ class TrafficStreams(TrafficStreamsBaseClass):
super(TrafficStreamsBaseClass, self).__init__()
- self.p2_dst_start_mac = '02:02:00:00:00:00'
- self.p2_dst_end_mac = '02:02:00:00:00:01'
+ self.p1_dst_start_mac = u"02:02:00:00:12:00"
+ self.p1_dst_end_mac = u"02:02:00:00:12:01"
+
+ self.p2_dst_start_mac = u"02:02:00:00:02:00"
+ self.p2_dst_end_mac = u"02:02:00:00:02:01"
# IPs used in packet headers.
- self.p1_src_start_ip = '10.0.0.1'
- self.p1_dst_start_ip = '20.0.0.0'
- self.p1_dst_end_ip = '20.0.78.31'
+ self.p1_src_start_ip = u"10.0.0.1"
+ self.p1_dst_start_ip = u"20.0.0.0"
+ self.p1_dst_end_ip = u"20.0.78.31"
- self.p2_src_start_ip = '20.0.0.1'
- self.p2_dst_start_ip = '10.0.0.0'
- self.p2_dst_end_ip = '10.0.78.31'
+ self.p2_src_start_ip = u"20.0.0.1"
+ self.p2_dst_start_ip = u"10.0.0.0"
+ self.p2_dst_end_ip = u"10.0.78.31"
def define_packets(self):
"""Defines the packets to be sent from the traffic generator.
@@ -58,7 +61,7 @@ class TrafficStreams(TrafficStreamsBaseClass):
"""
# Direction 0 --> 1
- base_pkt_a = (Ether() /
+ base_pkt_a = (Ether(dst=self.p1_dst_start_mac) /
IP(src=self.p1_src_start_ip,
dst=self.p1_dst_start_ip,
proto=61))
@@ -69,24 +72,29 @@ class TrafficStreams(TrafficStreamsBaseClass):
proto=61))
# Direction 0 --> 1
- vm1 = STLScVmRaw([STLVmFlowVar(name="dst",
+ vm1 = STLScVmRaw([STLVmFlowVar(name=u"mac_dst",
+ min_value=0,
+ max_value=1,
+ size=1, op=u"inc"),
+ STLVmWrFlowVar(fv_name=u"mac_dst", pkt_offset=5),
+ STLVmFlowVar(name=u"dst",
min_value=self.p1_dst_start_ip,
max_value=self.p1_dst_end_ip,
- size=4, op="inc"),
- STLVmWrFlowVar(fv_name="dst", pkt_offset="IP.dst"),
- STLVmFixIpv4(offset="IP")])
+ size=4, op=u"inc"),
+ STLVmWrFlowVar(fv_name=u"dst", pkt_offset=u"IP.dst"),
+ STLVmFixIpv4(offset=u"IP")])
# Direction 1 --> 0
- vm2 = STLScVmRaw([STLVmFlowVar(name="mac_dst",
+ vm2 = STLScVmRaw([STLVmFlowVar(name=u"mac_dst",
min_value=0,
max_value=1,
- size=1, op="inc"),
- STLVmWrFlowVar(fv_name="mac_dst", pkt_offset=5),
- STLVmFlowVar(name="dst",
+ size=1, op=u"inc"),
+ STLVmWrFlowVar(fv_name=u"mac_dst", pkt_offset=5),
+ STLVmFlowVar(name=u"dst",
min_value=self.p2_dst_start_ip,
max_value=self.p2_dst_end_ip,
- size=4, op="inc"),
- STLVmWrFlowVar(fv_name="dst", pkt_offset="IP.dst"),
- STLVmFixIpv4(offset="IP")])
+ size=4, op=u"inc"),
+ STLVmWrFlowVar(fv_name=u"dst", pkt_offset=u"IP.dst"),
+ STLVmFixIpv4(offset=u"IP")])
return base_pkt_a, base_pkt_b, vm1, vm2
diff --git a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst20000-4cnf.py b/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst20000-4cnf.py
index da72cee968..d05f2caac7 100644
--- a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst20000-4cnf.py
+++ b/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst20000-4cnf.py
@@ -18,10 +18,10 @@ Stream profile:
- Packet: ETH / IP /
- Direction 0 --> 1:
- Source IP address range: 10.0.0.1
- - Destination IP address range: 20.0.0.0 - 20.0.78.31
+ - Destination IP address range: 20.0.0.0 - 20.0.1.143
- Direction 1 --> 0:
- Source IP address range: 20.0.0.1
- - Destination IP address range: 10.0.0.0 - 10.0.78.31
+ - Destination IP address range: 10.0.0.0 - 10.0.1.143
"""
from trex.stl.api import *
@@ -36,17 +36,20 @@ class TrafficStreams(TrafficStreamsBaseClass):
super(TrafficStreamsBaseClass, self).__init__()
- self.p2_dst_start_mac = '02:02:00:00:00:00'
- self.p2_dst_end_mac = '02:02:00:00:00:03'
+ self.p1_dst_start_mac = "02:02:00:00:12:00"
+ self.p1_dst_end_mac = "02:02:00:00:12:03"
+
+ self.p2_dst_start_mac = "02:02:00:00:02:00"
+ self.p2_dst_end_mac = "02:02:00:00:02:03"
# IPs used in packet headers.
- self.p1_src_start_ip = '10.0.0.1'
- self.p1_dst_start_ip = '20.0.0.0'
- self.p1_dst_end_ip = '20.0.78.31'
+ self.p1_src_start_ip = "10.0.0.1"
+ self.p1_dst_start_ip = "20.0.0.0"
+ self.p1_dst_end_ip = "20.0.78.31"
- self.p2_src_start_ip = '20.0.0.1'
- self.p2_dst_start_ip = '10.0.0.0'
- self.p2_dst_end_ip = '10.0.78.31'
+ self.p2_src_start_ip = "20.0.0.1"
+ self.p2_dst_start_ip = "10.0.0.0"
+ self.p2_dst_end_ip = "10.0.78.31"
def define_packets(self):
"""Defines the packets to be sent from the traffic generator.
@@ -58,7 +61,7 @@ class TrafficStreams(TrafficStreamsBaseClass):
"""
# Direction 0 --> 1
- base_pkt_a = (Ether() /
+ base_pkt_a = (Ether(dst=self.p1_dst_start_mac) /
IP(src=self.p1_src_start_ip,
dst=self.p1_dst_start_ip,
proto=61))
@@ -69,24 +72,29 @@ class TrafficStreams(TrafficStreamsBaseClass):
proto=61))
# Direction 0 --> 1
- vm1 = STLScVmRaw([STLVmFlowVar(name="dst",
+ vm1 = STLScVmRaw([STLVmFlowVar(name=u"mac_dst",
+ min_value=0,
+ max_value=3,
+ size=1, op=u"inc"),
+ STLVmWrFlowVar(fv_name=u"mac_dst", pkt_offset=5),
+ STLVmFlowVar(name=u"dst",
min_value=self.p1_dst_start_ip,
max_value=self.p1_dst_end_ip,
- size=4, op="inc"),
- STLVmWrFlowVar(fv_name="dst", pkt_offset="IP.dst"),
- STLVmFixIpv4(offset="IP")])
+ size=4, op=u"inc"),
+ STLVmWrFlowVar(fv_name=u"dst", pkt_offset=u"IP.dst"),
+ STLVmFixIpv4(offset=u"IP")])
# Direction 1 --> 0
- vm2 = STLScVmRaw([STLVmFlowVar(name="mac_dst",
+ vm2 = STLScVmRaw([STLVmFlowVar(name=u"mac_dst",
min_value=0,
max_value=3,
- size=1, op="inc"),
- STLVmWrFlowVar(fv_name="mac_dst", pkt_offset=5),
- STLVmFlowVar(name="dst",
+ size=1, op=u"inc"),
+ STLVmWrFlowVar(fv_name=u"mac_dst", pkt_offset=5),
+ STLVmFlowVar(name=u"dst",
min_value=self.p2_dst_start_ip,
max_value=self.p2_dst_end_ip,
- size=4, op="inc"),
- STLVmWrFlowVar(fv_name="dst", pkt_offset="IP.dst"),
- STLVmFixIpv4(offset="IP")])
+ size=4, op=u"inc"),
+ STLVmWrFlowVar(fv_name=u"dst", pkt_offset=u"IP.dst"),
+ STLVmFixIpv4(offset=u"IP")])
return base_pkt_a, base_pkt_b, vm1, vm2
diff --git a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst20000-8cnf.py b/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst20000-8cnf.py
index ac5d403183..e00303a397 100644
--- a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst20000-8cnf.py
+++ b/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst20000-8cnf.py
@@ -18,10 +18,10 @@ Stream profile:
- Packet: ETH / IP /
- Direction 0 --> 1:
- Source IP address range: 10.0.0.1
- - Destination IP address range: 20.0.0.0 - 20.0.78.31
+ - Destination IP address range: 20.0.0.0 - 20.0.1.143
- Direction 1 --> 0:
- Source IP address range: 20.0.0.1
- - Destination IP address range: 10.0.0.0 - 10.0.78.31
+ - Destination IP address range: 10.0.0.0 - 10.0.1.143
"""
from trex.stl.api import *
@@ -36,17 +36,20 @@ class TrafficStreams(TrafficStreamsBaseClass):
super(TrafficStreamsBaseClass, self).__init__()
- self.p2_dst_start_mac = '02:02:00:00:00:00'
- self.p2_dst_end_mac = '02:02:00:00:00:07'
+ self.p1_dst_start_mac = u"02:02:00:00:12:00"
+ self.p1_dst_end_mac = u"02:02:00:00:12:07"
+
+ self.p2_dst_start_mac = u"02:02:00:00:02:00"
+ self.p2_dst_end_mac = u"02:02:00:00:02:07"
# IPs used in packet headers.
- self.p1_src_start_ip = '10.0.0.1'
- self.p1_dst_start_ip = '20.0.0.0'
- self.p1_dst_end_ip = '20.0.78.31'
+ self.p1_src_start_ip = u"10.0.0.1"
+ self.p1_dst_start_ip = u"20.0.0.0"
+ self.p1_dst_end_ip = u"20.0.78.31"
- self.p2_src_start_ip = '20.0.0.1'
- self.p2_dst_start_ip = '10.0.0.0'
- self.p2_dst_end_ip = '10.0.78.31'
+ self.p2_src_start_ip = u"20.0.0.1"
+ self.p2_dst_start_ip = u"10.0.0.0"
+ self.p2_dst_end_ip = u"10.0.78.31"
def define_packets(self):
"""Defines the packets to be sent from the traffic generator.
@@ -58,7 +61,7 @@ class TrafficStreams(TrafficStreamsBaseClass):
"""
# Direction 0 --> 1
- base_pkt_a = (Ether() /
+ base_pkt_a = (Ether(dst=self.p1_dst_start_mac) /
IP(src=self.p1_src_start_ip,
dst=self.p1_dst_start_ip,
proto=61))
@@ -69,24 +72,29 @@ class TrafficStreams(TrafficStreamsBaseClass):
proto=61))
# Direction 0 --> 1
- vm1 = STLScVmRaw([STLVmFlowVar(name="dst",
+ vm1 = STLScVmRaw([STLVmFlowVar(name=u"mac_dst",
+ min_value=0,
+ max_value=7,
+ size=1, op=u"inc"),
+ STLVmWrFlowVar(fv_name=u"mac_dst", pkt_offset=5),
+ STLVmFlowVar(name=u"dst",
min_value=self.p1_dst_start_ip,
max_value=self.p1_dst_end_ip,
- size=4, op="inc"),
- STLVmWrFlowVar(fv_name="dst", pkt_offset="IP.dst"),
- STLVmFixIpv4(offset="IP")])
+ size=4, op=u"inc"),
+ STLVmWrFlowVar(fv_name=u"dst", pkt_offset=u"IP.dst"),
+ STLVmFixIpv4(offset=u"IP")])
# Direction 1 --> 0
- vm2 = STLScVmRaw([STLVmFlowVar(name="mac_dst",
+ vm2 = STLScVmRaw([STLVmFlowVar(name=u"mac_dst",
min_value=0,
max_value=7,
- size=1, op="inc"),
- STLVmWrFlowVar(fv_name="mac_dst", pkt_offset=5),
- STLVmFlowVar(name="dst",
+ size=1, op=u"inc"),
+ STLVmWrFlowVar(fv_name=u"mac_dst", pkt_offset=5),
+ STLVmFlowVar(name=u"dst",
min_value=self.p2_dst_start_ip,
max_value=self.p2_dst_end_ip,
- size=4, op="inc"),
- STLVmWrFlowVar(fv_name="dst", pkt_offset="IP.dst"),
- STLVmFixIpv4(offset="IP")])
+ size=4, op=u"inc"),
+ STLVmWrFlowVar(fv_name=u"dst", pkt_offset=u"IP.dst"),
+ STLVmFixIpv4(offset=u"IP")])
return base_pkt_a, base_pkt_b, vm1, vm2
diff --git a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst4-1cnf.py b/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst4-1cnf.py
index 4d9dbb23d3..8158d5a0fc 100644
--- a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst4-1cnf.py
+++ b/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst4-1cnf.py
@@ -18,10 +18,10 @@ Stream profile:
- Packet: ETH / IP /
- Direction 0 --> 1:
- Source IP address range: 10.0.0.1
- - Destination IP address range: 20.0.0.0 - 20.0.0.3
+ - Destination IP address range: 20.0.0.0 - 20.0.1.143
- Direction 1 --> 0:
- Source IP address range: 20.0.0.1
- - Destination IP address range: 10.0.0.0 - 10.0.0.3
+ - Destination IP address range: 10.0.0.0 - 10.0.1.143
"""
from trex.stl.api import *
@@ -36,17 +36,20 @@ class TrafficStreams(TrafficStreamsBaseClass):
super(TrafficStreamsBaseClass, self).__init__()
- self.p2_dst_start_mac = '02:02:00:00:00:00'
- self.p2_dst_end_mac = '02:02:00:00:00:00'
+ self.p1_dst_start_mac = u"02:02:00:00:12:00"
+ self.p1_dst_end_mac = u"02:02:00:00:12:00"
+
+ self.p2_dst_start_mac = u"02:02:00:00:02:00"
+ self.p2_dst_end_mac = u"02:02:00:00:02:00"
# IPs used in packet headers.
- self.p1_src_start_ip = '10.0.0.1'
- self.p1_dst_start_ip = '20.0.0.0'
- self.p1_dst_end_ip = '20.0.0.3'
+ self.p1_src_start_ip = u"10.0.0.1"
+ self.p1_dst_start_ip = u"20.0.0.0"
+ self.p1_dst_end_ip = u"20.0.0.3"
- self.p2_src_start_ip = '20.0.0.1'
- self.p2_dst_start_ip = '10.0.0.0'
- self.p2_dst_end_ip = '10.0.0.3'
+ self.p2_src_start_ip = u"20.0.0.1"
+ self.p2_dst_start_ip = u"10.0.0.0"
+ self.p2_dst_end_ip = u"10.0.0.3"
def define_packets(self):
"""Defines the packets to be sent from the traffic generator.
@@ -58,7 +61,7 @@ class TrafficStreams(TrafficStreamsBaseClass):
"""
# Direction 0 --> 1
- base_pkt_a = (Ether() /
+ base_pkt_a = (Ether(dst=self.p1_dst_start_mac) /
IP(src=self.p1_src_start_ip,
dst=self.p1_dst_start_ip,
proto=61))
@@ -69,24 +72,29 @@ class TrafficStreams(TrafficStreamsBaseClass):
proto=61))
# Direction 0 --> 1
- vm1 = STLScVmRaw([STLVmFlowVar(name="dst",
+ vm1 = STLScVmRaw([STLVmFlowVar(name=u"mac_dst",
+ min_value=0,
+ max_value=0,
+ size=1, op=u"inc"),
+ STLVmWrFlowVar(fv_name=u"mac_dst", pkt_offset=5),
+ STLVmFlowVar(name=u"dst",
min_value=self.p1_dst_start_ip,
max_value=self.p1_dst_end_ip,
- size=4, op="inc"),
- STLVmWrFlowVar(fv_name="dst", pkt_offset="IP.dst"),
- STLVmFixIpv4(offset="IP")])
+ size=4, op=u"inc"),
+ STLVmWrFlowVar(fv_name=u"dst", pkt_offset=u"IP.dst"),
+ STLVmFixIpv4(offset=u"IP")])
# Direction 1 --> 0
- vm2 = STLScVmRaw([STLVmFlowVar(name="mac_dst",
+ vm2 = STLScVmRaw([STLVmFlowVar(name=u"mac_dst",
min_value=0,
max_value=0,
- size=1, op="inc"),
- STLVmWrFlowVar(fv_name="mac_dst", pkt_offset=5),
- STLVmFlowVar(name="dst",
+ size=1, op=u"inc"),
+ STLVmWrFlowVar(fv_name=u"mac_dst", pkt_offset=5),
+ STLVmFlowVar(name=u"dst",
min_value=self.p2_dst_start_ip,
max_value=self.p2_dst_end_ip,
- size=4, op="inc"),
- STLVmWrFlowVar(fv_name="dst", pkt_offset="IP.dst"),
- STLVmFixIpv4(offset="IP")])
+ size=4, op=u"inc"),
+ STLVmWrFlowVar(fv_name=u"dst", pkt_offset=u"IP.dst"),
+ STLVmFixIpv4(offset=u"IP")])
return base_pkt_a, base_pkt_b, vm1, vm2
diff --git a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst4-2cnf.py b/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst4-2cnf.py
index d6068a4a56..5e2acb5309 100644
--- a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst4-2cnf.py
+++ b/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst4-2cnf.py
@@ -18,10 +18,10 @@ Stream profile:
- Packet: ETH / IP /
- Direction 0 --> 1:
- Source IP address range: 10.0.0.1
- - Destination IP address range: 20.0.0.0 - 20.0.0.3
+ - Destination IP address range: 20.0.0.0 - 20.0.1.143
- Direction 1 --> 0:
- Source IP address range: 20.0.0.1
- - Destination IP address range: 10.0.0.0 - 10.0.0.3
+ - Destination IP address range: 10.0.0.0 - 10.0.1.143
"""
from trex.stl.api import *
@@ -36,17 +36,20 @@ class TrafficStreams(TrafficStreamsBaseClass):
super(TrafficStreamsBaseClass, self).__init__()
- self.p2_dst_start_mac = '02:02:00:00:00:00'
- self.p2_dst_end_mac = '02:02:00:00:00:01'
+ self.p1_dst_start_mac = u"02:02:00:00:12:00"
+ self.p1_dst_end_mac = u"02:02:00:00:12:01"
+
+ self.p2_dst_start_mac = u"02:02:00:00:02:00"
+ self.p2_dst_end_mac = u"02:02:00:00:02:01"
# IPs used in packet headers.
- self.p1_src_start_ip = '10.0.0.1'
- self.p1_dst_start_ip = '20.0.0.0'
- self.p1_dst_end_ip = '20.0.0.3'
+ self.p1_src_start_ip = u"10.0.0.1"
+ self.p1_dst_start_ip = u"20.0.0.0"
+ self.p1_dst_end_ip = u"20.0.0.3"
- self.p2_src_start_ip = '20.0.0.1'
- self.p2_dst_start_ip = '10.0.0.0'
- self.p2_dst_end_ip = '10.0.0.3'
+ self.p2_src_start_ip = u"20.0.0.1"
+ self.p2_dst_start_ip = u"10.0.0.0"
+ self.p2_dst_end_ip = u"10.0.0.3"
def define_packets(self):
"""Defines the packets to be sent from the traffic generator.
@@ -58,7 +61,7 @@ class TrafficStreams(TrafficStreamsBaseClass):
"""
# Direction 0 --> 1
- base_pkt_a = (Ether() /
+ base_pkt_a = (Ether(dst=self.p1_dst_start_mac) /
IP(src=self.p1_src_start_ip,
dst=self.p1_dst_start_ip,
proto=61))
@@ -69,24 +72,29 @@ class TrafficStreams(TrafficStreamsBaseClass):
proto=61))
# Direction 0 --> 1
- vm1 = STLScVmRaw([STLVmFlowVar(name="dst",
+ vm1 = STLScVmRaw([STLVmFlowVar(name=u"mac_dst",
+ min_value=0,
+ max_value=1,
+ size=1, op=u"inc"),
+ STLVmWrFlowVar(fv_name=u"mac_dst", pkt_offset=5),
+ STLVmFlowVar(name=u"dst",
min_value=self.p1_dst_start_ip,
max_value=self.p1_dst_end_ip,
- size=4, op="inc"),
- STLVmWrFlowVar(fv_name="dst", pkt_offset="IP.dst"),
+ size=4, op=u"inc"),
+ STLVmWrFlowVar(fv_name=u"dst", pkt_offset=u"IP.dst"),
STLVmFixIpv4(offset="IP")])
# Direction 1 --> 0
- vm2 = STLScVmRaw([STLVmFlowVar(name="mac_dst",
+ vm2 = STLScVmRaw([STLVmFlowVar(name=u"mac_dst",
min_value=0,
max_value=1,
- size=1, op="inc"),
- STLVmWrFlowVar(fv_name="mac_dst", pkt_offset=5),
- STLVmFlowVar(name="dst",
+ size=1, op=u"inc"),
+ STLVmWrFlowVar(fv_name=u"mac_dst", pkt_offset=5),
+ STLVmFlowVar(name=u"dst",
min_value=self.p2_dst_start_ip,
max_value=self.p2_dst_end_ip,
- size=4, op="inc"),
- STLVmWrFlowVar(fv_name="dst", pkt_offset="IP.dst"),
- STLVmFixIpv4(offset="IP")])
+ size=4, op=u"inc"),
+ STLVmWrFlowVar(fv_name=u"dst", pkt_offset=u"IP.dst"),
+ STLVmFixIpv4(offset=u"IP")])
return base_pkt_a, base_pkt_b, vm1, vm2
diff --git a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst4-4cnf.py b/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst4-4cnf.py
index 8ed46ed45e..7daef807c9 100644
--- a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst4-4cnf.py
+++ b/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst4-4cnf.py
@@ -18,10 +18,10 @@ Stream profile:
- Packet: ETH / IP /
- Direction 0 --> 1:
- Source IP address range: 10.0.0.1
- - Destination IP address range: 20.0.0.0 - 20.0.0.3
+ - Destination IP address range: 20.0.0.0 - 20.0.1.143
- Direction 1 --> 0:
- Source IP address range: 20.0.0.1
- - Destination IP address range: 10.0.0.0 - 10.0.0.3
+ - Destination IP address range: 10.0.0.0 - 10.0.1.143
"""
from trex.stl.api import *
@@ -36,17 +36,20 @@ class TrafficStreams(TrafficStreamsBaseClass):
super(TrafficStreamsBaseClass, self).__init__()
- self.p2_dst_start_mac = '02:02:00:00:00:00'
- self.p2_dst_end_mac = '02:02:00:00:00:03'
+ self.p1_dst_start_mac = u"02:02:00:00:12:00"
+ self.p1_dst_end_mac = u"02:02:00:00:12:03"
+
+ self.p2_dst_start_mac = u"02:02:00:00:02:00"
+ self.p2_dst_end_mac = u"02:02:00:00:02:03"
# IPs used in packet headers.
- self.p1_src_start_ip = '10.0.0.1'
- self.p1_dst_start_ip = '20.0.0.0'
- self.p1_dst_end_ip = '20.0.0.3'
+ self.p1_src_start_ip = u"10.0.0.1"
+ self.p1_dst_start_ip = u"20.0.0.0"
+ self.p1_dst_end_ip = u"20.0.0.3"
- self.p2_src_start_ip = '20.0.0.1'
- self.p2_dst_start_ip = '10.0.0.0'
- self.p2_dst_end_ip = '10.0.0.3'
+ self.p2_src_start_ip = u"20.0.0.1"
+ self.p2_dst_start_ip = u"10.0.0.0"
+ self.p2_dst_end_ip = u"10.0.0.3"
def define_packets(self):
"""Defines the packets to be sent from the traffic generator.
@@ -58,7 +61,7 @@ class TrafficStreams(TrafficStreamsBaseClass):
"""
# Direction 0 --> 1
- base_pkt_a = (Ether() /
+ base_pkt_a = (Ether(dst=self.p1_dst_start_mac) /
IP(src=self.p1_src_start_ip,
dst=self.p1_dst_start_ip,
proto=61))
@@ -69,24 +72,29 @@ class TrafficStreams(TrafficStreamsBaseClass):
proto=61))
# Direction 0 --> 1
- vm1 = STLScVmRaw([STLVmFlowVar(name="dst",
+ vm1 = STLScVmRaw([STLVmFlowVar(name=u"mac_dst",
+ min_value=0,
+ max_value=3,
+ size=1, op=u"inc"),
+ STLVmWrFlowVar(fv_name=u"mac_dst", pkt_offset=5),
+ STLVmFlowVar(name=u"dst",
min_value=self.p1_dst_start_ip,
max_value=self.p1_dst_end_ip,
- size=4, op="inc"),
- STLVmWrFlowVar(fv_name="dst", pkt_offset="IP.dst"),
- STLVmFixIpv4(offset="IP")])
+ size=4, op=u"inc"),
+ STLVmWrFlowVar(fv_name=u"dst", pkt_offset=u"IP.dst"),
+ STLVmFixIpv4(offset=u"IP")])
# Direction 1 --> 0
- vm2 = STLScVmRaw([STLVmFlowVar(name="mac_dst",
+ vm2 = STLScVmRaw([STLVmFlowVar(name=u"mac_dst",
min_value=0,
max_value=3,
- size=1, op="inc"),
- STLVmWrFlowVar(fv_name="mac_dst", pkt_offset=5),
- STLVmFlowVar(name="dst",
+ size=1, op=u"inc"),
+ STLVmWrFlowVar(fv_name=u"mac_dst", pkt_offset=5),
+ STLVmFlowVar(name=u"dst",
min_value=self.p2_dst_start_ip,
max_value=self.p2_dst_end_ip,
- size=4, op="inc"),
- STLVmWrFlowVar(fv_name="dst", pkt_offset="IP.dst"),
- STLVmFixIpv4(offset="IP")])
+ size=4, op=u"inc"),
+ STLVmWrFlowVar(fv_name=u"dst", pkt_offset=u"IP.dst"),
+ STLVmFixIpv4(offset=u"IP")])
return base_pkt_a, base_pkt_b, vm1, vm2
diff --git a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst40-1cnf.py b/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst40-1cnf.py
index c3549940a4..f461aeace6 100644
--- a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst40-1cnf.py
+++ b/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst40-1cnf.py
@@ -18,10 +18,10 @@ Stream profile:
- Packet: ETH / IP /
- Direction 0 --> 1:
- Source IP address range: 10.0.0.1
- - Destination IP address range: 20.0.0.0 - 20.0.0.39
+ - Destination IP address range: 20.0.0.0 - 20.0.1.143
- Direction 1 --> 0:
- Source IP address range: 20.0.0.1
- - Destination IP address range: 10.0.0.0 - 10.0.0.39
+ - Destination IP address range: 10.0.0.0 - 10.0.1.143
"""
from trex.stl.api import *
@@ -36,17 +36,20 @@ class TrafficStreams(TrafficStreamsBaseClass):
super(TrafficStreamsBaseClass, self).__init__()
- self.p2_dst_start_mac = '02:02:00:00:00:00'
- self.p2_dst_end_mac = '02:02:00:00:00:00'
+ self.p1_dst_start_mac = u"02:02:00:00:12:00"
+ self.p1_dst_end_mac = u"02:02:00:00:12:00"
+
+ self.p2_dst_start_mac = u"02:02:00:00:02:00"
+ self.p2_dst_end_mac = u"02:02:00:00:02:00"
# IPs used in packet headers.
- self.p1_src_start_ip = '10.0.0.1'
- self.p1_dst_start_ip = '20.0.0.0'
- self.p1_dst_end_ip = '20.0.0.39'
+ self.p1_src_start_ip = u"10.0.0.1"
+ self.p1_dst_start_ip = u"20.0.0.0"
+ self.p1_dst_end_ip = u"20.0.0.39"
- self.p2_src_start_ip = '20.0.0.1'
- self.p2_dst_start_ip = '10.0.0.0'
- self.p2_dst_end_ip = '10.0.0.39'
+ self.p2_src_start_ip = u"20.0.0.1"
+ self.p2_dst_start_ip = u"10.0.0.0"
+ self.p2_dst_end_ip = u"10.0.0.39"
def define_packets(self):
"""Defines the packets to be sent from the traffic generator.
@@ -58,7 +61,7 @@ class TrafficStreams(TrafficStreamsBaseClass):
"""
# Direction 0 --> 1
- base_pkt_a = (Ether() /
+ base_pkt_a = (Ether(dst=self.p1_dst_start_mac) /
IP(src=self.p1_src_start_ip,
dst=self.p1_dst_start_ip,
proto=61))
@@ -69,24 +72,29 @@ class TrafficStreams(TrafficStreamsBaseClass):
proto=61))
# Direction 0 --> 1
- vm1 = STLScVmRaw([STLVmFlowVar(name="dst",
+ vm1 = STLScVmRaw([STLVmFlowVar(name=u"mac_dst",
+ min_value=0,
+ max_value=0,
+ size=1, op=u"inc"),
+ STLVmWrFlowVar(fv_name=u"mac_dst", pkt_offset=5),
+ STLVmFlowVar(name=u"dst",
min_value=self.p1_dst_start_ip,
max_value=self.p1_dst_end_ip,
- size=4, op="inc"),
- STLVmWrFlowVar(fv_name="dst", pkt_offset="IP.dst"),
- STLVmFixIpv4(offset="IP")])
+ size=4, op=u"inc"),
+ STLVmWrFlowVar(fv_name=u"dst", pkt_offset=u"IP.dst"),
+ STLVmFixIpv4(offset=u"IP")])
# Direction 1 --> 0
- vm2 = STLScVmRaw([STLVmFlowVar(name="mac_dst",
+ vm2 = STLScVmRaw([STLVmFlowVar(name=u"mac_dst",
min_value=0,
max_value=0,
- size=1, op="inc"),
- STLVmWrFlowVar(fv_name="mac_dst", pkt_offset=5),
- STLVmFlowVar(name="dst",
+ size=1, op=u"inc"),
+ STLVmWrFlowVar(fv_name=u"mac_dst", pkt_offset=5),
+ STLVmFlowVar(name=u"dst",
min_value=self.p2_dst_start_ip,
max_value=self.p2_dst_end_ip,
- size=4, op="inc"),
- STLVmWrFlowVar(fv_name="dst", pkt_offset="IP.dst"),
- STLVmFixIpv4(offset="IP")])
+ size=4, op=u"inc"),
+ STLVmWrFlowVar(fv_name=u"dst", pkt_offset=u"IP.dst"),
+ STLVmFixIpv4(offset=u"IP")])
return base_pkt_a, base_pkt_b, vm1, vm2
diff --git a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst40-2cnf.py b/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst40-2cnf.py
index ca5e768c84..bce38697bf 100644
--- a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst40-2cnf.py
+++ b/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst40-2cnf.py
@@ -18,10 +18,10 @@ Stream profile:
- Packet: ETH / IP /
- Direction 0 --> 1:
- Source IP address range: 10.0.0.1
- - Destination IP address range: 20.0.0.0 - 20.0.0.39
+ - Destination IP address range: 20.0.0.0 - 20.0.1.143
- Direction 1 --> 0:
- Source IP address range: 20.0.0.1
- - Destination IP address range: 10.0.0.0 - 10.0.0.39
+ - Destination IP address range: 10.0.0.0 - 10.0.1.143
"""
from trex.stl.api import *
@@ -36,17 +36,20 @@ class TrafficStreams(TrafficStreamsBaseClass):
super(TrafficStreamsBaseClass, self).__init__()
- self.p2_dst_start_mac = '02:02:00:00:00:00'
- self.p2_dst_end_mac = '02:02:00:00:00:01'
+ self.p1_dst_start_mac = u"02:02:00:00:12:00"
+ self.p1_dst_end_mac = u"02:02:00:00:12:01"
+
+ self.p2_dst_start_mac = u"02:02:00:00:02:00"
+ self.p2_dst_end_mac = u"02:02:00:00:02:01"
# IPs used in packet headers.
- self.p1_src_start_ip = '10.0.0.1'
- self.p1_dst_start_ip = '20.0.0.0'
- self.p1_dst_end_ip = '20.0.0.39'
+ self.p1_src_start_ip = u"10.0.0.1"
+ self.p1_dst_start_ip = u"20.0.0.0"
+ self.p1_dst_end_ip = u"20.0.0.39"
- self.p2_src_start_ip = '20.0.0.1'
- self.p2_dst_start_ip = '10.0.0.0'
- self.p2_dst_end_ip = '10.0.0.39'
+ self.p2_src_start_ip = u"20.0.0.1"
+ self.p2_dst_start_ip = u"10.0.0.0"
+ self.p2_dst_end_ip = u"10.0.0.39"
def define_packets(self):
"""Defines the packets to be sent from the traffic generator.
@@ -58,7 +61,7 @@ class TrafficStreams(TrafficStreamsBaseClass):
"""
# Direction 0 --> 1
- base_pkt_a = (Ether() /
+ base_pkt_a = (Ether(dst=self.p1_dst_start_mac) /
IP(src=self.p1_src_start_ip,
dst=self.p1_dst_start_ip,
proto=61))
@@ -69,24 +72,29 @@ class TrafficStreams(TrafficStreamsBaseClass):
proto=61))
# Direction 0 --> 1
- vm1 = STLScVmRaw([STLVmFlowVar(name="dst",
+ vm1 = STLScVmRaw([STLVmFlowVar(name=u"mac_dst",
+ min_value=0,
+ max_value=1,
+ size=1, op=u"inc"),
+ STLVmWrFlowVar(fv_name=u"mac_dst", pkt_offset=5),
+ STLVmFlowVar(name=u"dst",
min_value=self.p1_dst_start_ip,
max_value=self.p1_dst_end_ip,
- size=4, op="inc"),
- STLVmWrFlowVar(fv_name="dst", pkt_offset="IP.dst"),
+ size=4, op=u"inc"),
+ STLVmWrFlowVar(fv_name=u"dst", pkt_offset=u"IP.dst"),
STLVmFixIpv4(offset="IP")])
# Direction 1 --> 0
- vm2 = STLScVmRaw([STLVmFlowVar(name="mac_dst",
+ vm2 = STLScVmRaw([STLVmFlowVar(name=u"mac_dst",
min_value=0,
max_value=1,
- size=1, op="inc"),
- STLVmWrFlowVar(fv_name="mac_dst", pkt_offset=5),
- STLVmFlowVar(name="dst",
+ size=1, op=u"inc"),
+ STLVmWrFlowVar(fv_name=u"mac_dst", pkt_offset=5),
+ STLVmFlowVar(name=u"dst",
min_value=self.p2_dst_start_ip,
max_value=self.p2_dst_end_ip,
- size=4, op="inc"),
- STLVmWrFlowVar(fv_name="dst", pkt_offset="IP.dst"),
- STLVmFixIpv4(offset="IP")])
+ size=4, op=u"inc"),
+ STLVmWrFlowVar(fv_name=u"dst", pkt_offset=u"IP.dst"),
+ STLVmFixIpv4(offset=u"IP")])
return base_pkt_a, base_pkt_b, vm1, vm2
diff --git a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst40-4cnf.py b/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst40-4cnf.py
index eea11a569b..80786a13ec 100644
--- a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst40-4cnf.py
+++ b/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst40-4cnf.py
@@ -18,10 +18,10 @@ Stream profile:
- Packet: ETH / IP /
- Direction 0 --> 1:
- Source IP address range: 10.0.0.1
- - Destination IP address range: 20.0.0.0 - 20.0.0.39
+ - Destination IP address range: 20.0.0.0 - 20.0.1.143
- Direction 1 --> 0:
- Source IP address range: 20.0.0.1
- - Destination IP address range: 10.0.0.0 - 10.0.0.39
+ - Destination IP address range: 10.0.0.0 - 10.0.1.143
"""
from trex.stl.api import *
@@ -36,17 +36,20 @@ class TrafficStreams(TrafficStreamsBaseClass):
super(TrafficStreamsBaseClass, self).__init__()
- self.p2_dst_start_mac = '02:02:00:00:00:00'
- self.p2_dst_end_mac = '02:02:00:00:00:03'
+ self.p1_dst_start_mac = u"02:02:00:00:12:00"
+ self.p1_dst_end_mac = u"02:02:00:00:12:03"
+
+ self.p2_dst_start_mac = u"02:02:00:00:02:00"
+ self.p2_dst_end_mac = u"02:02:00:00:02:03"
# IPs used in packet headers.
- self.p1_src_start_ip = '10.0.0.1'
- self.p1_dst_start_ip = '20.0.0.0'
- self.p1_dst_end_ip = '20.0.0.39'
+ self.p1_src_start_ip = u"10.0.0.1"
+ self.p1_dst_start_ip = u"20.0.0.0"
+ self.p1_dst_end_ip = u"20.0.0.39"
- self.p2_src_start_ip = '20.0.0.1'
- self.p2_dst_start_ip = '10.0.0.0'
- self.p2_dst_end_ip = '10.0.0.39'
+ self.p2_src_start_ip = u"20.0.0.1"
+ self.p2_dst_start_ip = u"10.0.0.0"
+ self.p2_dst_end_ip = u"10.0.0.39"
def define_packets(self):
"""Defines the packets to be sent from the traffic generator.
@@ -58,7 +61,7 @@ class TrafficStreams(TrafficStreamsBaseClass):
"""
# Direction 0 --> 1
- base_pkt_a = (Ether() /
+ base_pkt_a = (Ether(dst=self.p1_dst_start_mac) /
IP(src=self.p1_src_start_ip,
dst=self.p1_dst_start_ip,
proto=61))
@@ -69,24 +72,29 @@ class TrafficStreams(TrafficStreamsBaseClass):
proto=61))
# Direction 0 --> 1
- vm1 = STLScVmRaw([STLVmFlowVar(name="dst",
+ vm1 = STLScVmRaw([STLVmFlowVar(name=u"mac_dst",
+ min_value=0,
+ max_value=3,
+ size=1, op=u"inc"),
+ STLVmWrFlowVar(fv_name=u"mac_dst", pkt_offset=5),
+ STLVmFlowVar(name=u"dst",
min_value=self.p1_dst_start_ip,
max_value=self.p1_dst_end_ip,
- size=4, op="inc"),
- STLVmWrFlowVar(fv_name="dst", pkt_offset="IP.dst"),
- STLVmFixIpv4(offset="IP")])
+ size=4, op=u"inc"),
+ STLVmWrFlowVar(fv_name=u"dst", pkt_offset=u"IP.dst"),
+ STLVmFixIpv4(offset=u"IP")])
# Direction 1 --> 0
- vm2 = STLScVmRaw([STLVmFlowVar(name="mac_dst",
+ vm2 = STLScVmRaw([STLVmFlowVar(name=u"mac_dst",
min_value=0,
max_value=3,
- size=1, op="inc"),
- STLVmWrFlowVar(fv_name="mac_dst", pkt_offset=5),
- STLVmFlowVar(name="dst",
+ size=1, op=u"inc"),
+ STLVmWrFlowVar(fv_name=u"mac_dst", pkt_offset=5),
+ STLVmFlowVar(name=u"dst",
min_value=self.p2_dst_start_ip,
max_value=self.p2_dst_end_ip,
- size=4, op="inc"),
- STLVmWrFlowVar(fv_name="dst", pkt_offset="IP.dst"),
- STLVmFixIpv4(offset="IP")])
+ size=4, op=u"inc"),
+ STLVmWrFlowVar(fv_name=u"dst", pkt_offset=u"IP.dst"),
+ STLVmFixIpv4(offset=u"IP")])
return base_pkt_a, base_pkt_b, vm1, vm2
diff --git a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst40-8cnf.py b/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst40-8cnf.py
index 05dd46ea5e..d819426634 100644
--- a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst40-8cnf.py
+++ b/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst40-8cnf.py
@@ -18,10 +18,10 @@ Stream profile:
- Packet: ETH / IP /
- Direction 0 --> 1:
- Source IP address range: 10.0.0.1
- - Destination IP address range: 20.0.0.0 - 20.0.0.39
+ - Destination IP address range: 20.0.0.0 - 20.0.1.143
- Direction 1 --> 0:
- Source IP address range: 20.0.0.1
- - Destination IP address range: 10.0.0.0 - 10.0.0.39
+ - Destination IP address range: 10.0.0.0 - 10.0.1.143
"""
from trex.stl.api import *
@@ -36,17 +36,20 @@ class TrafficStreams(TrafficStreamsBaseClass):
super(TrafficStreamsBaseClass, self).__init__()
- self.p2_dst_start_mac = '02:02:00:00:00:00'
- self.p2_dst_end_mac = '02:02:00:00:00:07'
+ self.p1_dst_start_mac = u"02:02:00:00:12:00"
+ self.p1_dst_end_mac = u"02:02:00:00:12:07"
+
+ self.p2_dst_start_mac = u"02:02:00:00:02:00"
+ self.p2_dst_end_mac = u"02:02:00:00:02:07"
# IPs used in packet headers.
- self.p1_src_start_ip = '10.0.0.1'
- self.p1_dst_start_ip = '20.0.0.0'
- self.p1_dst_end_ip = '20.0.0.39'
+ self.p1_src_start_ip = u"10.0.0.1"
+ self.p1_dst_start_ip = u"20.0.0.0"
+ self.p1_dst_end_ip = u"20.0.0.39"
- self.p2_src_start_ip = '20.0.0.1'
- self.p2_dst_start_ip = '10.0.0.0'
- self.p2_dst_end_ip = '10.0.0.39'
+ self.p2_src_start_ip = u"20.0.0.1"
+ self.p2_dst_start_ip = u"10.0.0.0"
+ self.p2_dst_end_ip = u"10.0.0.39"
def define_packets(self):
"""Defines the packets to be sent from the traffic generator.
@@ -58,7 +61,7 @@ class TrafficStreams(TrafficStreamsBaseClass):
"""
# Direction 0 --> 1
- base_pkt_a = (Ether() /
+ base_pkt_a = (Ether(dst=self.p1_dst_start_mac) /
IP(src=self.p1_src_start_ip,
dst=self.p1_dst_start_ip,
proto=61))
@@ -69,24 +72,29 @@ class TrafficStreams(TrafficStreamsBaseClass):
proto=61))
# Direction 0 --> 1
- vm1 = STLScVmRaw([STLVmFlowVar(name="dst",
+ vm1 = STLScVmRaw([STLVmFlowVar(name=u"mac_dst",
+ min_value=0,
+ max_value=7,
+ size=1, op=u"inc"),
+ STLVmWrFlowVar(fv_name=u"mac_dst", pkt_offset=5),
+ STLVmFlowVar(name=u"dst",
min_value=self.p1_dst_start_ip,
max_value=self.p1_dst_end_ip,
- size=4, op="inc"),
- STLVmWrFlowVar(fv_name="dst", pkt_offset="IP.dst"),
- STLVmFixIpv4(offset="IP")])
+ size=4, op=u"inc"),
+ STLVmWrFlowVar(fv_name=u"dst", pkt_offset=u"IP.dst"),
+ STLVmFixIpv4(offset=u"IP")])
# Direction 1 --> 0
- vm2 = STLScVmRaw([STLVmFlowVar(name="mac_dst",
+ vm2 = STLScVmRaw([STLVmFlowVar(name=u"mac_dst",
min_value=0,
max_value=7,
- size=1, op="inc"),
- STLVmWrFlowVar(fv_name="mac_dst", pkt_offset=5),
- STLVmFlowVar(name="dst",
+ size=1, op=u"inc"),
+ STLVmWrFlowVar(fv_name=u"mac_dst", pkt_offset=5),
+ STLVmFlowVar(name=u"dst",
min_value=self.p2_dst_start_ip,
max_value=self.p2_dst_end_ip,
- size=4, op="inc"),
- STLVmWrFlowVar(fv_name="dst", pkt_offset="IP.dst"),
- STLVmFixIpv4(offset="IP")])
+ size=4, op=u"inc"),
+ STLVmWrFlowVar(fv_name=u"dst", pkt_offset=u"IP.dst"),
+ STLVmFixIpv4(offset=u"IP")])
return base_pkt_a, base_pkt_b, vm1, vm2
diff --git a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst400-1cnf.py b/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst400-1cnf.py
index 6a12081ef4..17f2b3cdf6 100644
--- a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst400-1cnf.py
+++ b/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst400-1cnf.py
@@ -36,17 +36,20 @@ class TrafficStreams(TrafficStreamsBaseClass):
super(TrafficStreamsBaseClass, self).__init__()
- self.p2_dst_start_mac = '02:02:00:00:00:00'
- self.p2_dst_end_mac = '02:02:00:00:00:00'
+ self.p1_dst_start_mac = u"02:02:00:00:12:00"
+ self.p1_dst_end_mac = u"02:02:00:00:12:00"
+
+ self.p2_dst_start_mac = u"02:02:00:00:02:00"
+ self.p2_dst_end_mac = u"02:02:00:00:02:00"
# IPs used in packet headers.
- self.p1_src_start_ip = '10.0.0.1'
- self.p1_dst_start_ip = '20.0.0.0'
- self.p1_dst_end_ip = '20.0.1.143'
+ self.p1_src_start_ip = u"10.0.0.1"
+ self.p1_dst_start_ip = u"20.0.0.0"
+ self.p1_dst_end_ip = u"20.0.1.143"
- self.p2_src_start_ip = '20.0.0.1'
- self.p2_dst_start_ip = '10.0.0.0'
- self.p2_dst_end_ip = '10.0.1.143'
+ self.p2_src_start_ip = u"20.0.0.1"
+ self.p2_dst_start_ip = u"10.0.0.0"
+ self.p2_dst_end_ip = u"10.0.1.143"
def define_packets(self):
"""Defines the packets to be sent from the traffic generator.
@@ -58,7 +61,7 @@ class TrafficStreams(TrafficStreamsBaseClass):
"""
# Direction 0 --> 1
- base_pkt_a = (Ether() /
+ base_pkt_a = (Ether(dst=self.p1_dst_start_mac) /
IP(src=self.p1_src_start_ip,
dst=self.p1_dst_start_ip,
proto=61))
@@ -69,24 +72,29 @@ class TrafficStreams(TrafficStreamsBaseClass):
proto=61))
# Direction 0 --> 1
- vm1 = STLScVmRaw([STLVmFlowVar(name="dst",
+ vm1 = STLScVmRaw([STLVmFlowVar(name=u"mac_dst",
+ min_value=0,
+ max_value=0,
+ size=1, op=u"inc"),
+ STLVmWrFlowVar(fv_name=u"mac_dst", pkt_offset=5),
+ STLVmFlowVar(name=u"dst",
min_value=self.p1_dst_start_ip,
max_value=self.p1_dst_end_ip,
- size=4, op="inc"),
- STLVmWrFlowVar(fv_name="dst", pkt_offset="IP.dst"),
- STLVmFixIpv4(offset="IP")])
+ size=4, op=u"inc"),
+ STLVmWrFlowVar(fv_name=u"dst", pkt_offset=u"IP.dst"),
+ STLVmFixIpv4(offset=u"IP")])
# Direction 1 --> 0
- vm2 = STLScVmRaw([STLVmFlowVar(name="mac_dst",
+ vm2 = STLScVmRaw([STLVmFlowVar(name=u"mac_dst",
min_value=0,
max_value=0,
- size=1, op="inc"),
- STLVmWrFlowVar(fv_name="mac_dst", pkt_offset=5),
- STLVmFlowVar(name="dst",
+ size=1, op=u"inc"),
+ STLVmWrFlowVar(fv_name=u"mac_dst", pkt_offset=5),
+ STLVmFlowVar(name=u"dst",
min_value=self.p2_dst_start_ip,
max_value=self.p2_dst_end_ip,
- size=4, op="inc"),
- STLVmWrFlowVar(fv_name="dst", pkt_offset="IP.dst"),
- STLVmFixIpv4(offset="IP")])
+ size=4, op=u"inc"),
+ STLVmWrFlowVar(fv_name=u"dst", pkt_offset=u"IP.dst"),
+ STLVmFixIpv4(offset=u"IP")])
return base_pkt_a, base_pkt_b, vm1, vm2
diff --git a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst400-2cnf.py b/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst400-2cnf.py
index 8fe94ec8bd..3484ed3ddc 100644
--- a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst400-2cnf.py
+++ b/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst400-2cnf.py
@@ -36,17 +36,20 @@ class TrafficStreams(TrafficStreamsBaseClass):
super(TrafficStreamsBaseClass, self).__init__()
- self.p2_dst_start_mac = '02:02:00:00:00:00'
- self.p2_dst_end_mac = '02:02:00:00:00:01'
+ self.p1_dst_start_mac = u"02:02:00:00:12:00"
+ self.p1_dst_end_mac = u"02:02:00:00:12:01"
+
+ self.p2_dst_start_mac = u"02:02:00:00:02:00"
+ self.p2_dst_end_mac = u"02:02:00:00:02:01"
# IPs used in packet headers.
- self.p1_src_start_ip = '10.0.0.1'
- self.p1_dst_start_ip = '20.0.0.0'
- self.p1_dst_end_ip = '20.0.1.143'
+ self.p1_src_start_ip = u"10.0.0.1"
+ self.p1_dst_start_ip = u"20.0.0.0"
+ self.p1_dst_end_ip = u"20.0.1.143"
- self.p2_src_start_ip = '20.0.0.1'
- self.p2_dst_start_ip = '10.0.0.0'
- self.p2_dst_end_ip = '10.0.1.143'
+ self.p2_src_start_ip = u"20.0.0.1"
+ self.p2_dst_start_ip = u"10.0.0.0"
+ self.p2_dst_end_ip = u"10.0.1.143"
def define_packets(self):
"""Defines the packets to be sent from the traffic generator.
@@ -58,7 +61,7 @@ class TrafficStreams(TrafficStreamsBaseClass):
"""
# Direction 0 --> 1
- base_pkt_a = (Ether() /
+ base_pkt_a = (Ether(dst=self.p1_dst_start_mac) /
IP(src=self.p1_src_start_ip,
dst=self.p1_dst_start_ip,
proto=61))
@@ -69,24 +72,29 @@ class TrafficStreams(TrafficStreamsBaseClass):
proto=61))
# Direction 0 --> 1
- vm1 = STLScVmRaw([STLVmFlowVar(name="dst",
+ vm1 = STLScVmRaw([STLVmFlowVar(name=u"mac_dst",
+ min_value=0,
+ max_value=1,
+ size=1, op=u"inc"),
+ STLVmWrFlowVar(fv_name=u"mac_dst", pkt_offset=5),
+ STLVmFlowVar(name=u"dst",
min_value=self.p1_dst_start_ip,
max_value=self.p1_dst_end_ip,
- size=4, op="inc"),
- STLVmWrFlowVar(fv_name="dst", pkt_offset="IP.dst"),
- STLVmFixIpv4(offset="IP")])
+ size=4, op=u"inc"),
+ STLVmWrFlowVar(fv_name=u"dst", pkt_offset=u"IP.dst"),
+ STLVmFixIpv4(offset=u"IP")])
# Direction 1 --> 0
- vm2 = STLScVmRaw([STLVmFlowVar(name="mac_dst",
+ vm2 = STLScVmRaw([STLVmFlowVar(name=u"mac_dst",
min_value=0,
max_value=1,
- size=1, op="inc"),
- STLVmWrFlowVar(fv_name="mac_dst", pkt_offset=5),
- STLVmFlowVar(name="dst",
+ size=1, op=u"inc"),
+ STLVmWrFlowVar(fv_name=u"mac_dst", pkt_offset=5),
+ STLVmFlowVar(name=u"dst",
min_value=self.p2_dst_start_ip,
max_value=self.p2_dst_end_ip,
- size=4, op="inc"),
- STLVmWrFlowVar(fv_name="dst", pkt_offset="IP.dst"),
- STLVmFixIpv4(offset="IP")])
+ size=4, op=u"inc"),
+ STLVmWrFlowVar(fv_name=u"dst", pkt_offset=u"IP.dst"),
+ STLVmFixIpv4(offset=u"IP")])
return base_pkt_a, base_pkt_b, vm1, vm2
diff --git a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst400-4cnf.py b/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst400-4cnf.py
index 935f46cf13..5f8011a426 100644
--- a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst400-4cnf.py
+++ b/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst400-4cnf.py
@@ -36,17 +36,20 @@ class TrafficStreams(TrafficStreamsBaseClass):
super(TrafficStreamsBaseClass, self).__init__()
- self.p2_dst_start_mac = '02:02:00:00:00:00'
- self.p2_dst_end_mac = '02:02:00:00:00:03'
+ self.p1_dst_start_mac = u"02:02:00:00:12:00"
+ self.p1_dst_end_mac = u"02:02:00:00:12:03"
+
+ self.p2_dst_start_mac = u"02:02:00:00:02:00"
+ self.p2_dst_end_mac = u"02:02:00:00:02:03"
# IPs used in packet headers.
- self.p1_src_start_ip = '10.0.0.1'
- self.p1_dst_start_ip = '20.0.0.0'
- self.p1_dst_end_ip = '20.0.1.143'
+ self.p1_src_start_ip = u"10.0.0.1"
+ self.p1_dst_start_ip = u"20.0.0.0"
+ self.p1_dst_end_ip = u"20.0.1.143"
- self.p2_src_start_ip = '20.0.0.1'
- self.p2_dst_start_ip = '10.0.0.0'
- self.p2_dst_end_ip = '10.0.1.143'
+ self.p2_src_start_ip = u"20.0.0.1"
+ self.p2_dst_start_ip = u"10.0.0.0"
+ self.p2_dst_end_ip = u"10.0.1.143"
def define_packets(self):
"""Defines the packets to be sent from the traffic generator.
@@ -58,7 +61,7 @@ class TrafficStreams(TrafficStreamsBaseClass):
"""
# Direction 0 --> 1
- base_pkt_a = (Ether() /
+ base_pkt_a = (Ether(dst=self.p1_dst_start_mac) /
IP(src=self.p1_src_start_ip,
dst=self.p1_dst_start_ip,
proto=61))
@@ -69,24 +72,29 @@ class TrafficStreams(TrafficStreamsBaseClass):
proto=61))
# Direction 0 --> 1
- vm1 = STLScVmRaw([STLVmFlowVar(name="dst",
+ vm1 = STLScVmRaw([STLVmFlowVar(name=u"mac_dst",
+ min_value=0,
+ max_value=3,
+ size=1, op=u"inc"),
+ STLVmWrFlowVar(fv_name=u"mac_dst", pkt_offset=5),
+ STLVmFlowVar(name=u"dst",
min_value=self.p1_dst_start_ip,
max_value=self.p1_dst_end_ip,
- size=4, op="inc"),
- STLVmWrFlowVar(fv_name="dst", pkt_offset="IP.dst"),
- STLVmFixIpv4(offset="IP")])
+ size=4, op=u"inc"),
+ STLVmWrFlowVar(fv_name=u"dst", pkt_offset=u"IP.dst"),
+ STLVmFixIpv4(offset=u"IP")])
# Direction 1 --> 0
- vm2 = STLScVmRaw([STLVmFlowVar(name="mac_dst",
+ vm2 = STLScVmRaw([STLVmFlowVar(name=u"mac_dst",
min_value=0,
max_value=3,
- size=1, op="inc"),
- STLVmWrFlowVar(fv_name="mac_dst", pkt_offset=5),
- STLVmFlowVar(name="dst",
+ size=1, op=u"inc"),
+ STLVmWrFlowVar(fv_name=u"mac_dst", pkt_offset=5),
+ STLVmFlowVar(name=u"dst",
min_value=self.p2_dst_start_ip,
max_value=self.p2_dst_end_ip,
- size=4, op="inc"),
- STLVmWrFlowVar(fv_name="dst", pkt_offset="IP.dst"),
- STLVmFixIpv4(offset="IP")])
+ size=4, op=u"inc"),
+ STLVmWrFlowVar(fv_name=u"dst", pkt_offset=u"IP.dst"),
+ STLVmFixIpv4(offset=u"IP")])
return base_pkt_a, base_pkt_b, vm1, vm2
diff --git a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst400-8cnf.py b/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst400-8cnf.py
index 9a03ea68da..00721d5d10 100644
--- a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst400-8cnf.py
+++ b/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst400-8cnf.py
@@ -36,17 +36,20 @@ class TrafficStreams(TrafficStreamsBaseClass):
super(TrafficStreamsBaseClass, self).__init__()
- self.p2_dst_start_mac = '02:02:00:00:00:00'
- self.p2_dst_end_mac = '02:02:00:00:00:07'
+ self.p1_dst_start_mac = u"02:02:00:00:12:00"
+ self.p1_dst_end_mac = u"02:02:00:00:12:07"
+
+ self.p2_dst_start_mac = u"02:02:00:00:02:00"
+ self.p2_dst_end_mac = u"02:02:00:00:02:07"
# IPs used in packet headers.
- self.p1_src_start_ip = '10.0.0.1'
- self.p1_dst_start_ip = '20.0.0.0'
- self.p1_dst_end_ip = '20.0.1.143'
+ self.p1_src_start_ip = u"10.0.0.1"
+ self.p1_dst_start_ip = u"20.0.0.0"
+ self.p1_dst_end_ip = u"20.0.1.143"
- self.p2_src_start_ip = '20.0.0.1'
- self.p2_dst_start_ip = '10.0.0.0'
- self.p2_dst_end_ip = '10.0.1.143'
+ self.p2_src_start_ip = u"20.0.0.1"
+ self.p2_dst_start_ip = u"10.0.0.0"
+ self.p2_dst_end_ip = u"10.0.1.143"
def define_packets(self):
"""Defines the packets to be sent from the traffic generator.
@@ -58,7 +61,7 @@ class TrafficStreams(TrafficStreamsBaseClass):
"""
# Direction 0 --> 1
- base_pkt_a = (Ether() /
+ base_pkt_a = (Ether(dst=self.p1_dst_start_mac) /
IP(src=self.p1_src_start_ip,
dst=self.p1_dst_start_ip,
proto=61))
@@ -69,24 +72,29 @@ class TrafficStreams(TrafficStreamsBaseClass):
proto=61))
# Direction 0 --> 1
- vm1 = STLScVmRaw([STLVmFlowVar(name="dst",
+ vm1 = STLScVmRaw([STLVmFlowVar(name=u"mac_dst",
+ min_value=0,
+ max_value=7,
+ size=1, op=u"inc"),
+ STLVmWrFlowVar(fv_name=u"mac_dst", pkt_offset=5),
+ STLVmFlowVar(name=u"dst",
min_value=self.p1_dst_start_ip,
max_value=self.p1_dst_end_ip,
- size=4, op="inc"),
- STLVmWrFlowVar(fv_name="dst", pkt_offset="IP.dst"),
- STLVmFixIpv4(offset="IP")])
+ size=4, op=u"inc"),
+ STLVmWrFlowVar(fv_name=u"dst", pkt_offset=u"IP.dst"),
+ STLVmFixIpv4(offset=u"IP")])
# Direction 1 --> 0
- vm2 = STLScVmRaw([STLVmFlowVar(name="mac_dst",
+ vm2 = STLScVmRaw([STLVmFlowVar(name=u"mac_dst",
min_value=0,
max_value=7,
- size=1, op="inc"),
- STLVmWrFlowVar(fv_name="mac_dst", pkt_offset=5),
- STLVmFlowVar(name="dst",
+ size=1, op=u"inc"),
+ STLVmWrFlowVar(fv_name=u"mac_dst", pkt_offset=5),
+ STLVmFlowVar(name=u"dst",
min_value=self.p2_dst_start_ip,
max_value=self.p2_dst_end_ip,
- size=4, op="inc"),
- STLVmWrFlowVar(fv_name="dst", pkt_offset="IP.dst"),
- STLVmFixIpv4(offset="IP")])
+ size=4, op=u"inc"),
+ STLVmWrFlowVar(fv_name=u"dst", pkt_offset=u"IP.dst"),
+ STLVmFixIpv4(offset=u"IP")])
return base_pkt_a, base_pkt_b, vm1, vm2
diff --git a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst40000-1cnf.py b/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst40000-1cnf.py
index 33fdc0e162..8bf01235eb 100644
--- a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst40000-1cnf.py
+++ b/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst40000-1cnf.py
@@ -18,10 +18,10 @@ Stream profile:
- Packet: ETH / IP /
- Direction 0 --> 1:
- Source IP address range: 10.0.0.1
- - Destination IP address range: 20.0.0.0 - 20.0.156.63
+ - Destination IP address range: 20.0.0.0 - 20.0.1.143
- Direction 1 --> 0:
- Source IP address range: 20.0.0.1
- - Destination IP address range: 10.0.0.0 - 10.0.156.63
+ - Destination IP address range: 10.0.0.0 - 10.0.1.143
"""
from trex.stl.api import *
@@ -36,17 +36,20 @@ class TrafficStreams(TrafficStreamsBaseClass):
super(TrafficStreamsBaseClass, self).__init__()
- self.p2_dst_start_mac = '02:02:00:00:00:00'
- self.p2_dst_end_mac = '02:02:00:00:00:00'
+ self.p1_dst_start_mac = u"02:02:00:00:12:00"
+ self.p1_dst_end_mac = u"02:02:00:00:12:00"
+
+ self.p2_dst_start_mac = u"02:02:00:00:02:00"
+ self.p2_dst_end_mac = u"02:02:00:00:02:00"
# IPs used in packet headers.
- self.p1_src_start_ip = '10.0.0.1'
- self.p1_dst_start_ip = '20.0.0.0'
- self.p1_dst_end_ip = '20.0.156.63'
+ self.p1_src_start_ip = u"10.0.0.1"
+ self.p1_dst_start_ip = u"20.0.0.0"
+ self.p1_dst_end_ip = u"20.0.156.63"
- self.p2_src_start_ip = '20.0.0.1'
- self.p2_dst_start_ip = '10.0.0.0'
- self.p2_dst_end_ip = '10.0.156.63'
+ self.p2_src_start_ip = u"20.0.0.1"
+ self.p2_dst_start_ip = u"10.0.0.0"
+ self.p2_dst_end_ip = u"10.0.156.63"
def define_packets(self):
"""Defines the packets to be sent from the traffic generator.
@@ -58,7 +61,7 @@ class TrafficStreams(TrafficStreamsBaseClass):
"""
# Direction 0 --> 1
- base_pkt_a = (Ether() /
+ base_pkt_a = (Ether(dst=self.p1_dst_start_mac) /
IP(src=self.p1_src_start_ip,
dst=self.p1_dst_start_ip,
proto=61))
@@ -69,24 +72,29 @@ class TrafficStreams(TrafficStreamsBaseClass):
proto=61))
# Direction 0 --> 1
- vm1 = STLScVmRaw([STLVmFlowVar(name="dst",
+ vm1 = STLScVmRaw([STLVmFlowVar(name=u"mac_dst",
+ min_value=0,
+ max_value=0,
+ size=1, op=u"inc"),
+ STLVmWrFlowVar(fv_name=u"mac_dst", pkt_offset=5),
+ STLVmFlowVar(name=u"dst",
min_value=self.p1_dst_start_ip,
max_value=self.p1_dst_end_ip,
- size=4, op="inc"),
- STLVmWrFlowVar(fv_name="dst", pkt_offset="IP.dst"),
- STLVmFixIpv4(offset="IP")])
+ size=4, op=u"inc"),
+ STLVmWrFlowVar(fv_name=u"dst", pkt_offset=u"IP.dst"),
+ STLVmFixIpv4(offset=u"IP")])
# Direction 1 --> 0
- vm2 = STLScVmRaw([STLVmFlowVar(name="mac_dst",
+ vm2 = STLScVmRaw([STLVmFlowVar(name=u"mac_dst",
min_value=0,
max_value=0,
- size=1, op="inc"),
- STLVmWrFlowVar(fv_name="mac_dst", pkt_offset=5),
- STLVmFlowVar(name="dst",
+ size=1, op=u"inc"),
+ STLVmWrFlowVar(fv_name=u"mac_dst", pkt_offset=5),
+ STLVmFlowVar(name=u"dst",
min_value=self.p2_dst_start_ip,
max_value=self.p2_dst_end_ip,
- size=4, op="inc"),
- STLVmWrFlowVar(fv_name="dst", pkt_offset="IP.dst"),
- STLVmFixIpv4(offset="IP")])
+ size=4, op=u"inc"),
+ STLVmWrFlowVar(fv_name=u"dst", pkt_offset=u"IP.dst"),
+ STLVmFixIpv4(offset=u"IP")])
return base_pkt_a, base_pkt_b, vm1, vm2
diff --git a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst40000-2cnf.py b/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst40000-2cnf.py
index e85dbc90f7..e2f4063aba 100644
--- a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst40000-2cnf.py
+++ b/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst40000-2cnf.py
@@ -18,10 +18,10 @@ Stream profile:
- Packet: ETH / IP /
- Direction 0 --> 1:
- Source IP address range: 10.0.0.1
- - Destination IP address range: 20.0.0.0 - 20.0.156.63
+ - Destination IP address range: 20.0.0.0 - 20.0.1.143
- Direction 1 --> 0:
- Source IP address range: 20.0.0.1
- - Destination IP address range: 10.0.0.0 - 10.0.156.63
+ - Destination IP address range: 10.0.0.0 - 10.0.1.143
"""
from trex.stl.api import *
@@ -36,17 +36,20 @@ class TrafficStreams(TrafficStreamsBaseClass):
super(TrafficStreamsBaseClass, self).__init__()
- self.p2_dst_start_mac = '02:02:00:00:00:00'
- self.p2_dst_end_mac = '02:02:00:00:00:01'
+ self.p1_dst_start_mac = u"02:02:00:00:12:00"
+ self.p1_dst_end_mac = u"02:02:00:00:12:01"
+
+ self.p2_dst_start_mac = u"02:02:00:00:02:00"
+ self.p2_dst_end_mac = u"02:02:00:00:02:01"
# IPs used in packet headers.
- self.p1_src_start_ip = '10.0.0.1'
- self.p1_dst_start_ip = '20.0.0.0'
- self.p1_dst_end_ip = '20.0.156.63'
+ self.p1_src_start_ip = u"10.0.0.1"
+ self.p1_dst_start_ip = u"20.0.0.0"
+ self.p1_dst_end_ip = u"20.0.156.63"
- self.p2_src_start_ip = '20.0.0.1'
- self.p2_dst_start_ip = '10.0.0.0'
- self.p2_dst_end_ip = '10.0.156.63'
+ self.p2_src_start_ip = u"20.0.0.1"
+ self.p2_dst_start_ip = u"10.0.0.0"
+ self.p2_dst_end_ip = u"10.0.156.63"
def define_packets(self):
"""Defines the packets to be sent from the traffic generator.
@@ -58,7 +61,7 @@ class TrafficStreams(TrafficStreamsBaseClass):
"""
# Direction 0 --> 1
- base_pkt_a = (Ether() /
+ base_pkt_a = (Ether(dst=self.p1_dst_start_mac) /
IP(src=self.p1_src_start_ip,
dst=self.p1_dst_start_ip,
proto=61))
@@ -69,24 +72,29 @@ class TrafficStreams(TrafficStreamsBaseClass):
proto=61))
# Direction 0 --> 1
- vm1 = STLScVmRaw([STLVmFlowVar(name="dst",
+ vm1 = STLScVmRaw([STLVmFlowVar(name=u"mac_dst",
+ min_value=0,
+ max_value=1,
+ size=1, op=u"inc"),
+ STLVmWrFlowVar(fv_name=u"mac_dst", pkt_offset=5),
+ STLVmFlowVar(name=u"dst",
min_value=self.p1_dst_start_ip,
max_value=self.p1_dst_end_ip,
- size=4, op="inc"),
- STLVmWrFlowVar(fv_name="dst", pkt_offset="IP.dst"),
- STLVmFixIpv4(offset="IP")])
+ size=4, op=u"inc"),
+ STLVmWrFlowVar(fv_name=u"dst", pkt_offset=u"IP.dst"),
+ STLVmFixIpv4(offset=u"IP")])
# Direction 1 --> 0
- vm2 = STLScVmRaw([STLVmFlowVar(name="mac_dst",
+ vm2 = STLScVmRaw([STLVmFlowVar(name=u"mac_dst",
min_value=0,
max_value=1,
- size=1, op="inc"),
- STLVmWrFlowVar(fv_name="mac_dst", pkt_offset=5),
- STLVmFlowVar(name="dst",
+ size=1, op=u"inc"),
+ STLVmWrFlowVar(fv_name=u"mac_dst", pkt_offset=5),
+ STLVmFlowVar(name=u"dst",
min_value=self.p2_dst_start_ip,
max_value=self.p2_dst_end_ip,
- size=4, op="inc"),
- STLVmWrFlowVar(fv_name="dst", pkt_offset="IP.dst"),
- STLVmFixIpv4(offset="IP")])
+ size=4, op=u"inc"),
+ STLVmWrFlowVar(fv_name=u"dst", pkt_offset=u"IP.dst"),
+ STLVmFixIpv4(offset=u"IP")])
return base_pkt_a, base_pkt_b, vm1, vm2
diff --git a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst40000-4cnf.py b/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst40000-4cnf.py
index ddc0a11f34..ced1c06623 100644
--- a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst40000-4cnf.py
+++ b/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst40000-4cnf.py
@@ -18,10 +18,10 @@ Stream profile:
- Packet: ETH / IP /
- Direction 0 --> 1:
- Source IP address range: 10.0.0.1
- - Destination IP address range: 20.0.0.0 - 20.0.156.63
+ - Destination IP address range: 20.0.0.0 - 20.0.1.143
- Direction 1 --> 0:
- Source IP address range: 20.0.0.1
- - Destination IP address range: 10.0.0.0 - 10.0.156.63
+ - Destination IP address range: 10.0.0.0 - 10.0.1.143
"""
from trex.stl.api import *
@@ -36,17 +36,20 @@ class TrafficStreams(TrafficStreamsBaseClass):
super(TrafficStreamsBaseClass, self).__init__()
- self.p2_dst_start_mac = '02:02:00:00:00:00'
- self.p2_dst_end_mac = '02:02:00:00:00:03'
+ self.p1_dst_start_mac = u"02:02:00:00:12:00"
+ self.p1_dst_end_mac = u"02:02:00:00:12:03"
+
+ self.p2_dst_start_mac = u"02:02:00:00:02:00"
+ self.p2_dst_end_mac = u"02:02:00:00:02:03"
# IPs used in packet headers.
- self.p1_src_start_ip = '10.0.0.1'
- self.p1_dst_start_ip = '20.0.0.0'
- self.p1_dst_end_ip = '20.0.156.63'
+ self.p1_src_start_ip = u"10.0.0.1"
+ self.p1_dst_start_ip = u"20.0.0.0"
+ self.p1_dst_end_ip = u"20.0.156.63"
- self.p2_src_start_ip = '20.0.0.1'
- self.p2_dst_start_ip = '10.0.0.0'
- self.p2_dst_end_ip = '10.0.156.63'
+ self.p2_src_start_ip = u"20.0.0.1"
+ self.p2_dst_start_ip = u"10.0.0.0"
+ self.p2_dst_end_ip = u"10.0.156.63"
def define_packets(self):
"""Defines the packets to be sent from the traffic generator.
@@ -58,7 +61,7 @@ class TrafficStreams(TrafficStreamsBaseClass):
"""
# Direction 0 --> 1
- base_pkt_a = (Ether() /
+ base_pkt_a = (Ether(dst=self.p1_dst_start_mac) /
IP(src=self.p1_src_start_ip,
dst=self.p1_dst_start_ip,
proto=61))
@@ -69,24 +72,29 @@ class TrafficStreams(TrafficStreamsBaseClass):
proto=61))
# Direction 0 --> 1
- vm1 = STLScVmRaw([STLVmFlowVar(name="dst",
+ vm1 = STLScVmRaw([STLVmFlowVar(name=u"mac_dst",
+ min_value=0,
+ max_value=3,
+ size=1, op=u"inc"),
+ STLVmWrFlowVar(fv_name=u"mac_dst", pkt_offset=5),
+ STLVmFlowVar(name=u"dst",
min_value=self.p1_dst_start_ip,
max_value=self.p1_dst_end_ip,
- size=4, op="inc"),
- STLVmWrFlowVar(fv_name="dst", pkt_offset="IP.dst"),
- STLVmFixIpv4(offset="IP")])
+ size=4, op=u"inc"),
+ STLVmWrFlowVar(fv_name=u"dst", pkt_offset=u"IP.dst"),
+ STLVmFixIpv4(offset=u"IP")])
# Direction 1 --> 0
- vm2 = STLScVmRaw([STLVmFlowVar(name="mac_dst",
+ vm2 = STLScVmRaw([STLVmFlowVar(name=u"mac_dst",
min_value=0,
max_value=3,
- size=1, op="inc"),
- STLVmWrFlowVar(fv_name="mac_dst", pkt_offset=5),
- STLVmFlowVar(name="dst",
+ size=1, op=u"inc"),
+ STLVmWrFlowVar(fv_name=u"mac_dst", pkt_offset=5),
+ STLVmFlowVar(name=u"dst",
min_value=self.p2_dst_start_ip,
max_value=self.p2_dst_end_ip,
- size=4, op="inc"),
- STLVmWrFlowVar(fv_name="dst", pkt_offset="IP.dst"),
- STLVmFixIpv4(offset="IP")])
+ size=4, op=u"inc"),
+ STLVmWrFlowVar(fv_name=u"dst", pkt_offset=u"IP.dst"),
+ STLVmFixIpv4(offset=u"IP")])
return base_pkt_a, base_pkt_b, vm1, vm2
diff --git a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst40000-8cnf.py b/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst40000-8cnf.py
index 0962181525..cc989ef24d 100644
--- a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst40000-8cnf.py
+++ b/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst40000-8cnf.py
@@ -18,10 +18,10 @@ Stream profile:
- Packet: ETH / IP /
- Direction 0 --> 1:
- Source IP address range: 10.0.0.1
- - Destination IP address range: 20.0.0.0 - 20.0.156.63
+ - Destination IP address range: 20.0.0.0 - 20.0.1.143
- Direction 1 --> 0:
- Source IP address range: 20.0.0.1
- - Destination IP address range: 10.0.0.0 - 10.0.156.63
+ - Destination IP address range: 10.0.0.0 - 10.0.1.143
"""
from trex.stl.api import *
@@ -36,17 +36,20 @@ class TrafficStreams(TrafficStreamsBaseClass):
super(TrafficStreamsBaseClass, self).__init__()
- self.p2_dst_start_mac = '02:02:00:00:00:00'
- self.p2_dst_end_mac = '02:02:00:00:00:07'
+ self.p1_dst_start_mac = u"02:02:00:00:12:00"
+ self.p1_dst_end_mac = u"02:02:00:00:12:07"
+
+ self.p2_dst_start_mac = u"02:02:00:00:02:00"
+ self.p2_dst_end_mac = u"02:02:00:00:02:07"
# IPs used in packet headers.
- self.p1_src_start_ip = '10.0.0.1'
- self.p1_dst_start_ip = '20.0.0.0'
- self.p1_dst_end_ip = '20.0.156.63'
+ self.p1_src_start_ip = u"10.0.0.1"
+ self.p1_dst_start_ip = u"20.0.0.0"
+ self.p1_dst_end_ip = u"20.0.156.63"
- self.p2_src_start_ip = '20.0.0.1'
- self.p2_dst_start_ip = '10.0.0.0'
- self.p2_dst_end_ip = '10.0.156.63'
+ self.p2_src_start_ip = u"20.0.0.1"
+ self.p2_dst_start_ip = u"10.0.0.0"
+ self.p2_dst_end_ip = u"10.0.156.63"
def define_packets(self):
"""Defines the packets to be sent from the traffic generator.
@@ -58,7 +61,7 @@ class TrafficStreams(TrafficStreamsBaseClass):
"""
# Direction 0 --> 1
- base_pkt_a = (Ether() /
+ base_pkt_a = (Ether(dst=self.p1_dst_start_mac) /
IP(src=self.p1_src_start_ip,
dst=self.p1_dst_start_ip,
proto=61))
@@ -69,24 +72,29 @@ class TrafficStreams(TrafficStreamsBaseClass):
proto=61))
# Direction 0 --> 1
- vm1 = STLScVmRaw([STLVmFlowVar(name="dst",
+ vm1 = STLScVmRaw([STLVmFlowVar(name=u"mac_dst",
+ min_value=0,
+ max_value=7,
+ size=1, op=u"inc"),
+ STLVmWrFlowVar(fv_name=u"mac_dst", pkt_offset=5),
+ STLVmFlowVar(name=u"dst",
min_value=self.p1_dst_start_ip,
max_value=self.p1_dst_end_ip,
- size=4, op="inc"),
- STLVmWrFlowVar(fv_name="dst", pkt_offset="IP.dst"),
- STLVmFixIpv4(offset="IP")])
+ size=4, op=u"inc"),
+ STLVmWrFlowVar(fv_name=u"dst", pkt_offset=u"IP.dst"),
+ STLVmFixIpv4(offset=u"IP")])
# Direction 1 --> 0
- vm2 = STLScVmRaw([STLVmFlowVar(name="mac_dst",
+ vm2 = STLScVmRaw([STLVmFlowVar(name=u"mac_dst",
min_value=0,
max_value=7,
- size=1, op="inc"),
- STLVmWrFlowVar(fv_name="mac_dst", pkt_offset=5),
- STLVmFlowVar(name="dst",
+ size=1, op=u"inc"),
+ STLVmWrFlowVar(fv_name=u"mac_dst", pkt_offset=5),
+ STLVmFlowVar(name=u"dst",
min_value=self.p2_dst_start_ip,
max_value=self.p2_dst_end_ip,
- size=4, op="inc"),
- STLVmWrFlowVar(fv_name="dst", pkt_offset="IP.dst"),
- STLVmFixIpv4(offset="IP")])
+ size=4, op=u"inc"),
+ STLVmWrFlowVar(fv_name=u"dst", pkt_offset=u"IP.dst"),
+ STLVmFixIpv4(offset=u"IP")])
return base_pkt_a, base_pkt_b, vm1, vm2
diff --git a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst5000-1cnf.py b/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst5000-1cnf.py
index 4a50beb830..0be9c649bd 100644
--- a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst5000-1cnf.py
+++ b/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst5000-1cnf.py
@@ -18,10 +18,10 @@ Stream profile:
- Packet: ETH / IP /
- Direction 0 --> 1:
- Source IP address range: 10.0.0.1
- - Destination IP address range: 20.0.0.0 - 20.0.19.135
+ - Destination IP address range: 20.0.0.0 - 20.0.1.143
- Direction 1 --> 0:
- Source IP address range: 20.0.0.1
- - Destination IP address range: 10.0.0.0 - 10.0.19.135
+ - Destination IP address range: 10.0.0.0 - 10.0.1.143
"""
from trex.stl.api import *
@@ -36,17 +36,20 @@ class TrafficStreams(TrafficStreamsBaseClass):
super(TrafficStreamsBaseClass, self).__init__()
- self.p2_dst_start_mac = '02:02:00:00:00:00'
- self.p2_dst_end_mac = '02:02:00:00:00:00'
+ self.p1_dst_start_mac = u"02:02:00:00:12:00"
+ self.p1_dst_end_mac = u"02:02:00:00:12:00"
+
+ self.p2_dst_start_mac = u"02:02:00:00:02:00"
+ self.p2_dst_end_mac = u"02:02:00:00:02:00"
# IPs used in packet headers.
- self.p1_src_start_ip = '10.0.0.1'
- self.p1_dst_start_ip = '20.0.0.0'
- self.p1_dst_end_ip = '20.0.19.135'
+ self.p1_src_start_ip = u"10.0.0.1"
+ self.p1_dst_start_ip = u"20.0.0.0"
+ self.p1_dst_end_ip = u"20.0.19.135"
- self.p2_src_start_ip = '20.0.0.1'
- self.p2_dst_start_ip = '10.0.0.0'
- self.p2_dst_end_ip = '10.0.19.135'
+ self.p2_src_start_ip = u"20.0.0.1"
+ self.p2_dst_start_ip = u"10.0.0.0"
+ self.p2_dst_end_ip = u"10.0.19.135"
def define_packets(self):
"""Defines the packets to be sent from the traffic generator.
@@ -58,7 +61,7 @@ class TrafficStreams(TrafficStreamsBaseClass):
"""
# Direction 0 --> 1
- base_pkt_a = (Ether() /
+ base_pkt_a = (Ether(dst=self.p1_dst_start_mac) /
IP(src=self.p1_src_start_ip,
dst=self.p1_dst_start_ip,
proto=61))
@@ -69,24 +72,29 @@ class TrafficStreams(TrafficStreamsBaseClass):
proto=61))
# Direction 0 --> 1
- vm1 = STLScVmRaw([STLVmFlowVar(name="dst",
+ vm1 = STLScVmRaw([STLVmFlowVar(name=u"mac_dst",
+ min_value=0,
+ max_value=0,
+ size=1, op=u"inc"),
+ STLVmWrFlowVar(fv_name=u"mac_dst", pkt_offset=5),
+ STLVmFlowVar(name=u"dst",
min_value=self.p1_dst_start_ip,
max_value=self.p1_dst_end_ip,
- size=4, op="inc"),
- STLVmWrFlowVar(fv_name="dst", pkt_offset="IP.dst"),
- STLVmFixIpv4(offset="IP")])
+ size=4, op=u"inc"),
+ STLVmWrFlowVar(fv_name=u"dst", pkt_offset=u"IP.dst"),
+ STLVmFixIpv4(offset=u"IP")])
# Direction 1 --> 0
- vm2 = STLScVmRaw([STLVmFlowVar(name="mac_dst",
+ vm2 = STLScVmRaw([STLVmFlowVar(name=u"mac_dst",
min_value=0,
max_value=0,
- size=1, op="inc"),
- STLVmWrFlowVar(fv_name="mac_dst", pkt_offset=5),
- STLVmFlowVar(name="dst",
+ size=1, op=u"inc"),
+ STLVmWrFlowVar(fv_name=u"mac_dst", pkt_offset=5),
+ STLVmFlowVar(name=u"dst",
min_value=self.p2_dst_start_ip,
max_value=self.p2_dst_end_ip,
- size=4, op="inc"),
- STLVmWrFlowVar(fv_name="dst", pkt_offset="IP.dst"),
- STLVmFixIpv4(offset="IP")])
+ size=4, op=u"inc"),
+ STLVmWrFlowVar(fv_name=u"dst", pkt_offset=u"IP.dst"),
+ STLVmFixIpv4(offset=u"IP")])
return base_pkt_a, base_pkt_b, vm1, vm2
diff --git a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst5000-2cnf.py b/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst5000-2cnf.py
index b04f5f13aa..991c4049b2 100644
--- a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst5000-2cnf.py
+++ b/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst5000-2cnf.py
@@ -18,10 +18,10 @@ Stream profile:
- Packet: ETH / IP /
- Direction 0 --> 1:
- Source IP address range: 10.0.0.1
- - Destination IP address range: 20.0.0.0 - 20.0.19.135
+ - Destination IP address range: 20.0.0.0 - 20.0.1.143
- Direction 1 --> 0:
- Source IP address range: 20.0.0.1
- - Destination IP address range: 10.0.0.0 - 10.0.19.135
+ - Destination IP address range: 10.0.0.0 - 10.0.1.143
"""
from trex.stl.api import *
@@ -36,17 +36,20 @@ class TrafficStreams(TrafficStreamsBaseClass):
super(TrafficStreamsBaseClass, self).__init__()
- self.p2_dst_start_mac = '02:02:00:00:00:00'
- self.p2_dst_end_mac = '02:02:00:00:00:01'
+ self.p1_dst_start_mac = u"02:02:00:00:12:00"
+ self.p1_dst_end_mac = u"02:02:00:00:12:01"
+
+ self.p2_dst_start_mac = u"02:02:00:00:02:00"
+ self.p2_dst_end_mac = u"02:02:00:00:02:01"
# IPs used in packet headers.
- self.p1_src_start_ip = '10.0.0.1'
- self.p1_dst_start_ip = '20.0.0.0'
- self.p1_dst_end_ip = '20.0.19.135'
+ self.p1_src_start_ip = u"10.0.0.1"
+ self.p1_dst_start_ip = u"20.0.0.0"
+ self.p1_dst_end_ip = u"20.0.19.135"
- self.p2_src_start_ip = '20.0.0.1'
- self.p2_dst_start_ip = '10.0.0.0'
- self.p2_dst_end_ip = '10.0.19.135'
+ self.p2_src_start_ip = u"20.0.0.1"
+ self.p2_dst_start_ip = u"10.0.0.0"
+ self.p2_dst_end_ip = u"10.0.19.135"
def define_packets(self):
"""Defines the packets to be sent from the traffic generator.
@@ -58,7 +61,7 @@ class TrafficStreams(TrafficStreamsBaseClass):
"""
# Direction 0 --> 1
- base_pkt_a = (Ether() /
+ base_pkt_a = (Ether(dst=self.p1_dst_start_mac) /
IP(src=self.p1_src_start_ip,
dst=self.p1_dst_start_ip,
proto=61))
@@ -69,24 +72,29 @@ class TrafficStreams(TrafficStreamsBaseClass):
proto=61))
# Direction 0 --> 1
- vm1 = STLScVmRaw([STLVmFlowVar(name="dst",
+ vm1 = STLScVmRaw([STLVmFlowVar(name=u"mac_dst",
+ min_value=0,
+ max_value=1,
+ size=1, op=u"inc"),
+ STLVmWrFlowVar(fv_name=u"mac_dst", pkt_offset=5),
+ STLVmFlowVar(name=u"dst",
min_value=self.p1_dst_start_ip,
max_value=self.p1_dst_end_ip,
- size=4, op="inc"),
- STLVmWrFlowVar(fv_name="dst", pkt_offset="IP.dst"),
- STLVmFixIpv4(offset="IP")])
+ size=4, op=u"inc"),
+ STLVmWrFlowVar(fv_name=u"dst", pkt_offset=u"IP.dst"),
+ STLVmFixIpv4(offset=u"IP")])
# Direction 1 --> 0
- vm2 = STLScVmRaw([STLVmFlowVar(name="mac_dst",
+ vm2 = STLScVmRaw([STLVmFlowVar(name=u"mac_dst",
min_value=0,
max_value=1,
- size=1, op="inc"),
- STLVmWrFlowVar(fv_name="mac_dst", pkt_offset=5),
- STLVmFlowVar(name="dst",
+ size=1, op=u"inc"),
+ STLVmWrFlowVar(fv_name=u"mac_dst", pkt_offset=5),
+ STLVmFlowVar(name=u"dst",
min_value=self.p2_dst_start_ip,
max_value=self.p2_dst_end_ip,
- size=4, op="inc"),
- STLVmWrFlowVar(fv_name="dst", pkt_offset="IP.dst"),
- STLVmFixIpv4(offset="IP")])
+ size=4, op=u"inc"),
+ STLVmWrFlowVar(fv_name=u"dst", pkt_offset=u"IP.dst"),
+ STLVmFixIpv4(offset=u"IP")])
return base_pkt_a, base_pkt_b, vm1, vm2
diff --git a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst5000-4cnf.py b/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst5000-4cnf.py
index d02da82dcd..c3f8fb8dd0 100644
--- a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst5000-4cnf.py
+++ b/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst5000-4cnf.py
@@ -18,10 +18,10 @@ Stream profile:
- Packet: ETH / IP /
- Direction 0 --> 1:
- Source IP address range: 10.0.0.1
- - Destination IP address range: 20.0.0.0 - 20.0.19.135
+ - Destination IP address range: 20.0.0.0 - 20.0.1.143
- Direction 1 --> 0:
- Source IP address range: 20.0.0.1
- - Destination IP address range: 10.0.0.0 - 10.0.19.135
+ - Destination IP address range: 10.0.0.0 - 10.0.1.143
"""
from trex.stl.api import *
@@ -36,17 +36,20 @@ class TrafficStreams(TrafficStreamsBaseClass):
super(TrafficStreamsBaseClass, self).__init__()
- self.p2_dst_start_mac = '02:02:00:00:00:00'
- self.p2_dst_end_mac = '02:02:00:00:00:03'
+ self.p1_dst_start_mac = u"02:02:00:00:12:00"
+ self.p1_dst_end_mac = u"02:02:00:00:12:03"
+
+ self.p2_dst_start_mac = u"02:02:00:00:02:00"
+ self.p2_dst_end_mac = u"02:02:00:00:02:03"
# IPs used in packet headers.
- self.p1_src_start_ip = '10.0.0.1'
- self.p1_dst_start_ip = '20.0.0.0'
- self.p1_dst_end_ip = '20.0.19.135'
+ self.p1_src_start_ip = u"10.0.0.1"
+ self.p1_dst_start_ip = u"20.0.0.0"
+ self.p1_dst_end_ip = u"20.0.19.135"
- self.p2_src_start_ip = '20.0.0.1'
- self.p2_dst_start_ip = '10.0.0.0'
- self.p2_dst_end_ip = '10.0.19.135'
+ self.p2_src_start_ip = u"20.0.0.1"
+ self.p2_dst_start_ip = u"10.0.0.0"
+ self.p2_dst_end_ip = u"10.0.19.135"
def define_packets(self):
"""Defines the packets to be sent from the traffic generator.
@@ -58,7 +61,7 @@ class TrafficStreams(TrafficStreamsBaseClass):
"""
# Direction 0 --> 1
- base_pkt_a = (Ether() /
+ base_pkt_a = (Ether(dst=self.p1_dst_start_mac) /
IP(src=self.p1_src_start_ip,
dst=self.p1_dst_start_ip,
proto=61))
@@ -69,24 +72,29 @@ class TrafficStreams(TrafficStreamsBaseClass):
proto=61))
# Direction 0 --> 1
- vm1 = STLScVmRaw([STLVmFlowVar(name="dst",
+ vm1 = STLScVmRaw([STLVmFlowVar(name=u"mac_dst",
+ min_value=0,
+ max_value=3,
+ size=1, op=u"inc"),
+ STLVmWrFlowVar(fv_name=u"mac_dst", pkt_offset=5),
+ STLVmFlowVar(name=u"dst",
min_value=self.p1_dst_start_ip,
max_value=self.p1_dst_end_ip,
- size=4, op="inc"),
- STLVmWrFlowVar(fv_name="dst", pkt_offset="IP.dst"),
- STLVmFixIpv4(offset="IP")])
+ size=4, op=u"inc"),
+ STLVmWrFlowVar(fv_name=u"dst", pkt_offset=u"IP.dst"),
+ STLVmFixIpv4(offset=u"IP")])
# Direction 1 --> 0
- vm2 = STLScVmRaw([STLVmFlowVar(name="mac_dst",
+ vm2 = STLScVmRaw([STLVmFlowVar(name=u"mac_dst",
min_value=0,
max_value=3,
- size=1, op="inc"),
- STLVmWrFlowVar(fv_name="mac_dst", pkt_offset=5),
- STLVmFlowVar(name="dst",
+ size=1, op=u"inc"),
+ STLVmWrFlowVar(fv_name=u"mac_dst", pkt_offset=5),
+ STLVmFlowVar(name=u"dst",
min_value=self.p2_dst_start_ip,
max_value=self.p2_dst_end_ip,
- size=4, op="inc"),
- STLVmWrFlowVar(fv_name="dst", pkt_offset="IP.dst"),
- STLVmFixIpv4(offset="IP")])
+ size=4, op=u"inc"),
+ STLVmWrFlowVar(fv_name=u"dst", pkt_offset=u"IP.dst"),
+ STLVmFixIpv4(offset=u"IP")])
return base_pkt_a, base_pkt_b, vm1, vm2
diff --git a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst5000-8cnf.py b/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst5000-8cnf.py
index 3981741ff4..9cf779c8db 100644
--- a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst5000-8cnf.py
+++ b/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst5000-8cnf.py
@@ -18,10 +18,10 @@ Stream profile:
- Packet: ETH / IP /
- Direction 0 --> 1:
- Source IP address range: 10.0.0.1
- - Destination IP address range: 20.0.0.0 - 20.0.19.135
+ - Destination IP address range: 20.0.0.0 - 20.0.1.143
- Direction 1 --> 0:
- Source IP address range: 20.0.0.1
- - Destination IP address range: 10.0.0.0 - 10.0.19.135
+ - Destination IP address range: 10.0.0.0 - 10.0.1.143
"""
from trex.stl.api import *
@@ -36,17 +36,20 @@ class TrafficStreams(TrafficStreamsBaseClass):
super(TrafficStreamsBaseClass, self).__init__()
- self.p2_dst_start_mac = '02:02:00:00:00:00'
- self.p2_dst_end_mac = '02:02:00:00:00:07'
+ self.p1_dst_start_mac = u"02:02:00:00:12:00"
+ self.p1_dst_end_mac = u"02:02:00:00:12:07"
+
+ self.p2_dst_start_mac = u"02:02:00:00:02:00"
+ self.p2_dst_end_mac = u"02:02:00:00:02:07"
# IPs used in packet headers.
- self.p1_src_start_ip = '10.0.0.1'
- self.p1_dst_start_ip = '20.0.0.0'
- self.p1_dst_end_ip = '20.0.19.135'
+ self.p1_src_start_ip = u"10.0.0.1"
+ self.p1_dst_start_ip = u"20.0.0.0"
+ self.p1_dst_end_ip = u"20.0.19.135"
- self.p2_src_start_ip = '20.0.0.1'
- self.p2_dst_start_ip = '10.0.0.0'
- self.p2_dst_end_ip = '10.0.19.135'
+ self.p2_src_start_ip = u"20.0.0.1"
+ self.p2_dst_start_ip = u"10.0.0.0"
+ self.p2_dst_end_ip = u"10.0.19.135"
def define_packets(self):
"""Defines the packets to be sent from the traffic generator.
@@ -58,7 +61,7 @@ class TrafficStreams(TrafficStreamsBaseClass):
"""
# Direction 0 --> 1
- base_pkt_a = (Ether() /
+ base_pkt_a = (Ether(dst=self.p1_dst_start_mac) /
IP(src=self.p1_src_start_ip,
dst=self.p1_dst_start_ip,
proto=61))
@@ -69,24 +72,29 @@ class TrafficStreams(TrafficStreamsBaseClass):
proto=61))
# Direction 0 --> 1
- vm1 = STLScVmRaw([STLVmFlowVar(name="dst",
+ vm1 = STLScVmRaw([STLVmFlowVar(name=u"mac_dst",
+ min_value=0,
+ max_value=7,
+ size=1, op=u"inc"),
+ STLVmWrFlowVar(fv_name=u"mac_dst", pkt_offset=5),
+ STLVmFlowVar(name=u"dst",
min_value=self.p1_dst_start_ip,
max_value=self.p1_dst_end_ip,
- size=4, op="inc"),
- STLVmWrFlowVar(fv_name="dst", pkt_offset="IP.dst"),
- STLVmFixIpv4(offset="IP")])
+ size=4, op=u"inc"),
+ STLVmWrFlowVar(fv_name=u"dst", pkt_offset=u"IP.dst"),
+ STLVmFixIpv4(offset=u"IP")])
# Direction 1 --> 0
- vm2 = STLScVmRaw([STLVmFlowVar(name="mac_dst",
+ vm2 = STLScVmRaw([STLVmFlowVar(name=u"mac_dst",
min_value=0,
max_value=7,
- size=1, op="inc"),
- STLVmWrFlowVar(fv_name="mac_dst", pkt_offset=5),
- STLVmFlowVar(name="dst",
+ size=1, op=u"inc"),
+ STLVmWrFlowVar(fv_name=u"mac_dst", pkt_offset=5),
+ STLVmFlowVar(name=u"dst",
min_value=self.p2_dst_start_ip,
max_value=self.p2_dst_end_ip,
- size=4, op="inc"),
- STLVmWrFlowVar(fv_name="dst", pkt_offset="IP.dst"),
- STLVmFixIpv4(offset="IP")])
+ size=4, op=u"inc"),
+ STLVmWrFlowVar(fv_name=u"dst", pkt_offset=u"IP.dst"),
+ STLVmFixIpv4(offset=u"IP")])
return base_pkt_a, base_pkt_b, vm1, vm2
diff --git a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst60000-1cnf.py b/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst60000-1cnf.py
index c3b4c9c7ad..a84c302205 100644
--- a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst60000-1cnf.py
+++ b/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst60000-1cnf.py
@@ -18,10 +18,10 @@ Stream profile:
- Packet: ETH / IP /
- Direction 0 --> 1:
- Source IP address range: 10.0.0.1
- - Destination IP address range: 20.0.0.0 - 20.0.234.95
+ - Destination IP address range: 20.0.0.0 - 20.0.1.143
- Direction 1 --> 0:
- Source IP address range: 20.0.0.1
- - Destination IP address range: 10.0.0.0 - 10.0.234.95
+ - Destination IP address range: 10.0.0.0 - 10.0.1.143
"""
from trex.stl.api import *
@@ -36,17 +36,20 @@ class TrafficStreams(TrafficStreamsBaseClass):
super(TrafficStreamsBaseClass, self).__init__()
- self.p2_dst_start_mac = '02:02:00:00:00:00'
- self.p2_dst_end_mac = '02:02:00:00:00:00'
+ self.p1_dst_start_mac = u"02:02:00:00:12:00"
+ self.p1_dst_end_mac = u"02:02:00:00:12:00"
+
+ self.p2_dst_start_mac = u"02:02:00:00:02:00"
+ self.p2_dst_end_mac = u"02:02:00:00:02:00"
# IPs used in packet headers.
- self.p1_src_start_ip = '10.0.0.1'
- self.p1_dst_start_ip = '20.0.0.0'
- self.p1_dst_end_ip = '20.0.234.95'
+ self.p1_src_start_ip = u"10.0.0.1"
+ self.p1_dst_start_ip = u"20.0.0.0"
+ self.p1_dst_end_ip = u"20.0.234.95"
- self.p2_src_start_ip = '20.0.0.1'
- self.p2_dst_start_ip = '10.0.0.0'
- self.p2_dst_end_ip = '10.0.234.95'
+ self.p2_src_start_ip = u"20.0.0.1"
+ self.p2_dst_start_ip = u"10.0.0.0"
+ self.p2_dst_end_ip = u"10.0.234.95"
def define_packets(self):
"""Defines the packets to be sent from the traffic generator.
@@ -58,7 +61,7 @@ class TrafficStreams(TrafficStreamsBaseClass):
"""
# Direction 0 --> 1
- base_pkt_a = (Ether() /
+ base_pkt_a = (Ether(dst=self.p1_dst_start_mac) /
IP(src=self.p1_src_start_ip,
dst=self.p1_dst_start_ip,
proto=61))
@@ -69,24 +72,29 @@ class TrafficStreams(TrafficStreamsBaseClass):
proto=61))
# Direction 0 --> 1
- vm1 = STLScVmRaw([STLVmFlowVar(name="dst",
+ vm1 = STLScVmRaw([STLVmFlowVar(name=u"mac_dst",
+ min_value=0,
+ max_value=0,
+ size=1, op=u"inc"),
+ STLVmWrFlowVar(fv_name=u"mac_dst", pkt_offset=5),
+ STLVmFlowVar(name=u"dst",
min_value=self.p1_dst_start_ip,
max_value=self.p1_dst_end_ip,
- size=4, op="inc"),
- STLVmWrFlowVar(fv_name="dst", pkt_offset="IP.dst"),
- STLVmFixIpv4(offset="IP")])
+ size=4, op=u"inc"),
+ STLVmWrFlowVar(fv_name=u"dst", pkt_offset=u"IP.dst"),
+ STLVmFixIpv4(offset=u"IP")])
# Direction 1 --> 0
- vm2 = STLScVmRaw([STLVmFlowVar(name="mac_dst",
+ vm2 = STLScVmRaw([STLVmFlowVar(name=u"mac_dst",
min_value=0,
max_value=0,
- size=1, op="inc"),
- STLVmWrFlowVar(fv_name="mac_dst", pkt_offset=5),
- STLVmFlowVar(name="dst",
+ size=1, op=u"inc"),
+ STLVmWrFlowVar(fv_name=u"mac_dst", pkt_offset=5),
+ STLVmFlowVar(name=u"dst",
min_value=self.p2_dst_start_ip,
max_value=self.p2_dst_end_ip,
- size=4, op="inc"),
- STLVmWrFlowVar(fv_name="dst", pkt_offset="IP.dst"),
- STLVmFixIpv4(offset="IP")])
+ size=4, op=u"inc"),
+ STLVmWrFlowVar(fv_name=u"dst", pkt_offset=u"IP.dst"),
+ STLVmFixIpv4(offset=u"IP")])
return base_pkt_a, base_pkt_b, vm1, vm2
diff --git a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst60000-2cnf.py b/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst60000-2cnf.py
index d72a17d1e8..d3c720d1f9 100644
--- a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst60000-2cnf.py
+++ b/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst60000-2cnf.py
@@ -18,10 +18,10 @@ Stream profile:
- Packet: ETH / IP /
- Direction 0 --> 1:
- Source IP address range: 10.0.0.1
- - Destination IP address range: 20.0.0.0 - 20.0.234.95
+ - Destination IP address range: 20.0.0.0 - 20.0.1.143
- Direction 1 --> 0:
- Source IP address range: 20.0.0.1
- - Destination IP address range: 10.0.0.0 - 10.0.234.95
+ - Destination IP address range: 10.0.0.0 - 10.0.1.143
"""
from trex.stl.api import *
@@ -36,17 +36,20 @@ class TrafficStreams(TrafficStreamsBaseClass):
super(TrafficStreamsBaseClass, self).__init__()
- self.p2_dst_start_mac = '02:02:00:00:00:00'
- self.p2_dst_end_mac = '02:02:00:00:00:01'
+ self.p1_dst_start_mac = u"02:02:00:00:12:00"
+ self.p1_dst_end_mac = u"02:02:00:00:12:01"
+
+ self.p2_dst_start_mac = u"02:02:00:00:02:00"
+ self.p2_dst_end_mac = u"02:02:00:00:02:01"
# IPs used in packet headers.
- self.p1_src_start_ip = '10.0.0.1'
- self.p1_dst_start_ip = '20.0.0.0'
- self.p1_dst_end_ip = '20.0.234.95'
+ self.p1_src_start_ip = u"10.0.0.1"
+ self.p1_dst_start_ip = u"20.0.0.0"
+ self.p1_dst_end_ip = u"20.0.234.95"
- self.p2_src_start_ip = '20.0.0.1'
- self.p2_dst_start_ip = '10.0.0.0'
- self.p2_dst_end_ip = '10.0.234.95'
+ self.p2_src_start_ip = u"20.0.0.1"
+ self.p2_dst_start_ip = u"10.0.0.0"
+ self.p2_dst_end_ip = u"10.0.234.95"
def define_packets(self):
"""Defines the packets to be sent from the traffic generator.
@@ -58,7 +61,7 @@ class TrafficStreams(TrafficStreamsBaseClass):
"""
# Direction 0 --> 1
- base_pkt_a = (Ether() /
+ base_pkt_a = (Ether(dst=self.p1_dst_start_mac) /
IP(src=self.p1_src_start_ip,
dst=self.p1_dst_start_ip,
proto=61))
@@ -69,24 +72,29 @@ class TrafficStreams(TrafficStreamsBaseClass):
proto=61))
# Direction 0 --> 1
- vm1 = STLScVmRaw([STLVmFlowVar(name="dst",
+ vm1 = STLScVmRaw([STLVmFlowVar(name=u"mac_dst",
+ min_value=0,
+ max_value=1,
+ size=1, op=u"inc"),
+ STLVmWrFlowVar(fv_name=u"mac_dst", pkt_offset=5),
+ STLVmFlowVar(name=u"dst",
min_value=self.p1_dst_start_ip,
max_value=self.p1_dst_end_ip,
- size=4, op="inc"),
- STLVmWrFlowVar(fv_name="dst", pkt_offset="IP.dst"),
- STLVmFixIpv4(offset="IP")])
+ size=4, op=u"inc"),
+ STLVmWrFlowVar(fv_name=u"dst", pkt_offset=u"IP.dst"),
+ STLVmFixIpv4(offset=u"IP")])
# Direction 1 --> 0
- vm2 = STLScVmRaw([STLVmFlowVar(name="mac_dst",
+ vm2 = STLScVmRaw([STLVmFlowVar(name=u"mac_dst",
min_value=0,
max_value=1,
- size=1, op="inc"),
- STLVmWrFlowVar(fv_name="mac_dst", pkt_offset=5),
- STLVmFlowVar(name="dst",
+ size=1, op=u"inc"),
+ STLVmWrFlowVar(fv_name=u"mac_dst", pkt_offset=5),
+ STLVmFlowVar(name=u"dst",
min_value=self.p2_dst_start_ip,
max_value=self.p2_dst_end_ip,
- size=4, op="inc"),
- STLVmWrFlowVar(fv_name="dst", pkt_offset="IP.dst"),
- STLVmFixIpv4(offset="IP")])
+ size=4, op=u"inc"),
+ STLVmWrFlowVar(fv_name=u"dst", pkt_offset=u"IP.dst"),
+ STLVmFixIpv4(offset=u"IP")])
return base_pkt_a, base_pkt_b, vm1, vm2
diff --git a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst60000-4cnf.py b/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst60000-4cnf.py
index 7d5b92ce3f..034cd5738f 100644
--- a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst60000-4cnf.py
+++ b/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst60000-4cnf.py
@@ -18,10 +18,10 @@ Stream profile:
- Packet: ETH / IP /
- Direction 0 --> 1:
- Source IP address range: 10.0.0.1
- - Destination IP address range: 20.0.0.0 - 20.0.234.95
+ - Destination IP address range: 20.0.0.0 - 20.0.1.143
- Direction 1 --> 0:
- Source IP address range: 20.0.0.1
- - Destination IP address range: 10.0.0.0 - 10.0.234.95
+ - Destination IP address range: 10.0.0.0 - 10.0.1.143
"""
from trex.stl.api import *
@@ -36,17 +36,20 @@ class TrafficStreams(TrafficStreamsBaseClass):
super(TrafficStreamsBaseClass, self).__init__()
- self.p2_dst_start_mac = '02:02:00:00:00:00'
- self.p2_dst_end_mac = '02:02:00:00:00:03'
+ self.p1_dst_start_mac = u"02:02:00:00:12:00"
+ self.p1_dst_end_mac = u"02:02:00:00:12:03"
+
+ self.p2_dst_start_mac = u"02:02:00:00:02:00"
+ self.p2_dst_end_mac = u"02:02:00:00:02:03"
# IPs used in packet headers.
- self.p1_src_start_ip = '10.0.0.1'
- self.p1_dst_start_ip = '20.0.0.0'
- self.p1_dst_end_ip = '20.0.234.95'
+ self.p1_src_start_ip = u"10.0.0.1"
+ self.p1_dst_start_ip = u"20.0.0.0"
+ self.p1_dst_end_ip = u"20.0.234.95"
- self.p2_src_start_ip = '20.0.0.1'
- self.p2_dst_start_ip = '10.0.0.0'
- self.p2_dst_end_ip = '10.0.234.95'
+ self.p2_src_start_ip = u"20.0.0.1"
+ self.p2_dst_start_ip = u"10.0.0.0"
+ self.p2_dst_end_ip = u"10.0.234.95"
def define_packets(self):
"""Defines the packets to be sent from the traffic generator.
@@ -58,7 +61,7 @@ class TrafficStreams(TrafficStreamsBaseClass):
"""
# Direction 0 --> 1
- base_pkt_a = (Ether() /
+ base_pkt_a = (Ether(dst=self.p1_dst_start_mac) /
IP(src=self.p1_src_start_ip,
dst=self.p1_dst_start_ip,
proto=61))
@@ -69,24 +72,29 @@ class TrafficStreams(TrafficStreamsBaseClass):
proto=61))
# Direction 0 --> 1
- vm1 = STLScVmRaw([STLVmFlowVar(name="dst",
+ vm1 = STLScVmRaw([STLVmFlowVar(name=u"mac_dst",
+ min_value=0,
+ max_value=3,
+ size=1, op=u"inc"),
+ STLVmWrFlowVar(fv_name=u"mac_dst", pkt_offset=5),
+ STLVmFlowVar(name=u"dst",
min_value=self.p1_dst_start_ip,
max_value=self.p1_dst_end_ip,
- size=4, op="inc"),
- STLVmWrFlowVar(fv_name="dst", pkt_offset="IP.dst"),
- STLVmFixIpv4(offset="IP")])
+ size=4, op=u"inc"),
+ STLVmWrFlowVar(fv_name=u"dst", pkt_offset=u"IP.dst"),
+ STLVmFixIpv4(offset=u"IP")])
# Direction 1 --> 0
- vm2 = STLScVmRaw([STLVmFlowVar(name="mac_dst",
+ vm2 = STLScVmRaw([STLVmFlowVar(name=u"mac_dst",
min_value=0,
max_value=3,
- size=1, op="inc"),
- STLVmWrFlowVar(fv_name="mac_dst", pkt_offset=5),
- STLVmFlowVar(name="dst",
+ size=1, op=u"inc"),
+ STLVmWrFlowVar(fv_name=u"mac_dst", pkt_offset=5),
+ STLVmFlowVar(name=u"dst",
min_value=self.p2_dst_start_ip,
max_value=self.p2_dst_end_ip,
- size=4, op="inc"),
- STLVmWrFlowVar(fv_name="dst", pkt_offset="IP.dst"),
- STLVmFixIpv4(offset="IP")])
+ size=4, op=u"inc"),
+ STLVmWrFlowVar(fv_name=u"dst", pkt_offset=u"IP.dst"),
+ STLVmFixIpv4(offset=u"IP")])
return base_pkt_a, base_pkt_b, vm1, vm2
diff --git a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst60000-8cnf.py b/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst60000-8cnf.py
index 8f5739e587..b6fbf8c213 100644
--- a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst60000-8cnf.py
+++ b/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst60000-8cnf.py
@@ -18,10 +18,10 @@ Stream profile:
- Packet: ETH / IP /
- Direction 0 --> 1:
- Source IP address range: 10.0.0.1
- - Destination IP address range: 20.0.0.0 - 20.0.234.95
+ - Destination IP address range: 20.0.0.0 - 20.0.1.143
- Direction 1 --> 0:
- Source IP address range: 20.0.0.1
- - Destination IP address range: 10.0.0.0 - 10.0.234.95
+ - Destination IP address range: 10.0.0.0 - 10.0.1.143
"""
from trex.stl.api import *
@@ -36,17 +36,20 @@ class TrafficStreams(TrafficStreamsBaseClass):
super(TrafficStreamsBaseClass, self).__init__()
- self.p2_dst_start_mac = '02:02:00:00:00:00'
- self.p2_dst_end_mac = '02:02:00:00:00:07'
+ self.p1_dst_start_mac = u"02:02:00:00:12:00"
+ self.p1_dst_end_mac = u"02:02:00:00:12:07"
+
+ self.p2_dst_start_mac = u"02:02:00:00:02:00"
+ self.p2_dst_end_mac = u"02:02:00:00:02:07"
# IPs used in packet headers.
- self.p1_src_start_ip = '10.0.0.1'
- self.p1_dst_start_ip = '20.0.0.0'
- self.p1_dst_end_ip = '20.0.234.95'
+ self.p1_src_start_ip = u"10.0.0.1"
+ self.p1_dst_start_ip = u"20.0.0.0"
+ self.p1_dst_end_ip = u"20.0.234.95"
- self.p2_src_start_ip = '20.0.0.1'
- self.p2_dst_start_ip = '10.0.0.0'
- self.p2_dst_end_ip = '10.0.234.95'
+ self.p2_src_start_ip = u"20.0.0.1"
+ self.p2_dst_start_ip = u"10.0.0.0"
+ self.p2_dst_end_ip = u"10.0.234.95"
def define_packets(self):
"""Defines the packets to be sent from the traffic generator.
@@ -58,7 +61,7 @@ class TrafficStreams(TrafficStreamsBaseClass):
"""
# Direction 0 --> 1
- base_pkt_a = (Ether() /
+ base_pkt_a = (Ether(dst=self.p1_dst_start_mac) /
IP(src=self.p1_src_start_ip,
dst=self.p1_dst_start_ip,
proto=61))
@@ -69,24 +72,29 @@ class TrafficStreams(TrafficStreamsBaseClass):
proto=61))
# Direction 0 --> 1
- vm1 = STLScVmRaw([STLVmFlowVar(name="dst",
+ vm1 = STLScVmRaw([STLVmFlowVar(name=u"mac_dst",
+ min_value=0,
+ max_value=7,
+ size=1, op=u"inc"),
+ STLVmWrFlowVar(fv_name=u"mac_dst", pkt_offset=5),
+ STLVmFlowVar(name=u"dst",
min_value=self.p1_dst_start_ip,
max_value=self.p1_dst_end_ip,
- size=4, op="inc"),
- STLVmWrFlowVar(fv_name="dst", pkt_offset="IP.dst"),
- STLVmFixIpv4(offset="IP")])
+ size=4, op=u"inc"),
+ STLVmWrFlowVar(fv_name=u"dst", pkt_offset=u"IP.dst"),
+ STLVmFixIpv4(offset=u"IP")])
# Direction 1 --> 0
- vm2 = STLScVmRaw([STLVmFlowVar(name="mac_dst",
+ vm2 = STLScVmRaw([STLVmFlowVar(name=u"mac_dst",
min_value=0,
max_value=7,
- size=1, op="inc"),
- STLVmWrFlowVar(fv_name="mac_dst", pkt_offset=5),
- STLVmFlowVar(name="dst",
+ size=1, op=u"inc"),
+ STLVmWrFlowVar(fv_name=u"mac_dst", pkt_offset=5),
+ STLVmFlowVar(name=u"dst",
min_value=self.p2_dst_start_ip,
max_value=self.p2_dst_end_ip,
- size=4, op="inc"),
- STLVmWrFlowVar(fv_name="dst", pkt_offset="IP.dst"),
- STLVmFixIpv4(offset="IP")])
+ size=4, op=u"inc"),
+ STLVmWrFlowVar(fv_name=u"dst", pkt_offset=u"IP.dst"),
+ STLVmFixIpv4(offset=u"IP")])
return base_pkt_a, base_pkt_b, vm1, vm2