[avahi] Avahi bound to an IP address.

Lennart Poettering lennart at poettering.net
Sun Oct 26 07:24:03 PDT 2008


On Fri, 24.10.08 10:17, Ian Lambert (ilambert at breakawaysystems.com) wrote:

> Hi all.

heya!

> I've been developing a linux-based product with a web-based
> configuration. The network configuration consists of two interfaces; one
> "Real" (eth0 192.168.1.xx), and one "Virtual" (eth0:1 192.168.2.10).
> 
> I was wondering if there was a way to prevent avahi from assigning
> the .local domain to the "virtual" interface, as the 192.168.2.xx is
> meant as a "last resort" sort of way to configure the system.

The short story:

Avahi doesn't have a configuration switch to ignore specific local IP
addresses.

The longer story:

Alias interfaces do not exist on Linux anymore -- since kernel
2.2. Instead you simply have a single interface with multiple
addresses assigned -- which may be labeled. Obsolete network
configuration tools like ifconfig show that in a way that is
compatible with Linux 2.0 era alias interfaces.

Use the modern tools (i.e. "ip") for dumping network
configuration. They will show things properly.

IP Adresses assigned to interfaces can have a "scope". Generally Avahi
will prefer IP addresses with "global" or "site" scope over those with
other scope. If multiple addresses with the same scope exist it is not
defined which one Avahi picks. To achieve what you want to do you
could simply assign a local scope to the address you want avahi to
ignore. Again, use the modern "ip" tool for this.

ifconfig is obsolete, misleading, evil. It would be great if distros
would finally see the light and not install it anymore by default.

Lennart

-- 
Lennart Poettering                        Red Hat, Inc.
lennart [at] poettering [dot] net         ICQ# 11060553
http://0pointer.net/lennart/           GnuPG 0x1A015CC4


More information about the avahi mailing list