Answer the question
In order to leave comments, you need to log in
How to automatically test speed on multiple wan interfaces without losing ssh connection?
The system has several wan interfaces (up to a dozen). Some of them may not be connected. There is a lifted reverse ssh which is automatically lifted on break.
At the moment I'm testing speed like this (python+bash)
for iface in network_list:
cmd = "sudo ifconfig " + iface + " down"
os.system(cmd)
for iface in network_list:
cmd = "sudo ifconfig " + iface + " 192.168.8.100 up"
os.system(cmd)
cmd = "sudo route add default gw 192.168.8.1"
os.system(cmd)
os.system("sudo bash -c 'echo nameserver 192.168.8.1 > /etc/resolv.conf'")
SpeedTest()
SaveResult()
cmd = "sudo ifconfig " + iface + " 192.168.8.100 down"
os.system(cmd)
Answer the question
In order to leave comments, you need to log in
1. Use mosh instead of ssh.
2. Register statics and a route in your direction on one of the interfaces. Connect accordingly to this interface.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question