[avahi] Mutli-homed server problem
lennart at poettering.net
Tue Apr 25 15:30:38 PDT 2006
On Wed, 12.04.06 21:51, Stuart Morris (yahoo at xover.co.uk) wrote:
> The machine I am running Avahi on (local name "ruth") has two IP
> addresses: eth0 is a "real world" ip (e.g. 22.214.171.124) and eth0:1 is
> a private address (e.g. 192.168.0.84).
> Avahi appears to bind to both addresses. If I publish a web service
> it shows up as ruth.local. but insists on returning the 126.96.36.199
> IP address. As the service I'm trying to publish is for internal
> consumption only and the web server is only listening on the internal
> IP I really want it to return the internal IP.
> So here is the question... How can I force Avahi to bind only to one
> of the network devices and/or how can I force it to return the
> internal IP address for ruth.local. ?
> Or, have I misunderstood some fundamental zeroconf/Avahi principle?
Avahi treats all network interfaces completely independently. It will
announce a host name record for the external IP address on the external network (and only
there) and an another one for the internal IP address on the internal
network (and only there).
Unless you enabled some kind of bridging the address records for the
external IP address should never be seen in the internal net and vice
On the machine itself it depends on the routing and chance which
record is seen it which is not.
Avahi currently doesn't allow you to disable specific interfaces by
the name. However you can use a simple trick: Avahi will ignore
interfaces that have no MULTICAST flag set. Since you probably don't
want to use any multicasting on the external interface anyway, just
remove that flag ("ifconfig eth7 -multicast") and Avahi will never
touch the device.
Lennart Poettering; lennart [at] poettering [dot] net
ICQ# 11060553; GPG 0x1A015CC4; http://0pointer.net/lennart/
More information about the avahi