Complete.Org: Mailing Lists: Archives: freeciv-dev: November 2003:
[Freeciv-Dev] Re: (PR#6707) Announce server on LAN
Home

[Freeciv-Dev] Re: (PR#6707) Announce server on LAN

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: andrearo@xxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#6707) Announce server on LAN
From: "Raimar Falke" <i-freeciv-lists@xxxxxxxxxxxxx>
Date: Mon, 3 Nov 2003 08:25:56 -0800
Reply-to: rt@xxxxxxxxxxxxxx

On Sun, Nov 02, 2003 at 01:51:03PM -0800, andrearo@xxxxxxxxxxxx wrote:
> > > > Nice idea. I have a problem however with the constants. Why TTL=4? Why
> > > > not 3 or 5?
> > >
> > > Good question.. It depends about how far you want the packet to reach,
> > > since TTL is decremented every time a packet goes through a router.
> >
> > > It could probably also be 3 or 5, depending about how you define
> > > "LAN".
> >
> > And that is the point. If we hardcode it in the code we have to choose
> > a good value. A not hardcoded solution would be better. Is this
> > possible?
> 
> Do you want TTL as a runtime parameter to the client and server? I've
> never used any software that requires you to do that.
> I can't think of another way to set the TTL.
> 
> > > > Why a SERVER_LAN_GROUP of 225.0.0.1? Can't this be
> > > > autodetected somehow?
> > >
> > > The server and client have to be in the same multicast group.
> >
> > Uhh I overlooked this. I assumed that the patch uses a broadcast. So
> > what requirements are needed to use multicast? What setup must be done
> > to enable it? Where do I have to set 225.0.0.1 to join this multicast
> > group?
> 
> As a user you don't have to setup anything. The application layer
> software in the client and server tells the kernel to give it
> packets from the multicast group.  I found this useful:
> http://www.tldp.org/HOWTO/Multicast-HOWTO-2.html

Looking at this and pinging around on some systems I got responses
when I ping 224.0.0.1 but no answer when I used 225.0.0.1. This is
logical from the above URL:

   224.0.0.1 is the all-hosts group. If you ping that group, all
   multicast capable hosts on the network should answer, as every
   multicast capable host must join that group at start-up on all it's
   multicast capable interfaces.

This means that none of the other hosts which answered to 224.0.0.1
are part of 225.0.0.1.

In addition the URL states:

   In any case, range 224.0.0.0 through 224.0.0.255 is reserved for
   local purposes (as administrative and maintenance tasks) and
   datagrams destined to them are never forwarded by multicast
   routers.

So if we choose 224.0.0.1 we know that all hosts are on this group AND
we know that the TTL is irrelevant since the packets are routed.

The only problem I see is that the server is behind a router. So how
do you define LAN?

If all this is correct I'm favoring as the default a scan in 224.0.0.1
with no special TTL and (optionally if you want to code it) "an export
mode" where you can input a special multicast group and optionally a
TTL.

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
  One nuclear bomb can ruin your whole day.



[Prev in Thread] Current Thread [Next in Thread]