Asynchronized Internet Connections? 12
Zid asks: "I've got a cable modem, and the apartment I live in has a T1. The problem I have is that my cable goes out constantly, and the T1 is shared among the entire complex (200+ people) and it's behind a 3com NAT, so I'd like to be able to have my Linux box (which is a Masquerade box for the cable right now) to be able to automatically switch over to the T1 as a backup when cable goes out. My second question is whether it's possible to use the T1 as the uplink and cable as the downlink since the T1 can upload 4 times faster than the cable can."
What? No posts? (Score:1)
Something weird's going on.. this story seems to be only in "Ask Slashdot", but not on the main page..
Of course, by the time I've posted this it might be fixed.
man route? (Score:1)
As for incoming/outgoing split, it *is* possible, since satellite internet feeds do it (incoming through satellite, outgoing through modem). Perhaps some ipchains rules would be able to rewrite the packets enough?
Re:What? No posts? (Score:1)
Sockets (Score:1)
When you open a connection from one computer to another, it is done as a socket. When done using IP, you have a socket between IP.A:port1 and IP.B: port2. So, if you send a packet out your T1 with an address that belongs on that network, your return traffic will come back over the T1, because that's the correct route to get to the socket.
To do what you want to do, you'd have to send the packets on the T1 network with your IP address from your Cable connection. That is called spoofing and
As for fail-over:
1. Determine the IP address of your preferred gateway.
2. Ping it once a minute.(using cron)
3. When the ping fails, change your default route to the other gateway with a route command.
This requires a bit of shell scripting, but should work. Note that all your connections will reset. Of course, this will happen whether you fail-over manually or automatically unless you are spoofing your cable IP and the T1 fails in which case you'd go back to using your cable IP the way it was intended.
--
Need one IP address. (Score:2)
In theory this is possibal. However it won't work well.
In theory your linux box just switches to the other connection, no problem. (Detection is a bit of a pain, but can be done) In parctice it doesn't help much. All your connections are to your cable IP address, which no longer reaches you. (it gets routed to your cable company who cannot reach you so they throw it away)
If you have a friend with several stable IP addresses and a good connection, then you can probably tunnel to them (with some work). Otherwise your problem isn't sending data out the backup line, it is getting data to come back over that line without losing connections.
If anyone has a solution please let me know - I'm on a dialup with poor line quality. I have a big problem with programs trying to hold a connction longer then the line will stay up at a time.
Use gated (Score:1)
I don't think its possible to have all incoming packets come through the cable modem and all outgoing packets go through the T1. If your packets leave via the T1 they will have a different IP address than if they leave over the cable modem. To do this you would need an upstream router to readdress packets to the other ip address.
You may want to look at Linux 2.4 Advanced Routing HOWTO [unc.edu] which lets you set up routing rules based on things other than destination address, including port number which may be of interest to you.
Re:man route? (Score:1)
The fail-over could be more easily implemented. You'd have a couple of seconds of downtime, but that's better than a few minutes or an hour 8^)
Can I just say I envy your problem (Score:1)
Re:man route? (Score:1)
Look at sat ISP. Have a friendly host in the Cloud (Score:1)
http://varinfo.direcpc.com/what/work.html
Direcpc uses an application level proxy using push methods :
"The process in detail: When a customer requests a URL, the request gets delivered by modem to the ISP. However, before that request leaves the customer's PC, the DirecPC software attaches a tunneling code to the URL. That code instructs the ISP to forward the URL request to the DirecPC Network Operations Center (NOC). Once HNS receives the request, the tunneling code is stripped away and the request is forwarded to the appropriate site from which the desired content is retrieved. The NOC then uploads the information to the Hughes satellite, which beams it down to the customer's DirecPC dish and into his or her PC."
http://hypercable.net/satellite/isp/body_isp.ht
If you do not want to proxy at application level, I would say that unless you have a host somewhere up in the Cloud, that you can tunnel both your connexion to (why not using specially load balanced multilink ppp over pptp) and let do the splitting, there is no way a connexion is going to originate somewhere and come back around another way.
Related, but much easier question (Score:1)
Re:Related, but much easier question (Score:2)