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
Install components
-
Install
docker-compose
-
Install
otgen
-
Make sure
/usr/local/bin
is in your$PATH
variable (by default this is not the case on CentOS 7) -
Clone this repository (optional, only needed to use
make all
to run all the steps automatically)
Deploy Ixia-c lab
-
Create veth pair
veth0 - veth1
-
Create YAML file for Docker Compose with veth interfaces assigned to
ixia-c-traffic-engine
containerscat > compose.yml << EOF services: controller: image: ghcr.io/open-traffic-generator/ixia-c-controller:0.0.1-3724 command: --accept-eula --http-port 8443 network_mode: "host" restart: always traffic_engine_1: image: ghcr.io/open-traffic-generator/ixia-c-traffic-engine:1.6.0.24 network_mode: "host" restart: always privileged: true environment: - OPT_LISTEN_PORT=5555 - ARG_IFACE_LIST=virtual@af_packet,veth0 - OPT_NO_HUGEPAGES=Yes traffic_engine_2: image: ghcr.io/open-traffic-generator/ixia-c-traffic-engine:1.6.0.24 network_mode: "host" restart: always privileged: true environment: - OPT_LISTEN_PORT=5556 - ARG_IFACE_LIST=virtual@af_packet,veth1 - OPT_NO_HUGEPAGES=Yes EOF
-
Launch the deployment and adjust MTUs on the veth pair
-
Make sure you have all three containers running:
Run OTG traffic flows
-
Download an example of OTG traffic flow configuration file:
-
Start with using
otgen
to 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
)
Destroy the lab
To destroy the lab, including veth pair, use:
Credits
- Diana Galan is an author of
compose.yml
example.