Identify machines behind a router uniquely based on ipaddress

Posted by Amith George on Stack Overflow See other posts from Stack Overflow or by Amith George
Published on 2010-04-22T09:49:17Z Indexed on 2010/04/22 9:53 UTC
Read the original article Hit count: 296

Filed under:
|
|
|

Some background first. I have a .net client agent installed on each of the machines in the lan. They are interacting with my central server [website] also on the same lan.

It is important for my website to figure out which of the machines can talk to each other. For example, machines of one subnet cannot directly talk to machines of another subnet without configuring the routers and such. But machines in the same subnet should be able to talk to each other directly.

The problem I am facing is when the lan setup is like in Figure 1.

Figure 1

Because Comp1, Comp2 and Comp3 are behind a router, they have got the ipaddress 192.168.1.2 till 192.168.1.4. My client agent on these machines report the same ipaddress back to the server. However, machines Comp4, Comp5 also have the same ipaddresses.

Thus, as far as my server is concerned, there are 2 machines with the same ipaddress. Not just that, because the subnet mask is 255.255.255.0 for all machines, my server is fooled into thinking that Comp1 can directly talk to Comp5, which is not possible.

So, how do I solve this? What do I need to change in my client or in my server, so that I can support this scenario. These two are the only things in my control.

© Stack Overflow or respective owner

Related posts about networking

Related posts about router