Can I associate 1 instance of an app with a 2nd network connection?

Ichinisan

Lifer
Oct 9, 2002
28,298
1,235
136
I need to run two instances of my IRC client (mIRC32) simultaneously with one using my dialup connection and the other using my broadband connection. Is this possible using Windows XP Professional? Can any operating system do this?

If I created my own operating system, it would be designed around software "environments" and hardware associations.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
It's technically possible, I can think of a few hack-ish ways to do funky things like that with iptables on Linux, but I have no idea how you'd do it in Windows.
 

Ichinisan

Lifer
Oct 9, 2002
28,298
1,235
136
Perhaps this would require a "Server" version of Windows.

Except for manually browsing network shares, I do not see another reason for Windows to support multiple network connections enabled simultaneously. If multiple connections are enabled, it seems logical that you might need to specify which one to use for a specific application. It wasteful to allocate system resources to a VMware virtual machine just to do this. :(

Too bad I don't have elite Linux/programming skills like you, nothingman. :(
 

Zucarita9000

Golden Member
Aug 24, 2001
1,590
0
0
What happens if you connect with the dial-up, star mIRC, activate the LAN connection, start another mIRC?

Nevermind, I'm talking crazy. I suppose both would use the dial-up...
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
Nevermind, I'm talking crazy. I suppose both would use the dial-up...

If the LAN connection sets a default route after it's up, both would probably be rerouted through it.
 

mobly99

Senior member
Apr 27, 2001
260
0
0
Are you trying to connect to the same server from two different IP addresses or just connect to 2 servers at the same time? If the latter, you can have 2 instances of mIRC running at the same time, just add a route for the second server that you want to connect to going out the second interface.

mIRC has an option to bind to a specific IP address in Connect-Options -Advanced button however, Windows only has a single route table and it doesn't matter which interface it is bound to - if you are connecting to the same server from 2 diferent interfaces there can only be one route to that server, it will be routed out the same interface resulting in asymetric routing. As long as you do not have any firewall before the second interface, you should still recieve the reply traffic there.

-Dave
 

Ichinisan

Lifer
Oct 9, 2002
28,298
1,235
136
I need to connect with two different identities and two different IP addresses. I know what it sounds like, but I'm not trying to be an IRC leech :)

Thanks for the tips. I know nothing about configuring route tables, but I think my brother can set up one on my computer. He once showed me that you can redirect www.disney.com to a pornographic site (as a joke of course).

During DCC communication, packets do not travel across the irc server, right? I think that DCC communication would still travel accross the primary connection, so I would have to configure a route for each user I interact with if I am going to maintain different identities. Perhaps if I learn a few things about mIRC scripting...
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
He probably just edited the hosts file.

Your best bet is to just find someone who'll run a bnc proxy for you, that way you appear to have their IP address.
 

Ichinisan

Lifer
Oct 9, 2002
28,298
1,235
136
Well that's disappointing to find that there's no way at all to do this with Windows :(
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
It's nopt possible because there's not really any way to have 2 default routes, they're called default for a reason. If you were using 2 private networks, say eth0 was 10.1.1.1 and eth1 was 127.30.0.1 and you connected to an IRC server at 10.1.1.15 and an IRC server at 127.30.0.15 they would use their respective interfaces. But since you have a default route that goes out one interface Windows looks and sees the IP of the IRC server is on the Internet, since it's not on a local network it sends the packet out the default interface to the default gateway in hopes that the gateway knows the next hop, etc until it reaches that IRC server. Since both IRC servers are on different networks but neither is local, they both go out the default gateway.
 

Ichinisan

Lifer
Oct 9, 2002
28,298
1,235
136
Right. That behavior is what I was hoping to bypass. If only Windows had the option! I want to associate an IP address from a secondary (not default) connection for a specific application. I want all network traffic from this instance to go through the secondary connection, as if the first did not exist. If this was done by the Operating System, the program wouldn't even have to be aware of the multiple connections at all. Though logically feasable; alas, it is impossible with Windows XP because WinXP does not have such capability.

I wish I had access to the source.*grumbles...
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
You shouldn't need the source, you could probably do that with a QoS type driver.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
I'm not exactly sure where they fit in, in the heirarchy. My Windows device driver knowledge is extremely limited, but I assume it's possible. If you're really interested msdn.microsoft.com would probably be a good place to start.
 

MysticLlama

Golden Member
Sep 19, 2000
1,003
0
0
Actually, I think I've thought of a way you might be able to do this, though you'd have to reconfigure it each time you got online.

Let's use for an example that you want to get on Dalnet as two different people / IPs.

First, you need to decide on two different Dalnet servers that are on different IPs.

In example, you choose these two:
test1.dal.net 10.30.40.50
test2.dal.net 10.80.52.69

Now for each one of these you'll need to make a separate route to a different interface.

So, something like this:

route add 10.30.40.0 mask 255.255.255.0 xxx.xxx.xxx.xxx [gateway of your broadband] IF 1 (this is the interface statement)
route add 10.80.52.0 mask 255.255.255.0 xxx.xxx.xxx.xxx [gateway assigned by dialup] IF 2 (interface number for dialup, could be another number...)

Then when you open two mIRC clients, when you connect to the two aforementioned servers that you have decided on, the route statements should make them go out on separate interfaces.
 

CZroe

Lifer
Jun 24, 2001
24,195
857
126
OK, I think I understand that. How would I do this for two network cards with the same cable ISP? My cable co leases a real outside IP address for every PC I can connect! If I connect the same PC twice with two network cards, I *will* get two Internet-routable IP addresses. In fact, they aren't even always on the same subnet or dns. Some start with 24.240, 24.241, 24.216, etc

Is there a way to do this? What about when they happen to be the same subnet and therefore the same gateway? Would I have to make my own gateway for each through another PC? :( I'm thinking I can run VMWARE and tell it to use each card's IP as a gateway.