ssl1324
asked on
Connect two ip addresses in different subnet
I have two computers with two different ip addresses and subnet masks.
Computer1: ip address 10.57.x.x with subnet mask 255.255.255.252
Computer2: ip address 10.1.y.y with subnet mask 255.255.255.248, gateway 10.1.y.z
I need to write a C++ program in Computer1 which connects to Computer2 through an ethernet cross-over cable. What is the best way to do it?
Could it be possible to add another ip address 10.1.y.z in Computer 1 and pretend the gateway to communicate with Computer2? Any suggestions will be appreciated.
Computer1: ip address 10.57.x.x with subnet mask 255.255.255.252
Computer2: ip address 10.1.y.y with subnet mask 255.255.255.248, gateway 10.1.y.z
I need to write a C++ program in Computer1 which connects to Computer2 through an ethernet cross-over cable. What is the best way to do it?
Could it be possible to add another ip address 10.1.y.z in Computer 1 and pretend the gateway to communicate with Computer2? Any suggestions will be appreciated.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
The ip addresses and subnet masks must be fixed. And the communication protocol has to be TCP/IP (i.e. through ethernet crossover cable).
Another requirement I forget to mention is that, Computer2 only accepts the fixed ip address which connects to it (i.e. only accept ip address 10.57.x.x). So Computer2 will check the TCP header and reject the connection if the ip address is not 10.57.x.x.
I have thought about adding another NIC but any other software suggestion will be appreciated.