Programs and Ports

December 23, 2009 at 17:18:20
Specs: Windows

I have a few questions regardning the following scenario

A computer has multiple NIC cards, say two cards, and each has a different IP address assigned to it (192.168.100.x and 192.168.200.x)


If there is one program (say Program1) that needs to listen on the same ports for both NICs (different IPs), is that possible? Same instance listening on different IPs but same ports


If there are two instances of the same program (again we call it Program1), that have to listen on the different IPs but same ports, is that possible?

See More: Programs and Ports

Report •

December 23, 2009 at 21:08:01
my understanding may be flawed, so don't risk using it to handle life-support systems or manage air-traffic control...
scenario one is performed routinely by servers. That's why both you, at ip# 1 in las vegas, and me, at ip#2 in mud suck west viginia, can both be using FTP to the same server at the same time.
scenario 2 is less routine but i don't see any reason it can't be done and it probably has, perhaps routinely. The idea here would be that if program A intercepts a packet intended for prgram B, (IP address allocated to be monitored by prog.B) it would forward the packet to prog.B, and prog.B would do the same service forwarding packets to prog.A. These programs
would have to be designed to specifically implement this handoff (a local, specialized protocol and object reference - there could be n number of instances of programs running concurrently and having to serve one another). I'm sure it's been done and probably common.
Obtain a set of server software (apache, ubuntu etc) and read the doc.s, or use google, to get more usable advice.

Report •

December 25, 2009 at 06:11:47
Joshua, I would think it would work, since ports exist in context of a "computer" (defined by a name and an IP adress). So, each IP having its own ports being used ... I think it's no problem.

But ... if possible, I would set the ports differently, to eliminate any issue. This is assuming you can, as port 80 is special anyway. There's lots of ports free, so why risk problems unnecessary using certain ones ?

Report •

December 27, 2009 at 16:47:50
Hi all

Thanks for the reply, I will do more searching on Google too. Glad to have your help

Report •

Related Solutions

Ask Question