I have multiple 3G USB based Modems. I would like them to keep connected simultaneously, NOT necessarily aggregating their bandwidth; a separate intelligent application would manage their utilization effectively.
However I am running into problem of setting up proper routes for the ppp0,ppp1 interfaces: when one of them connects, other's entries in the routing table get updated so it is no more usable. If I reconnect the second one, it would override the first one's routing entries. If I do it over and over, sometimes both of them's entries disappear while in rare cases the two work well.
I have tried it both using NetworkManager as well as WVDial but issue pops up in both of these. Perhaps both of them use same PPP dialer at the backend and thats why this issue appears.
What is the proper solution to make them work together? In the long run, I'd also like them to automatically dial in once USB gets connected.
You may wish to try configuring your mobile connections with a simple tweak: checking the Use this connection only for the resources on its network checkbox, which is hidden a little far unfortunately:
Under the settings for your connection, go to the IPv4 tab, click the Routes button, then check the last checkbox on that dialog.
Not tested, but roughly, what should be happening is each pppX device should be getting enabled with correct routes through each of your providers' networks, but the default route should not get set to pass over any of them.
You should then be able to write a simple script that, for instance, pings the same server from each of the interfaces and chooses the fastest one to set the default route; something like:
I didn't test this completely, but it's roughly what needs to be done; with the addition or modification of using "via whatever_the_default_gw_ip_is" for the ip route add default command. Run this with cron on a regular interval and you have a cheapo system for staying on the "fastest" ISP.
I'm having problems connecting to multiple dongles too. I can initialize connection with one router at a time but not both. Do you get to connect to the internet or it just fails on the second one? (please let me know here aswell-> Why NetworkManager doesn't handle more than one 3g Dongle )
It may help to create separate IP tables with iproute2.
Edit the file
/etc/iproute2/rtc_tables
by simply adding at end something like:Restart the daemon to load the new config. Then you can use a script that runs on ip-up event, like ip-up.local. Something like this may work:
Hope it helps you out.... Maybe you can help me aswell (Why NetworkManager doesn't handle more than one 3g Dongle)