Assuming you could obtain current network traffic, broken down by subnet, and put that process into a shell script, you could then install indicator-sysmonitor and add your script to the indicator.
I also happened upon bandwidthd which may help.
I am not an expert, just autodidact. Hopefully this is going to help you somehow, since nobody gave you any answer at all actually.
You believe you are losing packets, perhaps randomly - how to you come to this conclusion?
How do I route everything that is coming from or going to a specific address to a specific interface and make everything else go to the other interface?
By setting up routes as you already did using the gui.
It should work like this from command line:
Ethernetdevice connected to the LIDAR
sudo ip route add ip-of-a-specific-server-or-device-or-of-whole-subnet via standardgateway1
- Assuming your LIDAR has ip 192.168.2.202
- and the router or standardgateway on that net has the IP 192.168.2.1
the command could look like this
sudo ip route add 192.168.2.202 via 192.168.2.1
or if you want to route all traffic to any device inside that subnet:
sudo ip route add 192.168.2.0/24 via 192.168.2.1
/24 is a subnetmask of 255.255.255.0 that is 8 bit + 8 bit + 8 bit + 0 bit = 24 bit
Ethernetdevice connected to the internet
sudo ip route add all-the-rest-to-the-internet via standardgateway2
- The rest/internet has the default ip of 0.0.0.0
- Your router or modem might have the ip 192.168.1.1
The command should look like this:
sudo ip route add 0.0.0.0 via 192.168.1.1
Problems that sometimes can occur when routing:
You are sending ip packets with a bad source ip.
For example it can happen that you send a source ip of 192.168.1.x to a device at 192.168.2.x. To check this you could use tcpdump -i interface -vvv
and check what is shown as your outgoing ip. To repair this you need to use iptables
and MASQUERADE your traffic for example with sudo iptables -A POSTROUTING -t nat -o specific-interface-for-example-eth0 -j MASQUERADE
To Monitor your traffic I would suggest to use bmon
as it will show you also collisions / errors per device.
Best Answer
You probably want to have a look at vnstat
You can have hourly daily and monthly statistics.