Skip to content

Introduction

Open Traffic Generator (OTG) APIs and Data Models are APIs to test Layer 2 & 3 routers and switches. They include support for testing the forwarding plane as well as testing the control plane. They are:

  • Open
  • Vendor Neutral
  • Intent Based
  • Declarative

The specification is available on GitHub here (viewer friendly version at reDocly here). Specifications support both REST or gRPC interfaces.

snappi and gosnappi provide custom built 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).

Following tools provide OTG compliant implementations.

  • Ixia-c : Free container-based traffic generator from Keysight. Limited to 4 ports, supports REST APIs. Commercial version includes control plane and gRPC support.
  • IxNetwork : snappi-ixnetwork supports running OTG/snappi scripts against IxNetwork.
  • TRex : snappi-trex supports running OTG/snappi scripts against TRex. Support is present for layer 2-3 traffic generation.