{"id":20622450,"url":"https://github.com/open-traffic-generator/otg-examples","last_synced_at":"2025-10-26T14:11:07.283Z","repository":{"id":38040344,"uuid":"487122081","full_name":"open-traffic-generator/otg-examples","owner":"open-traffic-generator","description":"Open Traffic Generator examples available to everyone. It's a great way to get started.","archived":false,"fork":false,"pushed_at":"2025-10-24T11:21:54.000Z","size":5238,"stargazers_count":35,"open_issues_count":9,"forks_count":11,"subscribers_count":12,"default_branch":"main","last_synced_at":"2025-10-24T13:22:04.290Z","etag":null,"topics":["clab-topo","containerlab","gosnappi","ixia-c","netops","network-automation","network-test","network-testing","networking-labs"],"latest_commit_sha":null,"homepage":"https://otg.dev/examples/otg-examples/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/open-traffic-generator.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-04-29T22:08:03.000Z","updated_at":"2025-10-24T11:21:58.000Z","dependencies_parsed_at":"2023-10-20T07:10:29.938Z","dependency_job_id":"e3525189-7bd6-4573-b66a-229c3ba857f1","html_url":"https://github.com/open-traffic-generator/otg-examples","commit_stats":null,"previous_names":["openixia/otg-demo"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/open-traffic-generator/otg-examples","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/open-traffic-generator%2Fotg-examples","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/open-traffic-generator%2Fotg-examples/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/open-traffic-generator%2Fotg-examples/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/open-traffic-generator%2Fotg-examples/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/open-traffic-generator","download_url":"https://codeload.github.com/open-traffic-generator/otg-examples/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/open-traffic-generator%2Fotg-examples/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281114824,"owners_count":26446054,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-26T02:00:06.575Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["clab-topo","containerlab","gosnappi","ixia-c","netops","network-automation","network-test","network-testing","networking-labs"],"created_at":"2024-11-16T12:22:54.544Z","updated_at":"2025-10-26T14:11:07.241Z","avatar_url":"https://github.com/open-traffic-generator.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Open Traffic Generator examples\n\n[![CI](https://github.com/open-traffic-generator/otg-examples/actions/workflows/ci.yml/badge.svg)](https://github.com/open-traffic-generator/otg-examples/actions/workflows/ci.yml)\n\n## Overview\n\n[OTG examples](https://github.com/open-traffic-generator/otg-examples) repository is a great way to get started with [Open Traffic Generator API](https://otg.dev). 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.\n\n## OTG Tools\n\nThere are several [implementations](https://otg.dev/implementations/) of OTG API. All the labs in this repository use [Keysight Elastic Network Generator](https://www.keysight.com/us/en/products/network-test/protocol-load-test/keysight-elastic-network-generator.html) with different types of test ports:\n\n* [Ixia-c](https://otg.dev/implementations/#ixia-c): Ixia-c containerized software Traffic Engine (TE) and Protocol Engine (PE)\n* [Ixia-c-one](https://github.com/open-traffic-generator/ixia-c/blob/main/docs/deployments.md#deploy-ixia-c-one-using-containerlab): a single-container package of Ixia-c for Containerlab\n* [IxOS Hardware](https://www.keysight.com/us/en/products/network-test/network-test-hardware.html): Keysight Elastic Network Generator with Keysight/Ixia L23 Network Test Hardware\n\n## Device Under Test\n\nMany 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](https://frrouting.org/). Replacing FRR with a container from a different vendor is a matter of modifying one of the lab examples.\n\nSome 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.\n\n## OTG Client\n\nA 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:\n\n* [`curl`](https://otg.dev/clients/curl/) - The most basic utility for any kind of REST API calls, including OTG\n* [`otgen`](https://otg.dev/clients/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\n* [`snappi`](https://otg.dev/clients/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.\n* [`gosnappi`](https://otg.dev/clients/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.\n* [`ondatra`](https://github.com/openconfig/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 `gosnappi` client library internally.\n\n## Infrastructure\n\nTo manage deployment of the example labs, we use one of the following tools:\n\n* [Docker Compose](https://docs.docker.com/compose/) - general-purpose tool for defining and running multi-container Docker applications\n* [Containerlab](https://containerlab.dev/) - simple yet powerful specialized tool for orchestrating and managing container-based networking labs\n* [Ixia-c Operator](https://github.com/open-traffic-generator/ixia-c-operator) – Ixia-c deployment orchestration engine compatible with K8s/KNE as well as Docker for Hybrid mode\n* [OpenConfig KNE](https://github.com/openconfig/kne) – Kubernetes Network Emulation, which is a Google initiative to develop tooling for quickly setting up topologies of containers running various device OSes.\n\n## CI with Github Actions\n\nMost 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.\n\n## Reference\n\n| Lab                                                                                                                          | OTG Tool     | DUT  | Client               | Infrastructure  | CI  |\n| ---------------------------------------------------------------------------------------------------------------------------- | ------------ | ---- | -------------------- | --------------  | --- |\n| [B2B Ixia-c Traffic](https://github.com/open-traffic-generator/otg-examples/blob/main/docker-compose/b2b)                    | Ixia-c TE    | B2B  | `otgen` \u0026 `snappi`   | Compose         | yes |\n| [Static B2B LAG](https://github.com/open-traffic-generator/otg-examples/blob/main/clab/ixia-c-b2b-lag)                       | Ixia-c TE    | B2B  | `otgen`              | Containerlab    | yes |\n| [FRR Ixia-c Traffic](https://github.com/open-traffic-generator/otg-examples/blob/main/clab/ixia-c-te-frr)                    | Ixia-c TE    | FRR  | `otgen`              | Containerlab    | yes |\n| [3xB2B Ixia-c Traffic](https://github.com/open-traffic-generator/otg-examples/blob/main/docker-compose/b2b-3pair)            | Ixia-c TE    | B2B  | `otgen`              | Compose         | yes |\n| [B2B Ixia-c BGP and traffic](https://github.com/open-traffic-generator/otg-examples/blob/main/docker-compose/cpdp-b2b)       | Ixia-c PE+TE | B2B  | `gosnappi`           | Compose         | yes |\n| [FRR Ixia-c ARP, BGP and traffic](https://github.com/open-traffic-generator/otg-examples/blob/main/docker-compose/cpdp-frr)  | Ixia-c PE+TE | FRR  | `curl` \u0026 `otgen`     | Compose \u0026 Clab  | yes |\n| [Hello, snappi! Welcome to the Clab!](https://github.com/open-traffic-generator/otg-examples/blob/main/clab/ixia-c-b2b)      | Ixia-c-one   | B2B  | `snappi`             | Containerlab    | yes |\n| [Dear snappi, please meet Scapy!](https://github.com/open-traffic-generator/otg-examples/blob/main/clab/ixia-c-b2b/SCAPY.md) | Ixia-c-one   | B2B  | `scapy` \u0026 `snappi`   | Containerlab    | yes |\n| [RTBH](https://github.com/open-traffic-generator/otg-examples/blob/main/clab/rtbh)                                           | Ixia-c-one   | FRR  | `gosnappi`           | Containerlab    | yes |\n| [FeatureProfiles in Hybrid mode](https://github.com/open-traffic-generator/otg-examples/blob/main/hybrid/fp-b2b)             | Ixia-c PE+TE | B2B  | `ondatra`            | KENG Operator   | yes |\n| [B2B IxOS Hardware](https://github.com/open-traffic-generator/otg-examples/blob/main/hw/ixhw-b2b)                            | IxOS Hardware| B2B  | `snappi` \u0026 `ondatra` | Compose         | no  |\n| [cEOS BGP and Traffic in KNE](https://github.com/open-traffic-generator/otg-examples/blob/main/kne/bgp-ceos)                 | Ixia-c PE+TE | cEOS | `otgen`              | KNE             | no  |\n| [AWS DPDK Ixia-c Traffic](https://github.com/open-traffic-generator/otg-examples/blob/main/public-cloud/aws/ixia-c-dpdk-aws) | Ixia-c TE    | EC2  | `snappi`             | Terraform \u0026 Compose | no  |\n\n\n## Lab Descriptions\n\n### [B2B Ixia-c Traffic](docker-compose/b2b)\n\nIxia-c traffic engine back-to-back setup with Docker Compose. Fast and easy way to get started using [`otgen`](https://github.com/open-traffic-generator/otgen) CLI tool.\n\n### [Static B2B LAG](clab/ixia-c-b2b-lag)\n\nTwo 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.\n\n### [FRR Ixia-c Traffic](clab/ixia-c-te-frr)\n\nIxia-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.\n\n### [3xB2B Ixia-c Traffic](docker-compose/b2b-3pair)\n\nIxia-c 3 back-to-back pairs setup with Docker Compose. This lab is an extension of [Ixia-c back-2-back lab](docker-compose/b2b/README.md) traffic engine setup with more port pairs that is allowed with free version of Ixia-c. Use this lab to validate Ixia-c commercial licensing for basic traffic operations.\n\n### [B2B Ixia-c BGP and traffic](docker-compose/cpdp-b2b)\n\nIxia-c back-to-back BGP and traffic setup with Docker Compose. This is an extended version of a basic [Ixia-c back-2-back lab](docker-compose/b2b/README.md) with Ixia-c Protocol Engine added to emulate L2-3 protocols like BGP.\n\n### [Ixia-c KENG ARP, BGP and traffic](docker-compose/cpdp-frr)\n\nIxia-c 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.\n\n### [Hello, snappi! Welcome to the Clab!](clab/ixia-c-b2b)\n\nBasics of creating a Python program to control Ixia-c-one node, all packaged in a Containerlab topology.\n\n### [Dear snappi, please meet Scapy!](clab/ixia-c-b2b/SCAPY.md)\n\nJoint use of Scapy packet crafting Python module with snappi, to generate custom DNS flows via Ixia-c-one node.\n\n### [RTBH](clab/rtbh)\n\nRemote 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.\n\n### [FeatureProfiles in Hybrid mode](hybrid/fp-b2b)\n\nAn introduction to [OpenConfig](https://openconfig.net/) [FeatureProfiles](https://github.com/openconfig/featureprofiles) test suites built with the [Open Traffic Generator API](https://otg.dev).\n\n### [OTG with Ixia L23 Hardware: back-to-back setup](hw/ixhw-b2b)\n\nDemonstration of how the OTG API can be used to control [Keysight/Ixia L23 Network Test Hardware](https://www.keysight.com/us/en/products/network-test/network-test-hardware.html), including an example of running [OpenConfig](https://openconfig.net/) [FeatureProfiles](https://github.com/openconfig/featureprofiles) test suites.\n\n### [KNE Lab with BGP and traffic via Arista cEOSLab as a DUT](kne/bgp-ceos)\n\nValidation 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](https://www.keysight.com/us/en/products/network-test/protocol-load-test/keysight-elastic-network-generator.html) Community Edition is used with Ixia-c Traffic and Protocol Engine ports. To run the lab, [OpenConfig KNE](https://github.com/openconfig/kne) is used on top of a KIND cluster – K8s environment running inside a single Docker container.\n\n### [Ixia-c traffic engine deployment on Amazon Web Services with DPDK](public-cloud/aws/ixia-c-dpdk-aws)\n\nAn AWS deployment where [Ixia-c](https://ixia-c.dev) has two traffic ports connected within a single VPC subnet. Performance improvements are enabled through [DPDK](https://www.dpdk.org/) support.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopen-traffic-generator%2Fotg-examples","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopen-traffic-generator%2Fotg-examples","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopen-traffic-generator%2Fotg-examples/lists"}