I'm trying to get my head around how to run speedtest-cli on a Rocky 8 box (RHEL8 respin) with LAN and three WAN connections. I want to run speedtest-cli on all the WAN links to test each, and run the tests from a timer to watch the speeds throughout the day (eg. a symlink to a test script in /etc/cron.hourly or a systemd timer unit). speedtest-cli accepts a --source option but it wants to always route through the WAN link set to the default route when I specify the addresses of the other two. From googling around it looks like I want to run it in a "network namespace" but I haven't figured out how to make that work.
I found this stackexchange answer on the namespace basics but I think I need a few more commands to actually make an app usable in the namespace by ifup'ing the interface, routing, and DNS. https://unix.stackexchange.com/questions/234583/routing-on-per-application-basis Hardware setup: eno1: LAN, 10.96.0.64, default route for LAN eno2: WAN1, 172.24.96.xxx, to ATT fiber gateway at 172.24.96.1 eno3: WAN2, 172.24.69.xxx, to Xfinity gateway at 172.24.69.1 eno4: WAN3, 172.24.0.xxx, to Xfinity gateway at 172.24.0.1 What I'm trying: # ip netns add comcast-1 # ip link set eno4 netns comcast-1 # ip netns exec comcast-1 speedtest-cli Retrieving speedtest.net configuration... Cannot retrieve speedtest configuration ERROR: <urlopen error [Errno -2] Name or service not known> At this point I'm not sure what I need to do to make the network namespace usable. _______________________________________________ Bloat mailing list Bloat@lists.bufferbloat.net https://lists.bufferbloat.net/listinfo/bloat