Ixia-c traffic engine back-to-back setup with Docker Compose
Overview
This is a basic lab where Ixia-c has two traffic ports connected back-2-back using a veth pair. The lab is defined via Docker Compose YAML file. Once the lab is up, a CLI tool otgen is used to request Ixia-c to generate traffic and report statistics.
Prerequisites
- Linux host or VM with sudo permissions and Docker support
- Docker
- Python3.9 for
snappipart
Install components
-
Install
docker-compose -
Install
otgen -
Make sure
/usr/local/binis in your$PATHvariable (by default this is not the case on CentOS 7) -
Clone this repository
Deploy Ixia-c lab
-
Create veth pair
veth0 - veth1 -
Launch the deployment and adjust MTUs on the veth pair
-
Make sure you have all three containers running:
Run OTG traffic flows with otgen tool
-
Start with using
otgento request Ixia-c to run traffic flows defined inotg.yml. If successful, the result will come as OTG port metrics in JSON format -
You can now repeat this exercise, but transform output to a table
-
The same, but with flow metrics
-
The same, but with byte instead of frame count (only receive stats are reported)
-
Now report packet per second rate, as a line chart (end with
Crtl-c)
Run OTG traffic flows with Python snappi library
If you have issues with setting up Python virtual environment, see an alternative way to run snappi scripts from inside a Docker container below.
-
Setup virtualenv for Python
-
Run flows via snappi script, reporting port metrics
-
Run flows via snappi script, reporting port flow
Running snappi scripts from a Docker container
-
Build a Docker image with
snappilibrary -
Run flows via snappi script in a container, reporting port metrics
-
Run flows via snappi script in a container, reporting port flow
Destroy the lab
To destroy the lab, including veth pair, use: