Sun Feb 24, 2013 7:40 am
Sounds do-able doesn't it but these load balancing ideas usually prove to be impossible at a simple script level.
All network packets will be clearly marked with their destination so in principal you can do these sort of things. Problem arises because the monitor needs to be in a place where it can see all network traffic. For a home network this is the router provided by your ISP and not your Pi, which will only be picking up its own traffic. Naturally access to the router internals are usually restricted to put it mildly.
Of course the network configuration could be modified, so a single system (the Pi in this case), takes all network traffic, and then forwards it on it your local network. There are tools to analyse network (TCP/UDP/...) packets, search out Wireshark if you are encouraged to go further. You will be able to put the tool into a promiscuous mode to pick up all traffic, and very verbose you will find it too. So the Pi will have to be doing a lot of grunt to sort things out. All this requires a deep level of understanding to ensure a good level of even-handedness to the sharing of resources; there are always unseen side-effects.
Another approach would be to install multiple NICs on the Pi and design your network into several sub-nets. So one NIC could be using IPs on the 192.168.1, a second on 192.168.2 and so on. This could simplify the issue since you are now limiting yourself to monitoring just these points in the network.
Apologies if this is all a bit general, not specific enough and unhelpful.
Maybe someone will be able to contribute something more concrete for you.
Good luck.