Home
Open Traffic Generator (OTG) APIs and data models are northbound API specifications for modern Traffic Generators and Protocol Emulators designed to test Layer 2-7 network devices. They include support for testing forwarding as well as control planes. OTG APIs are:
- Open
- Vendor-neutral
- Intent-based
- Declarative
The formal model specification can be found on GitHub under Open Traffic Generator organization. To explore the model, a viewer friendly ReDoc rendering is available as well. The OTG APIs support both REST and gRPC interfaces.
Features
OTG is an actively developed specification, with contributions from real use cases. The model defines the following components of a traffic generator configuration:
- Test Ports with Layer 1&2 capabilities, including:
- LLDP, LAG, LACP
- Emulated Devices with Layer 2&3 features:
- IPv4, IPv6 interfaces
- ARP, IPv6 ND
- BGP, IS-IS routing protocols
- Traffic Flows
- associated with either Test Ports, or Emulated Devices
- expressing L2-4 properties like Ethernet, IPv4/IPv6, TCP/UDP
- stateless or stateful capabilities for transport protocols
- with implementation-specific application payload
- Run-time Metrics and traffic Capture capabilities
Fig. 1. OTG diagram with Traffic Flows between Emulated Devices, running via a Device Under Test (DUT)
Implementations
To apply OTG in practice, an OTG-compatible tool, typically a Traffic Generator, is needed. There are several implementations available, and the list is growing:
- Ixia-c Community Edition: container-based traffic generator from Keysight. The Community Edition supports up to 4 Test Ports and stateless layer 2-3 Traffic Flows
- Keysight Elastic Network Generator: commercial offering of OTG implementation for a family of Keysight/Ixia Traffic Generators
- IxNetwork: snappi-ixnetwork enables running OTG/snappi scripts with Keysight IxNetwork
- Magna: open-source OTG implementation from OpenConfig project
- TRex: snappi-trex enables running OTG/snappi scripts with TRex. Supports layer 2-3 Traffic Flows
Clients
There are multiple ways to communicate with a Traffic Generator via the OTG API:
- otgen command-line tool is an easy way to start with
- snappi library to accelerate development of Test Programs written in Python or Go
- direct REST or gRPC calls as an alternative to using snappi
- custom OTG client applications
snappi and gosnappi provide client side API libraries for the OTG specifications for Python and Golang respectively. For other languages, SDKs can be built using OpenAPI Generator (for REST API) or protobuf tools (for gRPC).
Use Cases
Real use cases are the basis of OTG evolution. Notable open-source projects leveraging OTG:
Community
Use our community resources to get help with Open Traffic Generator applications, develop your own implementation, or contribute to OTG: