Hi guys,
I'm working in a group with 2 buddies on a project for the University.
We're pretty advanced into it but there's something in which we're currently stuck.

Main Info of the Project :

We're supposed to run a makeinstall.exe in a computer and that computer shall start running a banner in the terminal from one side to the other till others computers join the network and then the banner is supposed to go to another computers.

How far have we gone into this :

I think we almost have it all.
We can currently send the banner to other computers in the network by knowing their IP.

So, what's our problem ? :

Our teacher will run the makeinstall. Fine, he'll start the server.
Now, we're supposed to know the teacher's IP so can log into it (thing is during the presentation after he install makeinstall and we run our program it's supposed to run alone).

Solutions we came so far :

If our computers are in the same network as our teacher we could simply broadcast a request to the network and since he's gonna be the only one listening he would reply with his IP.

Now, the problem is Different networks.

We have no idea how to do it for different networks. You guys have any theoretical ideas that could help us out ?