open-traffic-generator / ixia-c Goto Github PK
View Code? Open in Web Editor NEWIxia-c Traffic Generator
License: MIT License
Ixia-c Traffic Generator
License: MIT License
Currently IFC1 and IFC2 default to eth1 and eth2. Current documentation doesn't describe how to change these to veth1 and veth2
Hello community @
Thank you for providing details steps to try it out snappy with ixia-c.
This is regarding demo1-snappi-ixia-c as mentioned in https://github.com/chrispsommers/p4-guide/blob/snappi-tests2/demo1-snappi-ixia-c/README.md
I see below issue while executing the demo1 program.. Details mentioned below . Could some one suggust the right solution for this program.
p4@p4:~/p4-guide/demo1-snappi-ixia-c$ sudo ./runptf.sh demo1-snappi.SnappiFwdTestBidirLpmRange
P is: /home/p4/p4-guide/testlib
Starting IXia-c traffic engines and controller...
f1ffe962307bb7e1e750522cf9a7d60dccabcd2df27883422fb4ae2ebff71bd9
7e17f71d6fb6e2f5ea48dbb393951e2ff46eadda186c8927d94eef3479efa22c
bdb938552793c6fc6058cd5d9b8a8c3cc40a83c4b0c2fb08648c8a820b441db3
54bd59ada3bd82becb3c39b849c78fe7d8239091fa6695b1e85b903893e726a5
f3805b2d3456ef18c68ab23f2a7c5c22b7aef7288962cbb2e0295ff66c1713cb
/usr/local/lib/python3.8/dist-packages/ptf-0.9.3-py3.8.egg/EGG-INFO/scripts/ptf:19: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
import imp
Using packet manipulation module: ptf.packet_scapy
File=/home/p4/p4-guide/settings.json
2022-06-14 17:32:45,586 - root - INFO - Importing platform: eth
2022-06-14 17:32:45,587 - root - DEBUG - Configuration: {'list': False, 'list_test_names': False, 'allow_user': False, 'test_spec': '', 'test_file': None, 'test_dir': 'ptf', 'test_order': 'default', 'test_order_seed': 2746, 'num_shards': 1, 'shard_id': 0, 'platform': 'eth', 'platform_args': None, 'platform_dir': '/usr/local/lib/python3.8/dist-packages/ptf-0.9.3-py3.8.egg/ptf/platforms', 'interfaces': [(0, 0, 'veth1'), (0, 1, 'veth3'), (0, 2, 'veth5'), (0, 3, 'veth7'), (0, 4, 'veth9'), (0, 5, 'veth11'), (0, 6, 'veth13'), (0, 7, 'veth15')], 'port_info': {}, 'device_sockets': [], 'log_file': 'ptf.log', 'log_dir': None, 'debug': 'verbose', 'profile': False, 'profile_file': 'profile.out', 'xunit': False, 'xunit_dir': 'xunit', 'relax': False, 'test_params': "grpcaddr='localhost:9559';p4info='demo1.p4_16.p4rt.txt';config='demo1.p4_16.json'", 'failfast': False, 'fail_skipped': False, 'default_timeout': 2.0, 'default_negative_timeout': 0.1, 'minsize': 0, 'random_seed': None, 'disable_ipv6': False, 'disable_vxlan': False, 'disable_erspan': False, 'disable_geneve': False, 'disable_mpls': False, 'disable_nvgre': False, 'disable_igmp': False, 'disable_rocev2': False, 'qlen': 100, 'test_case_timeout': None, 'socket_recv_size': 4096, 'packet_manipulation_module': 'ptf.packet_scapy', 'port_map': {(0, 0): 'veth1', (0, 1): 'veth3', (0, 2): 'veth5', (0, 3): 'veth7', (0, 4): 'veth9', (0, 5): 'veth11', (0, 6): 'veth13', (0, 7): 'veth15'}}
2022-06-14 17:32:45,587 - root - INFO - port map: {(0, 0): 'veth1', (0, 1): 'veth3', (0, 2): 'veth5', (0, 3): 'veth7', (0, 4): 'veth9', (0, 5): 'veth11', (0, 6): 'veth13', (0, 7): 'veth15'}
2022-06-14 17:32:45,587 - root - INFO - Autogen random seed: 95877887
2022-06-14 17:32:45,588 - root - INFO - *** TEST RUN START: Tue Jun 14 17:32:45 2022
demo1-snappi.SnappiFwdTestBidirLpmRange ...
Loading P4 Program...
ERROR**
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 159, in _new_conn
conn = connection.create_connection(
File "/usr/lib/python3/dist-packages/urllib3/util/connection.py", line 84, in create_connection
raise err
File "/usr/lib/python3/dist-packages/urllib3/util/connection.py", line 74, in create_connection
sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 665, in urlopen
httplib_response = self._make_request(
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 376, in _make_request
self._validate_conn(conn)
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 996, in _validate_conn
conn.connect()
File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 314, in connect
conn = self._new_conn()
File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 171, in _new_conn
raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <urllib3.connection.VerifiedHTTPSConnection object at 0x7f8ed2ff7250>: Failed to establish a new connection: [Errno 111] Connection refused
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/requests/adapters.py", line 439, in send
resp = conn.urlopen(
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 719, in urlopen
retries = retries.increment(
File "/usr/lib/python3/dist-packages/urllib3/util/retry.py", line 436, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='localhost', port=8080): Max retries exceeded with url: /config (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f8ed2ff7250>: Failed to establish a new connection: [Errno 111] Connection refused'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/p4/p4-guide/testlib/base_test.py", line 1008, in handle
return f(*args, **kwargs)
File "ptf/demo1-snappi.py", line 837, in runTest
res = self.api.set_config(self.cfg)
File "/usr/local/lib/python3.8/dist-packages/snappi/snappi.py", line 40522, in set_config
return self._transport.send_recv(
File "/usr/local/lib/python3.8/dist-packages/snappi/snappicommon.py", line 28, in send_recv
response = self._session.request(
File "/usr/lib/python3/dist-packages/requests/sessions.py", line 533, in request
resp = self.send(prep, **send_kwargs)
File "/usr/lib/python3/dist-packages/requests/sessions.py", line 646, in send
r = adapter.send(request, **kwargs)
File "/usr/lib/python3/dist-packages/requests/adapters.py", line 516, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='localhost', port=8080): Max retries exceeded with url: /config (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f8ed2ff7250>: Failed to establish a new connection: [Errno 111] Connection refused'))
Ran 1 test in 0.030s
FAILED (errors=1)
ATTENTION: SOME TESTS DID NOT PASS!!!
The following tests errored:
SnappiFwdTestBidirLpmRange
Killing Ixia-C traffic engines and controller...
54bd59ada3bd
bdb938552793
7e17f71d6fb6
f1ffe962307b
The default instructions show generic pip install commands:
python -m pip install --upgrade "snappi"
When doing PTF tests the scripts must be called from root, and packages installed per the above are not found because they're installed under the user's HOME directory. Instead I used sudo
to install under /usr
.
I thought there was another pip
option to do this for global access but I can't find it. I'm not an expert in best practices here so if there's a better way to handle this, all the better.
In any case, I suggest a side-bar comment in the User Guide on this topic. virtualenv
might warrant another sidebar, another area where I'm inexperienced.
Reported by @chrispsommers
The Quickstart leaves much to the imagination concerning what should be connected to eth1 in order to get "good" test results. What kind of DUT setup make sense? Explain the test a little better (we send x frames of length Y...) and show representative output.
Use of eth1
should be stated as an assumption - many Linux PCs come up with different device names e.g. eno1
, enp0s3
, etc.). Inform the user to change as needed.
When calling api.GetMetrics(mr)
from multiple go routines (all running as part of waitGroup) the values returned for frames_rx_rate/frames_tx_rate
fluctuate between actual rates and 0. This doesn't happen when there is only main thread calling api.GetMetrics(mr)
.
See this branch to repeat: https://github.com/OpenIxia/otg-demo/tree/getMetricsMultithread/clab/rtbh
Example output is attached
multithread.txt
Reported by @chrispsommers
I have created veth1 and veth2 ports and assigned it to traffic engines.
udo ip link add veth1 type veth peer name veth2
sudo ip link set veth1 up
sudo ip link set veth2 up
docker run -d --network=host ixiacom/ixia-c-controller --accept-eula --http-port 80 --disable-app-usage-reporter
docker run --net=host -d ixiacom/ixia-c-app-usage-reporter
docker run --net=host --privileged -d
-e OPT_LISTEN_PORT="5555"
-e ARG_IFACE_LIST="virtual@af_packet,veth1"
-e OPT_NO_HUGEPAGES="Yes"
ixiacom/ixia-c-traffic-engine
docker run --net=host --privileged -d
-e OPT_LISTEN_PORT="5556"
-e ARG_IFACE_LIST="virtual@af_packet,veth2"
-e OPT_NO_HUGEPAGES="Yes"
ixiacom/ixia-c-traffic-engine
Now running running snappi-ixia-c.py (with http://localhost:80) throws following exception:
root@user1:/opt/ixia-c/snappi-tests/scripts# python snappi-ixia-c.py
2022-01-09 23:10:08 [snappi.snappi] [WARNING] Certificate verification is disabled
2022-01-09 18:10:08.092889 Starting connection to controller ...
2022-01-09 18:10:08.096778 Starting configuration apply ...
Traceback (most recent call last):
File "snappi-ixia-c.py", line 155, in
Traffic_Test()
File "snappi-ixia-c.py", line 86, in Traffic_Test
api.set_config(configuration)
File "/home/vadalia/.local/lib/python2.7/site-packages/snappi/snappi.py", line 58806, in set_config
return_object=self.response_warning(),
File "/home/vadalia/.local/lib/python2.7/site-packages/snappi/snappi.py", line 107, in send_recv
headers=headers,
File "/home/vadalia/.local/lib/python2.7/site-packages/requests/sessions.py", line 542, in request
resp = self.send(prep, **send_kwargs)
File "/home/vadalia/.local/lib/python2.7/site-packages/requests/sessions.py", line 697, in send
r.content
File "/home/vadalia/.local/lib/python2.7/site-packages/requests/models.py", line 836, in content
self._content = b''.join(self.iter_content(CONTENT_CHUNK_SIZE)) or b''
File "/home/vadalia/.local/lib/python2.7/site-packages/requests/models.py", line 761, in generate
raise ChunkedEncodingError(e)
requests.exceptions.ChunkedEncodingError: ("Connection broken: error(104, 'Connection reset by peer')", error(104, 'Connection reset by peer'))
I tried to send different Vlan priority using increment or values field but its giving not supported error. Open traffic generator Api shows these fields.
The ether_type value set by the user is 2048(0x0800)
, but the value is defaulting to 65535(0xFFFF)
on the wire
Test:
def test_plvision_issue(api):
api = snappi.api(location="https://127.0.0.1:443", ext="ixnetwork")
config = api.config()
tx, rx = config.ports.port(
name="tx", location="otg-novus100g.lbj.is.keysight.com;1;5"
).port(name="rx", location="otg-novus100g.lbj.is.keysight.com;1;6")
flow = config.flows.flow(name="f1")[-1]
flow.tx_rx.port.tx_name = tx.name
flow.tx_rx.port.rx_name = rx.name
f = config.flows[0]
f.packet.ethernet().custom()
eth, payload = f.packet[0], f.packet[1]
eth.src.value = "00:CD:DC:CD:DC:CD"
eth.dst.value = "00:AB:BC:AB:BC:AB"
eth.ether_type.value = 2048
payload.bytes = "45000056006600004006af92c0a800010a00000104d20050000000000000000050022000c3d50000000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d"
print(config)
api.set_config(config)```
If someone tries to run ixia-c on WSL (Windows Subsystem for Linux) it won't be successful, with symptoms like these on set_config
. Let's update our documentation with a statement about WSL support.
2022-08-01 19:54:36 [snappi.snappi] [WARNING] Certificate verification is disabled
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 159, in _new_conn
conn = connection.create_connection(
File "/usr/lib/python3/dist-packages/urllib3/util/connection.py", line 84, in create_connection
raise err
File "/usr/lib/python3/dist-packages/urllib3/util/connection.py", line 74, in create_connection
sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 665, in urlopen
httplib_response = self._make_request(
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 376, in _make_request
self._validate_conn(conn)
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 996, in _validate_conn
conn.connect()
File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 314, in connect
conn = self._new_conn()
File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 171, in _new_conn
raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <urllib3.connection.VerifiedHTTPSConnection object at 0x7feb4c1c5ee0>: Failed to establish a new connection: [Errno 111] Connection refused
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/requests/adapters.py", line 439, in send
resp = conn.urlopen(
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 719, in urlopen
retries = retries.increment(
File "/usr/lib/python3/dist-packages/urllib3/util/retry.py", line 436, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='localhost', port=443): Max retries exceeded with url: /config (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7feb4c1c5ee0>: Failed to establish a new connection: [Errno 111] Connection refused'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "ixia-c/snappi-tests/scripts/quickstart_snappi.py", line 22, in <module>
api.set_config(config)
File "/home/koehlerd/.local/lib/python3.8/site-packages/snappi/snappi.py", line 69263, in set_config
return self._transport.send_recv(
File "/home/koehlerd/.local/lib/python3.8/site-packages/snappi/snappi.py", line 151, in send_recv
response = self._session.request(
File "/usr/lib/python3/dist-packages/requests/sessions.py", line 533, in request
resp = self.send(prep, **send_kwargs)
File "/usr/lib/python3/dist-packages/requests/sessions.py", line 646, in send
r = adapter.send(request, **kwargs)
File "/usr/lib/python3/dist-packages/requests/adapters.py", line 516, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='localhost', port=443): Max retries exceeded with url: /config (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7feb4c1c5ee0>: Failed to establish a new connection: [Errno 111] Connection refused'))
I am running quickstart_snappi application. i am able to monitor packets on veth2 interface using tcpdump. but its not showing anything on vet1. I am also receiving wrong port_metric stats. i am transmitting 1000 packets of 128 byte size which i am receiving on tcpdump but getting stats bytes_tx = 384.
maybe -p 8443:443
instead of --net=host
?
https://github.com/open-traffic-generator/ixia-c/blame/main/readme.md#L56
In this section https://github.com/open-traffic-generator/athena/blob/dev-mon-ist/docs/hello-snappi.md#protocol-headers you say:
At this point, the headers still contain default parameters. In the next sections, we will assign specific values to the various header fields.
Other than reading the swagger spec, how do I know what those are? Is there a simple guiding principle?
Reported by @chrispsommers
The Slack badge on readme.md points to https://ixia-c.slack.com. If somebody isn't already a member of the Ixia-c slack workspace then they can't use that link to join the workspace. Need to point them to the shared invite on the support page.
The https://github.com/open-traffic-generator/ixia-c/blob/main/docs/deployments.md document shows docker run commands for various scenarios. It'd be nice to show, in the same place, some snippets of the corresponding port
configurations both in JSON and snappi Python, so the user can easily get going. For example, here's a snappi snippet:
# when using ixnetwork extension, port location is chassis-ip;card-id;port-id
port1, port2 = (
self.cfg.ports
.port(name='port1', location='localhost:5555')
.port(name='port2', location='localhost:5556')
)
Can you provide documentation for this feature
When deploying ixia-c-one on ubuntu 22.04 using containerlab, test port containers are not assigned any interface.
The culprit is pipework script, which doesn't seem to work correctly when cgroupv2 is enabled.
2022/05/09 21:43:35 Found IP address: 172.17.0.4
2022/05/09 21:43:35 Endpoint address: 172.17.0.4:5555
2022/05/09 21:43:35 Controller Config: &{LocationMap:[{Location:eth3 Endpoint:172.17.0.3:5555} {Location:eth4 Endpoint:172.17.0.4:5555}]}
2022/05/09 21:43:35 Interface 'eth1' does not exist, adding it ...
2022/05/09 21:43:35 Creating traffic-engine ...
2022/05/09 21:43:35 Creating container ixia-c-traffic-engine:1.4.1.26 ...
2022/05/09 21:43:35 Pushing interface to traffic-engine container ...
2022/05/09 21:43:35 Could not create traffic-engine for interface eth1 : could not push interface: exit status 1
i.e. --log-out
should be enabled by default
docker logs
on the controller shows nothing otherwise.
Create a performance chart of bps/pps capabilities for Athena, comparing free & licensed versions as applicable.
Reported by @chrispsommers
Please show an example how you can achieve e.g. 32 full-performance full-duplex engines using one controller and multiple hosts with several NICs per host. (Have we tested this?)
Reported by @chrispsommers
Hi,
i configured two flows on one trasmitting port. When i try to start only the first flow, the response is:
{ "errors": [ "Setting transmit state "start" on subset of flows is currently not supported" ] }. Of course the same happens if i try to start the second flow.
Is this beahviour correct? If not, is this scenario's implementation foreseen?
Thank you
Reported by @chrispsommers
I have tested IXIA-C on connectx6-dx card 100 Gbs. following were the results
L1 speed 100 Gbs and packets were transmitting with speed of 10 Gbs
L1 speed 10 Gbs and packets were transmitting with speed of 6 Gbs
Can you explain the reason for this behavior ?
Can we increase TX queue and core?
what speed IXIA-c free version supports?
The quickstart uses eth1, presumably a real NIC device. It'd be nice to have a quickstart using just veth pairs, even if it requires 2 TEs. Provide instructions including creating the veth pairs, don't make users look for the veth instructions at https://github.com/open-traffic-generator/ixia-c/blob/main/docs/prerequisites.md#network-interface-prerequisites.
The interfaces created in Ixia container are "veth5aa8284, vetha3b8d37". How to figure out eth1 and eth2?
In the second table, last column
List of three CPU cores. First core in list is used for configuration, control and statistics. Second core is used for Tx and third (& last) core is used for Rx.
I would write something like this:
List of three CPU cores. First core in list is used for configuration, control and statistics. Only one core is needed for the controller; it can be reused for every traffic engine instance, so you should specify the same core for each container you launch. Second core is used for Tx and third (& last) core is used for Rx.
I'd also restate this briefly before the two- and three-arm examples (e.g. "Note the shared controller core.") You need to assume peolple won't read these from top to bottom, but jump around to sections.
This brings up a question: if you can spawn traffic-engine containers on multiple hosts for horizontal scale out, does each host require a controller core for [a group of] engines? I'll open another issue about this: https://github.com/open-traffic-generator/athena/issues/13
Reported by @chrispsommers
I created Ixia container and accessing it with the command
#docker exec -it bash
Is there any other way of logging in to the ixia container?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.