[Spread-users] Re: Please help me understand

John Schultz jschultz at d-fusion.net
Wed Feb 9 16:36:53 EST 2005

Nope, you are still in the dark.  Most probably because I haven't been 
explicit enough. :)

The IP addresses you list in your spread config file are for your Spread 
daemons.  Generally, every daemon address needs to be reachable (i.e. - 
fully routable) by every other daemon address.

You have daemon addresses in two different private networks.  In the 
configuration you gave, when machB_103 daemon tries to talk to machA_100 
daemon it will try to send to IP address  Unfortunately, 
this will go to the machine (if it exists) with that IP on the network and not the network that it intended 

Now, since you mention that you have port forwarding set up from the 
router to the initial machine in those segments you can do this:

Spread_Segment {

Spread_Segment {

And then have your client applications, on all the 192* machines, 
connect to their respective local daemon machine 
( or

The multicast addresses I used are unimportant as those machines are in 
singleton segments, in a private network and the router shouldn't 
propagate any multicasts.  Note, however that Spread uses more ports 
than just the one you list in the config file.  In particular it uses 
the following two ports as well (4804 and 4805 in your case).  So you'll 
want to ensure that these are forwarded from your router as well.

That should work, but I can't 100% guarantee that Spread will work with 
the forwarding you have set up.


apocalypznow wrote:
> Thanks John for your answer.  After reading it, here is what my 
> spread.conf file will look like.  I am providing it here to ensure I've 
> understood what you said:
> Spread_Segment {
>    machA_100
>    machA_101
> }
> Spread_Segment {
>    machB_102
>    machB_103
> }
> Furthermore, machA_100 and machB_102 are port-forwarding 4803 to those 
> machines from their respective routers.  There should be at least 2 
> daemons running, one on machA_100 and the other on machB_102.  machA_101 
>  should connect to the daemon on machA_100.  machB_103 should connect to 
> the daemon on machB_102.  machA_100 and machB_102 should connect to 
> daemons on their localhost.
> Do I get it now, or am I still in the dark?
> John Schultz wrote:
>> apocalypznow wrote:
>>> Hi I'm a noob... so please bear with me.
>>> I am trying to set up 4 machines on 2 networks, which would all join 
>>> the same group "chat01" and hopefully be able to message each other 
>>> using multicast() with either RELIABLE_MESS or FIFO_MESS.
>>> Two machines are at, and their ips are and 
>>>  Two other machines are at and their ips 
>>> are at and  Port 4803 is open on each of 
>>> the two routers.  Networks and are only 
>>> connected on the internet.
>>> I've tried various configurations in my spread.conf file and I can't 
>>> get all 4 machines to see any messages sent to the same group "chat01".
>>> Questions:
>>> 1) How should my spread.conf be set up - specifically the segments 
>>> and anything else?
>> You should probably have two segments corresponding to the two 
>> separate networks -- assuming that by "networks" you mean that 
>> machines within these "networks" can 1 hop broadcast or multicast to 
>> each another.
>>> 2) Where do I run the daemons?
>> You should run the daemons on machines whose IP addresses are 
>> accessible  (i.e. - routable) by all other daemons in the config 
>> file.  So the daemons should be run on machines in those networks that 
>> can reach the daemons on the other network.
>>> 3) How many daemons should I run?
>> This is up to you.  But generally you should run at least one daemon 
>> per network that will have clients and usually even run 1 daemon on 
>> each machine that will have clients.  You run more daemons both for 
>> network efficiency and for fault tolerance.
>>> 4) To which daemon should each machine connect to?
>> Each machine should connect to the closest daemon that it can.  
>> Usually,   this is often a connection to a daemon on the same local 
>> machine. However, since it seems your client machines will be on 
>> private networks that would not be routable by all daemons, you will 
>> probably need to remotely connect to the closest daemon with a public IP.
> _______________________________________________
> Spread-users mailing list
> Spread-users at lists.spread.org
> http://lists.spread.org/mailman/listinfo/spread-users

John Schultz
Co-Founder, Lead Engineer
D-Fusion, Inc. (http://www.d-fusion.net)
Phn: 443-838-2200 Fax: 707-885-1055

More information about the Spread-users mailing list