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:
sudo ./install-groundswxtch.sh swx-toolsThis 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.
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:
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-reportThe 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:
sudo docker exec -it swx-tools bashChoosing 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.
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-lanon 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.
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 execstarted without-itdoes not forwardCtrl+Cto swx-perf inside the container, so the producer keeps running as an orphan. Always bound the run with--seconds, or usedocker exec -it. To stop a stray producer:sudo docker exec swx-tools pkill -INT -f swx-perf.