#252056 - 20/03/2005 14:50
Networking question
|
carpal tunnel
Registered: 20/05/2001
Posts: 2616
Loc: Bruges, Belgium
|
Ok, here's the situation:
I've got both cable and DSL at home. I usually surf by cable, but since it's not entirely stable and reliable, I have the DSL connection in case it's down. Both cable and DSL are connected to my PC via ethernet.
Now, if the cable connection goes down, I simply disable (in software) the ethernet card through which the cable modem is connected, I turn on my DSL modem, dial in and voila: instant DSL connection.
But here's my question:
Now and then, the occasion arises where I could use both connections at once. Eg. I use bittorrent to download two huge files. I usually use the DSL for that because I've noticed it works better for these kinds of applications. This means the cable's ethernet card is disabled.
If I want to do any regular surfing now while I'm using Bittorrent, things are SLOOOOW. Now, my idea was, to enable the cable modem's ethernet card as well and surf via the cable modem. Unfortunately, this doesn't work because my browser obviously also tries to use the (already clogged) DSL pipe.
So, what I would really need is a program with which I could point out which application should use which ethernet card. Eg. Bittorrent ethernet card #1, Firefox ethernet card #2, and which would keep both connections competely separeted from each other.
Does such an application exist?
Thanks!
_________________________
Riocar 80gig S/N : 010101580 red Riocar 80gig (010102106) - backup
|
Top
|
|
|
|
#252057 - 20/03/2005 16:02
Re: Networking question
[Re: BartDG]
|
carpal tunnel
Registered: 08/06/1999
Posts: 7868
|
While not directly answering your question, I used a Twin WAN Router at home for a while for a cable and wireless connection. It works decently, and allows you to specify certain ports to always be routed out a certain ISP. The only reason I recently discontinued use of it was due to plans to get away from the cable company, but still haven't fully done so yet. In fact, I may look to sell mine soon if you are interested. In theory a Linux router could do this too, but I spent many hours trying with no complete success.
|
Top
|
|
|
|
#252058 - 20/03/2005 16:15
Re: Networking question
[Re: drakino]
|
carpal tunnel
Registered: 20/05/2001
Posts: 2616
Loc: Bruges, Belgium
|
Yes, I've also thought about this possibility, but this is not really the way I want to do this. First of all, you said it yourself, it doesn't do 100% of what I want it to do and secondly I don't really need another router right now. (I've alread got a few - don't ask... ). And even if I were to buy that router from you, I would most likely have problems with the US 110 volts standard versus the European 230 volts standard. Too much trouble IMHO. But thanks for your thoughts! Much appreciated!
_________________________
Riocar 80gig S/N : 010101580 red Riocar 80gig (010102106) - backup
|
Top
|
|
|
|
#252059 - 20/03/2005 16:19
Re: Networking question
[Re: BartDG]
|
carpal tunnel
Registered: 20/12/1999
Posts: 31600
Loc: Seattle, WA
|
Quote: First of all, you said it yourself, it doesn't do 100% of what I want it to do
But it does.
He said it could be configured so that certain ports were always redirected to certain WANs. Since web browsing and bittorrent are very specific about which ports they use, such a device could do exactly what you want.
|
Top
|
|
|
|
#252060 - 20/03/2005 16:53
Re: Networking question
[Re: tfabris]
|
carpal tunnel
Registered: 20/05/2001
Posts: 2616
Loc: Bruges, Belgium
|
D'oh! I knew that! (or should have anyway!) Anyway, the hardware approach is really not the one I want to take. Let's just say it like that then.
_________________________
Riocar 80gig S/N : 010101580 red Riocar 80gig (010102106) - backup
|
Top
|
|
|
|
#252061 - 20/03/2005 21:05
Re: Networking question
[Re: BartDG]
|
carpal tunnel
Registered: 20/12/1999
Posts: 31600
Loc: Seattle, WA
|
Gotcha.
It's interesting that there's no built-in way in Windows (that I know of) to bind a specific application to a specifc ethernet card.
However, I think you could accomplish it all in software, simply by using a piece of personal proxy software. Have the proxy port-forward the desired ports to the correct upstream router. Essentially doing the same thing as the hardware router, only doing it within your PC.
Hm. Maybe this could even be done without third-party software using Microsoft's RRAS features. Not sure. But I think you need to have a Server version of the operating system before those features are available.
|
Top
|
|
|
|
#252062 - 20/03/2005 22:19
Re: Networking question
[Re: tfabris]
|
carpal tunnel
Registered: 20/05/2001
Posts: 2616
Loc: Bruges, Belgium
|
Quote:
It's interesting that there's no built-in way in Windows (that I know of) to bind a specific application to a specifc ethernet card.
No, it seems not. That surprised me too. Then again, 99% of all the users (if no more) don't have dual broadband connections like I do, so it's not an issue for them. On the other hand, it would be nice to have the option. Some applications work better on DSL (like bittorrent, Email,...) because the upload pipe is 2x wider than with cable. Others work better with cable because the download pipe is wider there (eg. regular surfing). If I had the choice, I would always use both broadband connections and devide the applications amounst them depending on upload needs...
Quote:
However, I think you could accomplish it all in software, simply by using a piece of personal proxy software. Have the proxy port-forward the desired ports to the correct upstream router. Essentially doing the same thing as the hardware router, only doing it within your PC.
While the cable connects to a router, the DSL modem does not. This modem is directly plugged into the PC (it's an old ISDN DSL modem) and relies on the XP dial-up to work. It's not a router by itself. I imagine this would be a problem. If not, what software could I use to do this? I'm not afraid to tinker a bit with it.
Quote:
Hm. Maybe this could even be done without third-party software using Microsoft's RRAS features. Not sure. But I think you need to have a Server version of the operating system before those features are available.
I don't know about that, but I'm using XP professional. So it's pretty standard stuff...
Thanks for your insights!
_________________________
Riocar 80gig S/N : 010101580 red Riocar 80gig (010102106) - backup
|
Top
|
|
|
|
#252063 - 21/03/2005 02:38
Re: Networking question
[Re: BartDG]
|
carpal tunnel
Registered: 20/12/1999
Posts: 31600
Loc: Seattle, WA
|
Quote: This modem is directly plugged into the PC (it's an old ISDN DSL modem) and relies on the XP dial-up to work. It's not a router by itself. I imagine this would be a problem.
I'm guessing it would still work the same. Both the cable router and the DSL modem need an upstream gateway set somewhere. Even if they get that gateway addres via DHCP, it's still a valid upstream router. I'll bet you could still do it.
Quote: what software could I use to do this? I'm not afraid to tinker a bit with it.
There is a whole class of utilities for Windows called "Personal Proxies", some of them freeware. Mostly only used in special situations, and I think this is specifically one of the situations they're supposed to be able to handle. It's been a while since I messed with one, and I don't remember any names. Perhaps someone else can recommend one?
|
Top
|
|
|
|
#252064 - 21/03/2005 06:14
Re: Networking question
[Re: tfabris]
|
carpal tunnel
Registered: 10/06/1999
Posts: 5916
Loc: Wivenhoe, Essex, UK
|
I don't think proxies are going to work generally on Windows. The root of the problem is getting Windows to talk to two default gateways.
As far as I know you can't do this on Windows, at least not out of the box. You might remember we had a previous thread where I attempted this and ended up with a setup where Windows would ramdomly switch backwards and forwards between the two default gateways.
I expect you might get it to work for things like web browsing. But only if the router itself has a web proxy on it. If you then had a proxy on the Windows box pointed at the web proxy on the router that isn't the default gateway, that would probably work around the default gateway problem for web traffic.
_________________________
Remind me to change my signature to something more interesting someday
|
Top
|
|
|
|
#252065 - 21/03/2005 14:00
Re: Networking question
[Re: andy]
|
carpal tunnel
Registered: 20/12/1999
Posts: 31600
Loc: Seattle, WA
|
Quote: I don't think proxies are going to work generally on Windows
But I've seen these programs and even messed with a few of them. It was a few years ago, but they worked. I just wish I could remember the name of one of them. Google isn't helping me, unfortunately.
Quote: The root of the problem is getting Windows to talk to two default gateways.
Right. What I was thinking is that you could use the proxy to port-forward the web browser ports to one gateway, and the bittorrent ports to the other gateway.
|
Top
|
|
|
|
#252066 - 21/03/2005 15:58
Re: Networking question
[Re: tfabris]
|
carpal tunnel
Registered: 10/06/1999
Posts: 5916
Loc: Wivenhoe, Essex, UK
|
Quote:
Right. What I was thinking is that you could use the proxy to port-forward the web browser ports to one gateway, and the bittorrent ports to the other gateway.
But that will only help you if the routers themselves are running some give of proxy.
A local proxy on the Windows box would only let you punt the traffic off to the router. Unless the router then proxies for you after that you are left with the same problem.
_________________________
Remind me to change my signature to something more interesting someday
|
Top
|
|
|
|
#252067 - 21/03/2005 17:24
Re: Networking question
[Re: andy]
|
carpal tunnel
Registered: 18/01/2000
Posts: 5683
Loc: London, UK
|
Quote: A local proxy on the Windows box would only let you punt the traffic off to the router. Unless the router then proxies for you after that you are left with the same problem.
Quote: While the cable connects to a router, the DSL modem does not. This modem is directly plugged into the PC (it's an old ISDN DSL modem) and relies on the XP dial-up to work. It's not a router by itself. I imagine this would be a problem.
The fact that the PC has two network interfaces suggests that this wouldn't be a problem. You can configure one interface with a higher metric, so that all of the traffic goes there by default. Then, assuming that you get a local proxy that can be configured to always use the other interface, you can explicitly send other traffic that way.
Or did I miss something?
Cheers, Roger.
_________________________
-- roger
|
Top
|
|
|
|
#252068 - 21/03/2005 18:57
Re: Networking question
[Re: Roger]
|
carpal tunnel
Registered: 25/12/2000
Posts: 16706
Loc: Raleigh, NC US
|
We've answered this question many times before.
The problem is with the TCP/IP implementation. Virtually all implementations work by looking at the routing table and finding the best match for the destination address. There used to be an IP flag that would let the source determine the route used by the packet, but it occurred to virtually everyone that this is a security problem (it can be used to bypass NATs, for example) and has been almost universally disabled. Some anal ISPs drop packets that are source routed even if they aren't destined anywhere within their network. Anyway, that isn't going to help.
Fortunately, you're only interested in selecting what interface to use on your side. This is doable, but basically requires a new IP stack. The way almost all OSes work, even if you used interface A's address, it might still go out interface B's interface. (This can cause problems, too, with anal ISPs who think you're spoofing addresses.) So you need something that will specifically use one interface. This requires something that talks directly to the interfaces instead of letting the OS's IP stack do the job as normal. Since you want kind of a general-purpose thing that will work with multiple applications, this basically means you need a new IP stack, and that's not going to happen. (I don't think.) This is basically what happens on the Linux routers that will do what you want.
It's more likely that you can find a proxy server that will do what you want for web access only, but I still think the chances of finding one are slim.
_________________________
Bitt Faulk
|
Top
|
|
|
|
#252069 - 21/03/2005 19:05
Re: Networking question
[Re: wfaulk]
|
carpal tunnel
Registered: 13/07/2000
Posts: 4180
Loc: Cambridge, England
|
Quote: you need a new IP stack
I guess one way to do it would be to run a second OS (inside VMWare, or Bochs, or something like that) and give the second network card over entirely to the emulator. This would be especially useful if one half didn't need much CPU power (e.g. Bittorrent).
Peter
|
Top
|
|
|
|
#252070 - 21/03/2005 21:10
Re: Networking question
[Re: wfaulk]
|
carpal tunnel
Registered: 29/08/2000
Posts: 14496
Loc: Canada
|
So don't do it at the routing table level.
Use iptables forwarding instead, telling it to forward bittorrent connections to one ip, and everthing else differently.
cheers
|
Top
|
|
|
|
#252071 - 21/03/2005 21:15
Re: Networking question
[Re: mlord]
|
carpal tunnel
Registered: 25/12/2000
Posts: 16706
Loc: Raleigh, NC US
|
Using iptables is pretty hard when you're not running Linux. I'm taking him at his word that he's using Windows, and he's already stated that he doesn't want another box.
_________________________
Bitt Faulk
|
Top
|
|
|
|
#252072 - 21/03/2005 21:22
Re: Networking question
[Re: wfaulk]
|
addict
Registered: 29/06/2002
Posts: 531
Loc: Triangle, VA
|
From the sounds of all this it probobly would be easier to just set up a POS pc for the dsl connection and just use it for surfing. I know its not the intended outcome, but it solves the problem.
_________________________
-D
Modifying and Tweaking is a journey,
not a destination................................
MKIIa : 60gig - 040103286 - Blue - v2 + PCATS tuner
MKIIa : 20gig - 040103260 - Blue - v3a8 + Mark Lord Special Edition Cherry Dock
|
Top
|
|
|
|
#252073 - 22/03/2005 06:07
Re: Networking question
[Re: wfaulk]
|
carpal tunnel
Registered: 18/01/2000
Posts: 5683
Loc: London, UK
|
Quote: The problem is with the TCP/IP implementation. Virtually all implementations work by looking at the routing table and finding the best match for the destination address.
I know. My point is this: You have a local web proxy. The best match for localhost is the 'lo' interface. Everything else goes out on the interface with the best metric, 'eth0'.
The proxy is configured to send its traffic to a device on 'eth1's local subnet, so there's no question that the traffic should go out via 'eth0'. That other device then uses its routing rules to forward the web traffic via the other router. Since its routing rules know nothing about the device on 'eth0', they should just go out the other way.
No?
_________________________
-- roger
|
Top
|
|
|
|
#252074 - 22/03/2005 07:22
Re: Networking question
[Re: Roger]
|
carpal tunnel
Registered: 18/01/2000
Posts: 5683
Loc: London, UK
|
Quote: No?
No. Thinking about it on the way to work, and having done some investigation on MSDN, it doesn't appear to be possible to bind a socket to a specific interface on MS' TCP stack -- I thought it was.
Yeah, any local proxy will still use the default routing rules, which won't do what you want. You'd need a proxy on a different box.
For more information on how Windows routes outbound packets, see this.
_________________________
-- roger
|
Top
|
|
|
|
#252075 - 22/03/2005 11:52
Re: Networking question
[Re: wfaulk]
|
carpal tunnel
Registered: 20/05/2001
Posts: 2616
Loc: Bruges, Belgium
|
Quote: Using iptables is pretty hard when you're not running Linux. I'm taking him at his word that he's using Windows, and he's already stated that he doesn't want another box.
Guys, thanks for all your thoughts on this!! Really appreciate it!
It's true Bitt, I am using XP, and though I would LOVE to start using Linux, I haven't found the time to start learning it. I will, one day...
_________________________
Riocar 80gig S/N : 010101580 red Riocar 80gig (010102106) - backup
|
Top
|
|
|
|
#252076 - 22/03/2005 14:47
Re: Networking question
[Re: Roger]
|
carpal tunnel
Registered: 25/12/2000
Posts: 16706
Loc: Raleigh, NC US
|
Quote: The proxy is configured to send its traffic to a device on 'eth1's local subnet, so there's no question that the traffic should go out via 'eth0'.
I know you already retracted what you said, but I thought I'd add more. Insult to injury, I guess. Sorry.
First, I assume you meant those two interfaces to be the same.
How do you configure the proxy to send its traffic to a device on a particular interface? (Let's ignore the ultimate destination for now.) By having the best route for the packet pointed at that interface or using source routing. While there's nothing on his network, most likely, that would prevent source routing, there's nothing that will produce source routing. That leaves the normal best-route procedure. This would mean that to make it go there, it would need to be destined for that subnet, which isn't useful, it would need to be the default route, which means all traffic would go that way, or you'd need a static route, and there's not a practical way to figure out how to add such static routes, or to actually add them.
I'd like to point out that there's nothing in the IP specification that dictates that this is how hosts must work. That is, it would be perfectly within spec for a computer to determine where to send packets on a per-app basis. It's just that nothing like that actually exists outside specialty IP stacks for routers, Linux-based or otherwise.
_________________________
Bitt Faulk
|
Top
|
|
|
|
#252077 - 22/03/2005 15:06
Re: Networking question
[Re: wfaulk]
|
carpal tunnel
Registered: 18/01/2000
Posts: 5683
Loc: London, UK
|
Quote: First, I assume you meant those two interfaces to be the same.
No, I didn't. I meant that the local proxy is configured to send its traffic via 'eth1', and that the routing tables cause everything else to go via 'eth0'.
Quote: How do you configure the proxy to send its traffic to a device on a particular interface?
You can't, without either facilities in the hosts TCP/IP stack (which don't exist -- I thought they did), or by using source-routing (which isn't supported).
Quote: and there's not a practical way to figure out how to add such static routes, or to actually add them.
The Windows stack does provide an API to modify the routing tables. I'm not sure how dynamic it is, and I'm unconvinced about having a SOCKS proxy f*ck with the routing table before it makes the outbound connection.
_________________________
-- roger
|
Top
|
|
|
|
#252078 - 22/03/2005 15:20
Re: Networking question
[Re: Roger]
|
carpal tunnel
Registered: 25/12/2000
Posts: 16706
Loc: Raleigh, NC US
|
Okay, I guess I'm misreading what you said. I still am. Still, what I'm saying is what you meant, I think.
Actually, I have a process that's adding temporary static routes right now -- Azureus. I don't know *why* it's doing so, and it's causing problems with my VPN, but it's doing it, and would be working fine if my VPN client wasn't so anal. Of course, Azureus isn't doing it on anyone else's computer. Go figure.
_________________________
Bitt Faulk
|
Top
|
|
|
|
|
|