This discussion is archived
0 Replies Latest reply: Mar 17, 2007 11:40 PM by 807606 RSS

Help? Communication of clients on different networks using ARP-type servers

807606 Newbie
Currently Being Moderated
I thought I posted this about a week ago, but I can't locate it in the forums anywhere so here it is again.
*********************************************************************

Hey to all you great and powerful wizards of Java!

I am not a Java beginner, but far from an expert who has not regularly programmed in Java for a couple of years. I am a grad student taking an IP class and we have been assigned a program which builds on the socket based communication multi-client-server program we previously developed (pretty much a piece of cake). This new program is to "allow for multiple hosts in a network to communicate with other hosts on the same network (ok already done that) and one of two other connected networks (need some guidance with a couple of issues here). Each host knows the 'IP address' of other hosts, but does not know others� physical addresses. Provide an ARP-like server/capability so that packets may be sent throughout the networks (think I may have figured this out, but might need guidance here too)".

Anyway, the following questions may be intuitive to some but I am at a loss myself so any help/guidance/advice (code snippets?!?!?) would be greatly appreciated:

1) I think I have found some code in this forum that handles the IP - physical address conversion, but it seems to only determine the MAC address of the host it executes on using the host�s stdout. This seemed no help at first, but I think I have figured out what needs to be done from what I have read. The following explains how I intend to implement this:

1a. Run this class for each client program so they determine their own MAC address.
1b. Run a proxy ARP process on each sever program which determines the server� s MAC address and requests the MAC address for all the hosts on it�s network. When a server receives an ARP request from a client on another network trying to locate a host on its network, the server responds to the request with it�s MAC address.
1c. Not sure if this function should be part of the proxy, but when server receives a message from a client outside it�s network that knows the MAC of the client it wants to reach the server routes the message.

Does this sound right or am I still clueless?

2) I have not found any useful information which details/explains how I would connect servers on different networks. My initial thought was to do something similar like the connections made in my multi-client-server program where one server acts as the client and the other is the server. Threads would be used to allow multiple server connects to any one server. This seems reasonable, but I have no clue how servers on different networks would find or initiate communication. I feel like I am missing something that should be pretty obvious, but for the life of me I don�t know what it could be.

Any suggestions or insights concerning this implementation?

3) This may be the real dummy of a question, but I am going to ask it anyway. My original client-server network was executes on my home desk top using localhost as the servers IP address. It is unknown to me if the prof (I have an email into her too) is expecting us to implement this multi-network setup using only on workstation) which my gut tells me, dummy, this is most likely not possible or we are to set up our client-server networks on host which all reside on different networks.

3a. Is it even possible to implement a multi-network setup using only on workstation? I download Virtual Box (freeware version of Virtual PC) with the intent of running a couple of virtual systems on my desk to simulate a multi-network setup, but I am not sure if this would really work.

3b. If you can implement a multi-network setup using only on host are the network�s IP addresses the same or are can IP address of the virtual systems be assigned by the admin (me)? This is what leads me to believe this option is not feasible, because how do you provide different IP address for each network? My only conclusion about this topic would to some how configure subnet implementation for each virtual system start with the localhost�s IP address.

3c. Are there any other ways of implementing a multi-network communication setup besides actually using hosts on separate networks? It would much more convenient for me to not have to deal with multiple networks all in different physical locations. Actually with would be totally pain in the A to do it this way so I am HOPING this is not the only solution.

As I stated in the beginning, any help/guidance/advice (code snippets?!?!?) would be GREATLY APPRECIATED!

Thanks in advance to all those who take the time to assist the confused.