--- title: "Testing traffic" slug: "testing-traffic" updated: 2026-10-16T14:28:44Z published: 2026-10-16T14:28:44Z canonical: "docs.swxtch.io/testing-traffic" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.swxtch.io/llms.txt > Use this file to discover all available pages before exploring further. # Testing traffic > [!NOTE] > **WHAT TO EXPECT** > > In this article, users will learn how to test simple multicast traffic creation/consumption using provided tools. ## Provided tools groundSwXtch provides a set of tools, swx-tools, so users can test simple multicast traffic production/consumption. The tools run in a Docker container. To help test the groundSwXtch, swx-tools can be installed on the groundSwXtch VM or on any other VM using this command: ```shell sudo ./install-groundswxtch.sh swx-tools ``` This installs the tools as a Docker container named `swx-tools`. If Docker is not installed, the installer tries to install it, unless `--skip-docker-install` is given. To install Docker manually, see [How to Install Docker on RHEL and Ubuntu](/v2/docs/how-to-install-docker-on-rhel-and-ubuntu). ## Running swx-perf swx-perf has two roles: a **producer** that sends multicast traffic and a **consumer** that receives it. Run them through `docker exec`: ```shell sudo docker exec swx-tools swx-perf producer --nic swx0-lan --sendto 239.1.1.1:5555 --pps 1000 --seconds 30 sudo docker exec swx-tools swx-perf consumer --nic swx0-lan --recvfrom 239.1.1.1:5555 --seconds 30 --json-report ``` The key flags: - `--nic` — the interface to send on or receive from (see the note below on which one to use). - `--sendto` **/** `--recvfrom` — the multicast group and port (`group:port`). - `--pps` — packets per second for the producer. - `--seconds` — how long the run lasts. Always set this so the producer and the consumer stop on their own. - `--json-report` — prints a structured packet and loss summary at the end of the run. To run swx-perf from an interactive bash shell inside the container: ```shell sudo docker exec -it swx-tools bash ``` ## Choosing the network interface The single most common cause of "0 packets" is the wrong `--nic`. At the end of the swx-tools install, the installer prints interface hints; on a VM that also runs groundSwXtch, follow the note below. > [!NOTE] > **PLEASE NOTE** > > If the user is running the tools in a VM that's also running groundSwXtch, the network interface must be the virtual interface `swx0-lan` (`gswx-lan` on earlier builds). Only when generating traffic from a separate machine should the physical NIC (for example, `enp0s5`) be used. Changing the LAN device between a virtual and a physical interface flushes the multicast subscriptions — they must be re-added afterward. > [!NOTE] > **NOTES** > > - Ports must be 1024 or higher. Avoid 5000 and 6000 (reserved by spp) and 9999 (reserved by the swXtch ecosystem); 5555 is a safe choice. > - A `docker exec` started **without** `-it` does not forward `Ctrl+C` to swx-perf inside the container, so the producer keeps running as an orphan. Always bound the run with `--seconds`, or use `docker exec -it`. To stop a stray producer: `sudo docker exec swx-tools pkill -INT -f swx-perf`. A software-based network switch that adds multicast to your physical networks as a softwared defined overlay. Link your facilities into a reliable multicast fabric.