Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have the following project: I want my computer to use three network interfaces at the same time, assuming that I have three different network interface cards.

I think it will be very hard to make software that uses two different network interfaces at the same time (need protocol analysis, etc..), so for now I want to create a local proxy server listening on different ports that will forward the packet it receives to the network interface associated with the proxy port specified in the software.

I've been programming for quite a long time but I've never made such a project, I understand how to build a local server that listens on different ports, but not how to forward packers to the correct network interface. It is here that I'd like your help.

For now I want to do this on Windows 7 (actually I'm tired of lagging while playing D3, that's why ;p).

Thank you in advance!

PS. If you know of a better way to achieve this objective than using a proxy server, I'm open minded!

share|improve this question

migrated from Oct 19 '12 at 15:59

This question came from our site for professional and enthusiast programmers.

Assuming the choice of route is global, just set the default routes so different IP ranges go through the desired interface. – Useless Oct 19 '12 at 15:45
Could you be a bit more precise pz ? – IggY Oct 19 '12 at 15:48
1 ... PS, this isn't a C++ question as stated. – Useless Oct 19 '12 at 15:51
I do not think it is possible to use routing tables to send packets to different NICs depending on which process sends the packets. I would believe you have to use some virtual network device like a tun/tap device (which involves packet analysis,, or just stop downloading while playing D3 :) – Rolle Oct 19 '12 at 15:56
up vote 1 down vote accepted

What you want is called multihoming. You will need a router that supports it.

Multihoming (Wikipedia)

If you use a linux box as a router, you can achieve this.

Linux multihoming setup

share|improve this answer
This does exactly explain what I needed :… – IggY Oct 19 '12 at 20:25

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .