[SWLUG] setting up a local network using avahi (bonjour)

Neil Greenwood neil.greenwood.lug at gmail.com
Thu Mar 5 20:48:10 UTC 2009


2009/3/5 Mark Summerfield <mark at qtrac.eu>:
> On 2009-03-03, Daniel Morris wrote:
>> On Tue, Mar 03, 2009 at 01:51:50PM +0000, Mark Summerfield wrote:
>> > Hi,
>> >
>> > Could anyone tell me how to set up nice avahi (bonjour) networking?
>> >
>> > I have a router with 3 network cables: to a desktop, to a Linux laptop
>> > and to a macbook.
>>
>> Does your router have built in name services? Can you populate a webpage
>> with MAC-id, network addresses & names? You basically have a star
>> network with the always-on router at the hub.
>
> Hmmm, that's already beyond me!
>
> However I looked up an old email of Justin's and managed to get ssh and
> scp working between the machines.
>
> Thanks:)
>

'Star' is just a name for a network topology, i.e. its shape.
Think of an old wagon wheel, without the rim. The ends of the spokes
are the different machines, and your router sits in the middle. Each
of the spokes represents a network cable.

The questions Daniel asked, I'll paraphrase. You have a web-based
configuration for the router. Does it have a page where you can enter
a MAC address together with an IP address and a name? This will allow
you to fix the IP addresses allocated by the router to your various
machines.

If you're not sure what a MAC address is, I can tell you how to find
it - at least on Linux. Following is an excerpt of the output on my
machine of 'ip addr show' (ifconfig gives similar output, but is
apparently deprecated):
...
7: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 1000
    link/ether 00:1d:09:49:a8:c1 brd ff:ff:ff:ff:ff:ff
    inet 169.254.7.112/16 brd 169.254.255.255 scope link eth0:avahi

This is the section for my ethernet adaptor, although it's not
currently connected (not sure where it's remembered the IP address
from...). Hmm, having a closer look, maybe it's got the address from
the Avahi configuration - I didn't know I had it installed/configured
though.

The point I was going to make was that the MAC address is on the
second line, following the 'link/ether' text. It's always 12 hex
digits, often split up with colons. If your router allows it, you can
permanently link a specific IP address to a specific MAC address, and
then give it a friendly hostname too.

HTH
Cofion,
Neil.



More information about the Swlug mailing list