This example demonstrates how the OTG API can be used to control Keysight/Ixia L23 Network Test Hardware. The same Keysight Elastic Network Generator keng-controller
that serves as the OTG API Endpoint for Ixia-c software test ports can be used with the hardware test ports. Such deployment model requires to use keng-layer23-hw-server
container image that provides an interface between the controller and the hardware test ports. See the diagram below that illustrates the components of such setup:
-
System License Edition for Keysight Elastic Network Generator images. Read more in KENG.md
-
Keysight Ixia Novus or AresOne Network Test Hardware with IxOS 9.20 Patch 4 or higher. NOTE: Currently, only Linux-based IxOS platforms are tested with KENG.
-
Linux host or VM with sudo permissions and Docker support. Here is an example of deploying an Ubuntu VM
otg
using multipass:multipass launch 22.04 -n otg -c4 -m8G -d32G multipass shell otg
-
Docker. Follow official instruction for
After docker is installed, add current user to the docker group.
sudo usermod -aG docker $USER
-
Python3 (version 3.9 or higher), PIP and VirtualEnv
sudo apt install python3 python3-pip python3.10-venv -y
-
Go version 1.19 or later
sudo snap install go --channel=1.19/stable --classic
-
git
andenvsubst
commands (typically installed by default)sudo apt install git gettext-base -y
git clone --recursive https://github.com/open-traffic-generator/otg-examples.git
cd otg-examples/hw/ixhw-b2b
-
Initialize an environment variable
LICENSE_SERVERS
with a hostname/IP address of the Keysight License Server. Replacelicense_server_name
with the actual hostname/IP address of your license server.export LICENSE_SERVERS="license_server_name"
-
Launch the deployment
docker compose up -d
-
To make sure all the containers are running, use
docker ps
the list of containers should include:
ixhw-b2b-controller-1
ixhw-b2b-layer23-hw-server-1
-
Initialize environment variables with locations of Ixia L23 hardware ports. Replace
ixos_ip_address
,slot_number_X
,port_number_X
with values matching your equipment.export OTG_LOCATION_P1="ixos_ip_address;slot_number_1;port_number_1" export OTG_LOCATION_P2="ixos_ip_address;slot_number_2;port_number_2"
For example, if IxOS management IP is
10.10.10.10
and you need to use ports14
and15
in the slot number2
:export OTG_LOCATION_P1="10.10.10.10;2;14" export OTG_LOCATION_P2="10.10.10.10;2;15"
-
Setup virtualenv for Python
python3 -m venv venv source venv/bin/activate pip install -r requirements.txt
-
Run flows via snappi script, reporting port metrics
./snappi/otg-flows.py -m port
-
Run flows via snappi script, reporting port flow
./snappi/otg-flows.py -m flow
To stop the deployment, run:
docker compose down
-
Initialize an environment variable
LICENSE_SERVERS
with a hostname/IP address of the Keysight License Server. Replacelicense_server_name
with the actual hostname/IP address of your license server.export LICENSE_SERVERS="license_server_name"
-
Launch the deployment
docker compose -p keng1 --file fp.compose.yml --file fp.compose.ports.yml up -d
-
To make sure all the containers are running, use
docker ps
the list of containers should include:
keng1-gnmi-server-1
keng1-controller-1
keng1-layer23-hw-server-1
-
Initialize environment variables with locations of Ixia L23 hardware ports. Replace
ixos_ip_address
,slot_number_X
,port_number_X
with values matching your equipment.export OTG_LOCATION_P1="ixos_ip_address;slot_number_1;port_number_1" export OTG_LOCATION_P2="ixos_ip_address;slot_number_2;port_number_2"
For example, if IxOS management IP is
10.10.10.10
and you need to use ports14
and15
in the slot number2
:export OTG_LOCATION_P1="10.10.10.10;2;14" export OTG_LOCATION_P2="10.10.10.10;2;15"
-
Create an ONDATRA binding file
otgb2b.binding
by usingotgb2b.template
as a template and substituting OTG port locations using the environmental variables initialized in the previous step.cat otgb2b.template | envsubst > otgb2b.binding export OTGB2B_BINDING="$(pwd)/otgb2b.binding"
-
Clone FeatureProfiles fork from Open Traffic Generator org. The back-2-back test we're going to use is published under the
static
branch we need to clone:git clone -b static --depth 1 https://github.com/open-traffic-generator/featureprofiles.git fp-static
-
Run FeatureProfiles OTG HW B2B test
cd fp-static/feature/experimental/otg_only go test -v otgb2b_test.go -testbed otgb2b.testbed -binding "${OTGB2B_BINDING}" cd ../../../..
If you need to support multiple concurrent seats (simultaneous tests) on the same VM, it is possible to launch several parallel instances of Keysight Elastic Network Generator.
-
What you need for that is to choose a set of different TCP ports that
keng-controller
andotg-gnmi-server
would be mapped to on the host. As an example, see the file fp.compose.ports2.yml. You would also need start the deployment using a non-default project name, so that the second set of containers would run over a dedicated network.docker compose -p keng2 --file fp.compose.yml --file fp.compose.ports2.yml up -d
-
Now create a second ONDATRA binding file, for example
otgb2b.binding2
:cp otgb2b.binding otgb2b.binding2 # change TCP ports for both otg and gnmi targets # change port name strings to use different IxHW ports vi otgb2b.binding2 export OTGB2B_BINDING="$(pwd)/otgb2b.binding2"
Now you're ready to run the two parallel tests via the same VM using two different binding files.
To stop the deployment, run:
docker compose -p keng1 --file fp.compose.yml down
docker compose -p keng2 --file fp.compose.yml down
If you see the following error when running the featureprofiles test:
the configuration contains port of type Ixia-Hardware, which is not supported in community edition
it means that you either didn't provide the proper LICENSE_SERVERS
environment variable, or the license server is not reachable from the controller container. To further check if the received the list of License Servers, run:
docker logs keng1-controller-1 | grep -i LicenseServers
The list should not be empty.
If the list is not empty, check if the controller can reach the License Server by looking for Session successfully created with license server
message in the logs:
docker logs keng1-controller-1 | grep -i licensing
To collect diagnostics logs from all the components of the lab, run:
../../utils/collect-ixia-c-hw-logs.sh
It will create a logs-DATE.tar.gz
file you can share with Keysight for troubleshooting.
TIP. Use
make logs
if you havemake
on your system