C Board  

Go Back   C Board > General Programming Boards > Networking/Device Communication

Reply
 
LinkBack Thread Tools Display Modes
Old 08-10-2004, 06:48 AM   #1
Registered User
 
ekymk's Avatar
 
Join Date: Aug 2004
Posts: 4
Question Sockets, multi home, multicast, security, complicated issue

Hi,
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....
Bye,
Marcelo

Last edited by Salem; 08-10-2004 at 06:54 AM. Reason: Removed font size abuse - we are able to read regular sized text
ekymk is offline   Reply With Quote
Old 08-10-2004, 10:23 AM   #2
Registered User
 
Join Date: Nov 2001
Posts: 1,348
Why did you decide on UDP instead of TCP?

Kuphryn
kuphryn is offline   Reply With Quote
Old 08-10-2004, 01:16 PM   #3
Registered User
 
ekymk's Avatar
 
Join Date: Aug 2004
Posts: 4
Cool

Quote:
Originally Posted by kuphryn
Why did you decide on UDP instead of TCP?

Kuphryn
Because multicasting is not possible using TCP
ekymk is offline   Reply With Quote
Old 08-10-2004, 02:52 PM   #4
and the hat of marbles
 
Sang-drax's Avatar
 
Join Date: May 2002
Location: Lund, Sweden
Posts: 2,041
Quote:
Originally Posted by ekymk
DO YOU THINK I CAN SLEEP WELL TONIGHT? WILL THIS WARRANTY ME THAT NO PACKAGE WILL GET OUTSIDE THE LAN?
I've never actually used multicast, but I think you can sleep well. A time-to-live of 32 should restrict the packages to the local network(s).

But according to this site:
Quote:
Nobody knows what "site" or "region" mean exactly. It is up to the administrators to decide what this limits apply to.
I thought multicast didn't work over the Internet anyway. Most routers has multicast disabled.
__________________
Last edited by Sang-drax : Tomorrow at 02:21 AM. Reason: Time travelling
Sang-drax is offline   Reply With Quote
Old 08-13-2004, 01:31 AM   #5
Registered User
 
ekymk's Avatar
 
Join Date: Aug 2004
Posts: 4
Unhappy doesn't anyone know for sure?

doesn't anyone know for sure?

Last edited by Salem; 08-13-2004 at 06:29 AM. Reason: I really don't care for your font abuse
ekymk is offline   Reply With Quote
Old 08-13-2004, 01:33 AM   #6
Registered User
 
ekymk's Avatar
 
Join Date: Aug 2004
Posts: 4
Talking forgot to mention...

If multicast doesn´t work over internet... then how programms like Kazaa work?

Last edited by Salem; 08-13-2004 at 06:30 AM. Reason: OK, this will be the last time I do this
ekymk is offline   Reply With Quote
Old 08-13-2004, 02:12 AM   #7
and the hat of marbles
 
Sang-drax's Avatar
 
Join Date: May 2002
Location: Lund, Sweden
Posts: 2,041
Here's the deal..

In IPv4 (the current version used) , multicast isn't compulsory. Many routers has multicast disabled.
For IPv6 on the other hand, mulitcast must be implemented.

Kazaa doesn't use multicast at all, it uses many unicast connections.

Edit: some code http://www.ipmulticast.com/content/category/4/72/30/

OK, After some quick research I can say that at least some ISP has multicast enabled.
__________________
Last edited by Sang-drax : Tomorrow at 02:21 AM. Reason: Time travelling

Last edited by Sang-drax; 08-13-2004 at 03:03 AM.
Sang-drax is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Security Issue with C# abachler C# Programming 4 01-05-2008 03:11 AM
IPv6 multicast example code Sang-drax Networking/Device Communication 7 07-25-2005 09:26 AM
Security on automated home stimpyzu A Brief History of Cprogramming.com 4 04-11-2004 01:14 AM


All times are GMT -6. The time now is 02:43 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22