Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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 stackoverflow.com 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  
bit.ly/QBEgDp ... 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, en.wikipedia.org/wiki/TUN/TAP), or just stop downloading while playing D3 :) –  Rolle Oct 19 '12 at 15:56

1 Answer 1

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 : menistuff.blogspot.fr/2012/02/… –  IggY Oct 19 '12 at 20:25

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.