My name is Marcelo, and i am a troubled programmer.
I have a difficult question about TCP/IP networking and i hope someone does have an answer and solution to this.
I´m writing a component which will allow a bigger programm to detect other copies of the same programm in the local network and passing information between all of those processes.
Theres no limit to the local network, it can have as many routers, computers, subnets. The local network can be connected to the internet throw ADSL/model/ISDN/anything. It even can have wrong configurations (loops that make broadcast and multicast arrive twice on each computer).
My programm currently uses multicast/UDP to make contact with the other processes running the same component and then establish TCP connections.
The programm should be installed with no configuration, completly automatically and run after any change in the net configuration. Since i know nothing about the configuration of the net where the programm will be installed, the programm can be running on a computer which has a direct connection to the internet (i mean that acts as the router from the LAN to Internet).
THE PROBLEM: I need to make sure that my programm sends/gets no package outside the LAN!!!!
The problem is only reduced to the initial HandShaking throw multicasting/UDP.
My first approach to the solution is to set the TimeToLive of the multicast messages to 32 which is supposed to mean that the message only reaches the local network.
However, DO YOU THINK I CAN SLEEP WELL TONIGHT? WILL THIS WARRANTY ME THAT NO PACKAGE WILL GET OUTSIDE THE LAN?
Imagine for example that my programm is running in the same computer that acts as the router to internet, if my programm throws a multicast message to all the interfaces of the computer, will the operating system stop the multicast message to reach the internet because of that 32 in the TTL? I am not sure about this, does anyone has any experience related to that?
And something more, my first approach only covers the issue of not sending a message outside, what about not getting/accepting a message from outside??? i have no idea what to do about that.
Well, thank you if you readed till here, any help will be greatly thanked....