Open Traffic Generator examples
OTG examples repository is a great way to get started with Open Traffic Generator API. It features a collection of software-only network labs ranging from very simple to more complex. To setup network labs in software we use containerized or virtualized NOS images.
There are several implementations of OTG API. Each example uses one of the following:
- Ixia-c TE: Ixia-c Traffic Engine
- Ixia-c-one: a single-container package of Ixia-c Traffic Engine for Containerlab
- KENG TE: Keysight Elastic Network Generator with Ixia-c Traffic Engine
- KENG TE+PE: Keysight Elastic Network Generator with Ixia-c Traffic and Protocol Engines
- KENG IxHW: Keysight Elastic Network Generator with Keysight/Ixia L23 Network Test Hardware
Device Under Test
Many network vendors provide versions of their Network Operating Systems as a CNF or VNF. To make OTG Examples available for a widest range of users, our labs use open-source or freely available NOSes like FRR. Replacing FRR with a container from a different vendor is a matter of modifying one of the lab examples.
Some examples don't have any DUT and use back-2-back connections between Test Ports. These are quite useful to make sure the Traffic Generator part works just fine by itself, before introducing a DUT.
A job of an OTG Client is to communicating with a Traffic Generator via the OTG API and request it to perform tasks such as applying a configuration, starting protocols, running traffic, collecting metrics. Each example uses one (or sometimes more) of the following OTG Clients:
curl- The most basic utility for any kind of REST API calls, including OTG
otgen- This command-line utility comes as part of OTG toolkit. It is capable of manipulating a wide range of OTG features while hiding a lot of complexity from a user
snappi- Test scripts written in
snappi, an auto-generated Python module, can be executed against any traffic generator conforming to the Open Traffic Generator API.
gosnappi- Similar to
snappi, test scripts written in
gosnappi, an auto-generated Go module, can be executed against any traffic generator conforming to the Open Traffic Generator API.
ondatra– Ondatra is a framework for writing and running tests against both real and containerized network devices. When executing a test via the Open Traffic Generator API, it uses
gosnappiclient library internally.
To manage deployment of the example labs, we use one of the following tools:
- Docker Compose - general-purpose tool for defining and running multi-container Docker applications
- Containerlab - simple yet powerful specialized tool for orchestrating and managing container-based networking labs
- Ixia-c Operator – Ixia-c deployment orchestration engine compatible with K8s/KNE as well as Docker for Hybrid mode
- OpenConfig KNE – Kubernetes Network Emulation, which is a Google initiative to develop tooling for quickly setting up topologies of containers running various device OSes.
CI with Github Actions
Most of the lab examples include Github Action workflow for executing OTG tests on any changes to the lab code. This could serve as a template for your CI workflow.
|B2B Ixia-c Traffic||Ixia-c TE||B2B||
|Static B2B LAG||Ixia-c TE||B2B||
|FRR Ixia-c Traffic||Ixia-c TE||FRR||
|3xB2B KENG Traffic||KENG TE||B2B||
|B2B KENG BGP and traffic||KENG PE+TE||B2B||
|FRR KENG ARP, BGP and traffic||KENG PE+TE||FRR||
||Compose & Clab||yes|
|Hello, snappi! Welcome to the Clab!||Ixia-c-one||B2B||
|Dear snappi, please meet Scapy!||Ixia-c-one||B2B||
|FeatureProfiles in Hybrid mode||KENG PE+TE||B2B||
|B2B Ixia Hardware||KENG IxHW||B2B||
|cEOS BGP and Traffic in KNE||KENG PE+TE||cEOS||
Ixia-c traffic engine back-to-back setup with Docker Compose. Fast and easy way to get started using
otgen CLI tool.
Two Ixia-c Traffic Engines connected back-2-back in a Containerlab environment over two pairs of ports in a LAG. The goal is to demonstrate how to create a static Link Aggregation Group (LAG) consisting of two ports and run traffic over the LAG interface.
Ixia-c Traffic Engine and FRR. Demonstrates how to deploy Ixia-c Traffic Engine nodes in Containerlab. This setup has an FRR container as a Device Under Test.
KENG 3 back-to-back pairs setup with Docker Compose. This lab is an extension of Ixia-c back-2-back lab traffic engine setup with more port pairs that is allowed with free version of Ixia-c. Use this lab to validate Ixia-c commercial version – KENG for basic traffic operations.
KENG back-to-back BGP and traffic setup with Docker Compose. This is an extended version of a basic Ixia-c back-2-back lab with Keysight Elastic Network Generator components added to emulate L2-3 protocols like BGP.
KENG ARP, BGP and traffic with FRR as a DUT. This lab demonstrates validation of an FRR DUT for basic BGP peering, prefix announcements and passing of traffic between announced subnets. The lab has two alternative deployment methods: Compose as well as Containerlab.
Basics of creating a Python program to control Ixia-c-one node, all packaged in a Containerlab topology.
Joint use of Scapy packet crafting Python module with snappi, to generate custom DNS flows via Ixia-c-one node.
Remote Triggered Black Hole (RTBH) is a common DDoS mitigation technique which uses BGP announcements to request an ISP to drop all traffic to an IP address under a DDoS attack.
Validation of Arista cEOSLab DUT for basic BGP peering, prefix announcements and passing of traffic between announced subnets. To run OTG protocols and flows, Keysight Elastic Network Generator is used with Ixia-c Traffic and Protocol Engine ports. To run the lab, OpenConfig KNE is used on top of a KIND cluster – K8s environment running inside a single Docker container.