Gravatar

nss-mdns and multihoming

Hello, gents,

 

I would like to configure nss-mdns to prefer certain network interfaces for multicast DNS resolution, because I have a multihomed / always-on VPN system and sometimes nss-mdns returns address of the VPN when I am on the home network, causing all sorts of problems. What I would like is for nss-mdns to prefer resolving a host name X.local discovered on the local interface (wlan0) whenever a X.local machine is found on avahi's cache, and, if not, then return the IP address for the host name X.local on the VPN interface (tap0).

 

How to tell nss-mdns to do this?

Nathanael D. Noblet | 30 Jan 20:39
Picon

Avahi Signalling that it is going offline??

Hello

   I have a few devices that have a .service file in 
/etc/avahi/services. It works well I can see the service etc. However my 
administration app which is using avahi to detect machines coming 
online/offline in a link-local setup never knows when they disappear 
because they are always there. The devices offering the service are 
portable so go to sleep and move around on the network. So I'm wondering 
if there is a way the avahi-daemon can signal that the service/device is 
going offline so I get the notifications? When I first started and had 
an actual app listening it was just somewhat built in when you 
unregistered, however now it never does that.

I'm basically using the service to help detect when the devices are 
online since the service I want to use is always there when the devices 
are available. If that makes any sense.

Thoughts?
--

-- 
Nathanael d. Noblet
t 403.875.4613
Bob Verma | 6 Dec 18:12
Picon

Re: Need Avahi Android patches submittes for Ticket 354

Hi All:
 
The mail bounced as exceeded the size limit. So just sending without the attchment.
The key is I needed the patches that were submitted as part of the Ticlet#354 (/355)
I was unable to download the patches myself as the server is timing out also notes it was hard to reliably browse the tickets in the system as the server is timing out (I have a good internet connectivity I am suspecting slow connection from the server, I am accesing from USA).
 
Regards
Bob
 
On Mon, Dec 5, 2011 at 5:32 PM, Bob Verma <intrigquest-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
Hi All:
 
I see that some one (asoliverez_ccu5) submitted patches for building under android as per the ticket#354.
I am having trouble downloading those patches.
I would appreciate if some one can send met those pacthes as attchement.
 
Attached please find the Ticket 354 details that I am refering to above.
 
 0001-Add-Android-support.patch (39.7 kB) - added by asoliverez_ccu5 weeks ago.
Add android support ¦ 0002-Add-uninstalled.pc.in-files.patch (2.0 kB) - added by asoliverez_ccu5 weeks ago.
 
I am working on getting avahi built on android platform.
 
Regards
Bob 

marty | 22 Nov 06:06
Picon
Favicon

running link local address on one interface, dhcp on another

I want to learn more about how avahi and link local addresses work (I'm generally an expert on traditional
tcp/ip networking, zeroconf is new to me).

I have a machine running fedora 13 with two ethernet interfaces on the same lan (dell).

One interface (eth0) is dhcp.  I want the other interface to be link-local.  I execute
avahi-autoipd eth1.
For good measure, I changed /etc/avahi/avahi-daemon.conf to

allow-interfaces=eth1

(but it made no differences.


On remote machines, when I ping the link local interface, I want to see the MAC address of eth1 being
used.    What I'm seeing is eth0 bound to the link local ip address for eth1.

My target machine looks like:
[root <at> dell init.d]# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:C0:9F:12:33:6A  
          inet addr:192.168.0.11  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: fe80::2c0:9fff:fe12:336a/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:2724 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1207 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:250992 (245.1 KiB)  TX bytes:153082 (149.4 KiB)

eth1      Link encap:Ethernet  HWaddr 00:E0:4C:D0:1A:9D  
          inet6 addr: fe80::2e0:4cff:fed0:1a9d/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:11116 errors:0 dropped:0 overruns:0 frame:0
          TX packets:60 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:1845507 (1.7 MiB)  TX bytes:10113 (9.8 KiB)
          Interrupt:27 Base address:0x2000

eth1:avahi Link encap:Ethernet  HWaddr 00:E0:4C:D0:1A:9D  
          inet addr:169.254.86.144  Bcast:169.254.255.255  Mask:255.255.0.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          Interrupt:27 Base address:0x2000

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:144 errors:0 dropped:0 overruns:0 frame:0
          TX packets:144 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:15090 (14.7 KiB)  TX bytes:15090 (14.7 KiB)

[root <at> dell init.d]# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.0.0     0.0.0.0         255.255.255.0   U     1      0        0 eth0
169.254.0.0     0.0.0.0         255.255.0.0     U     0      0        0 eth1
0.0.0.0         192.168.0.1     0.0.0.0         UG    0      0        0 eth0

On another machine (asus)
: leisner <at> asus 11:33:14;arping -I wlan1  169.254.86.144
WARNING: interface is ignored: Operation not permitted
ARPING 169.254.86.144 from 192.168.0.155 wlan1
Unicast reply from 169.254.86.144 [00:C0:9F:12:33:6A]  6.427ms
Unicast reply from 169.254.86.144 [00:C0:9F:12:33:6A]  2.097ms
Unicast reply from 169.254.86.144 [00:C0:9F:12:33:6A]  1.779ms


I would expect a ping to 169.254.86.144 from a remote machine
would return a MAC address of  00:E0:4C:D0:1A:9D .  It seems like the kernel "knows"
what's going on.

marty



Picon

Service type - using an existing one or registering our own? - pls advice

Hi guys,

Thank you so much for the work you have put in towards Avahi - truly
appreciate it :)

A few of us have been working on our open source (GPL) project called
eBrainPool (http://ebrain.in). eBrainPool aims at allowing software to
be discovered and used from any device around you. The eBrainPool
client allows users can discover software on other devices in the
local area network or create an ad-hoc mesh network (we currently use
Olsr) of devices and use software off each other. X Windows (via ssh X
forwarding) allows for using software remotely and mitigating
architectural differences between the devices. One of the design goals
is also that a user should be able to use remote software from this
resource pool of devices but still work with his local data (via
fuse).

Currently we are using the Olsr routing protocol to create a mesh and
we have a custom olsr plugin that aids in discovery. This ties us too
strongly to olsr though and as has been pointed out by many in the
community that this is bad architecture. It would make much more sense
to use Avahi for local network discovery and maybe DHT/Telehash etc
for discovery over the Internet.

I am very new to Avahi / Zeroconf and currently am a little uncertain
as to which service type I should be using ideally. Should I be using
one of the pre-registered service types - such as presence? or would
it be better to have our own service type registered with IANA (not
sure of the process or how difficult or easy it is or even if is
possible and how long this takes) ?

The problem as I see with using a service type such as presence is
that other clients such as Jabber may not realize that our client is
not a messaging client and that may possibly cause some weird
behaviour in a network with jabber clients etc.

I'd sincerely appreciate hearing from people more well versed in this
than I am as to what is considered the correct approach here.

Thank you so much for taking the time and sincerely appreciate the help.

Bye for now
Jeetu
ebrain.in | Beehive Computing
Discover and run software from any device around you - an open source
(GPL) project
Daniel Stonier | 31 Oct 08:48
Picon
Gravatar

Handling clients that drop out or disconnect

Hi,

We have a network that is constantly having nodes (computers) for which a wireless connection drops out, or the node moves out of wireless range. When this happens, computers that are still connected will still be able to browse the missing clients. The problem is in resolving them - sometimes they can continue to be resolved (is this just using a cached status?) and sometimes resolving ceases to work.

I've also experimented with a c++ implementation, getting a client to call avahi_service_resolver_new(...) whenever it wants to check on the current status, but it is exhibiting similar behaviour (sometimes resolves sometimes doesn't). 

Is there a recommended means of dynamically checking on the resolvable status of avahi clients on a wireless network in which continuous connectivity is not guaranteed? 

Regards,
Daniel Stonier.

Register service on other domain than local??

Hi all,

 

I am trying to register a service via Avahi on a domain other than the default .local. This causes some issues. I am running on Fedora 13 and have seen the same behavior using Avahi version 0.6.25 AND using 0.6.30 (the latest version).

 

In the configuration file of Avahi I do not explicitly specify a host name or a domain (these lines are commented out). Doing so will cause a registration of another service running on the same computer on the domain configured in the file. That registration needs to be done on .local otherwise it cannot be discovered by the external tools for that service.

 

When I run the code below, I also see that when I call avahi_entry_group_add_service that the Avahi daemon will suddenly disappear (it doesn't show up anymore when executing the ps-command) and needs to be restarted manually. It seems that I am doing a call that the daemon doesn't like. In the program below, the disappearance of the daemon is noticed by an error code -49 returned ("Not supported") by the API call.

When I change the code below and replace the parameter values "mydomain.com" and "myhost.mydomain.com" with NULL and the flags (AVAHI_PUBLISH_USE_WIDE_AREA and AVAHI_PUBLISH_USE_MULTICAST) with 0, the service "myservice._mytype._tcp.local." is registered on the network and can be resolved using Apple's Bonjour service on another computer.

 

Is there something I am overlooking? As I said, changing the configuration file of Avahi will cause problems with another service, but additionally, it will not solve my issue. Also when I set the host and domain in the configuration  file, the Avahi daemon suddenly disappears and needs to be restarted. When the daemon disappears, there are no messages logged by Avahi in /var/log/messages.

 

In the code file I removed all other error detection and handling to prevent a large code file which might be harder to understand.

 

--------------- CODE START -------------------

 

#include <avahi-client/publish.h>

#include <avahi-common/error.h>

#include <avahi-common/thread-watch.h>

 

static AvahiThreadedPoll* g_poll = NULL;

static AvahiClient* g_client = NULL;

static AvahiEntryGroup* g_group = NULL;

 

void OnAvahiClientState(AvahiClient* client, AvahiClientState state, void* userdata)

{

    switch (state)

    {

        case AVAHI_CLIENT_S_RUNNING:

            if (NULL == group)

            {

                g_group = avahi_entry_group_new(client, OnAvahiEntryGroupState, userdata);

            }

            if ((NULL != group) && avahi_entry_group_is_empty(g_group))

            {

                int avahiError = avahi_entry_group_add_service(g_group,

                                                               AVAHI_IF_UNSPEC,

                                                               AVAHI_PUBLISH_USE_WIDE_AREA | AVAHI_PUBLISH_USE_MULTICAST,

                                                               "myservice",

                                                               "_mytype._tcp",

                                                               "mydomain.com",

                                                               "myhost.mydomain.com",

                                                               9999,

                                                               "txt=value",

                                                               NULL);

                /* THIS IS WHERE avahiError IS -49 (AVAHI_ERR_NOT_SUPPORTED) */

            }

    }

}

 

void OnAvahiEntryGroupState(AvahiEntryGroup* group, AvahiEntryGroupState state, void* userdata)

{

    /* NOT RELEVANT FOR THIS EXAMPLE, JUST NEEDED FOR COMPILATION ;) */

}

 

void main()

{

    int avahiError = AVAHI_OK;

 

    g_poll = avahi_threaded_poll_new();

    g_client = avahi_client_new(avahi_threaded_poll_get(g_poll,

                                                        AVAHI_CLIENT_NO_FAIL,

                                                        OnAvahiClientState,

                                                        NULL,

                                                        &avahiError);

    avahiError = avahi_threaded_poll_start(g_poll);

}

 

--------------- CODE END -------------------

 

Marcel Versteeg

Bosch Security System BV

LOB Communication Systems, Software Competence Team (ST-CO/ENG1.4)

 

Error code -49 when registering service

Hi all,
 
I have an issue when registering a service via the Avahi API. Below is a small code file that produces the issue. In the code file I put a comment where the error code -49 ("Not supported") is returned by the library. What am I doing wrong??
 
I have Avahi 0.6.25 running on Fedora 13. Due to other restrictions I cannot upgrade to a higher version of Fedora and thus am "confined" to using Avahi 0.6.25 which is the highest version available in a binary version for this OS.
The configuration of Avahi (avahi-daemon.conf) is default and was not changed. The Avahi-daemon is running.
 
In the code file I removed all other error detection and handling to prevent a large code file which might be harder to understand. The service is registered on another domain than .local which is where it goes wrong. If I change the code below and replace AVAHI_PUBLISH_USE_WIDE_AREA with 0 (a zero) and "mydomain.com" with NULL, the service myservice._mytype._tcp.local can be found and resolved on another computer running Apple's Bonjour service.
 
--------------- CODE START -------------------
 
#include <avahi-client/publish.h>
#include <avahi-common/error.h>
#include <avahi-common/thread-watch.h>
 
static AvahiThreadedPoll* g_poll = NULL;
static AvahiClient* g_client = NULL;
static AvahiEntryGroup* g_group = NULL;
 
void OnAvahiClientState(AvahiClient* client, AvahiClientState state, void* userdata)
{
    switch (state)
    {
        case AVAHI_CLIENT_S_RUNNING:
            if (NULL == group)
            {
                g_group = avahi_entry_group_new(client, OnAvahiEntryGroupState, userdata);
            }
            if ((NULL != group) && avahi_entry_group_is_empty(g_group))
            {
                int avahiError = avahi_entry_group_add_service(g_group,
                                                               AVAHI_IF_UNSPEC,
                                                               AVAHI_PUBLISH_USE_WIDE_AREA,
                                                               "myservice",
                                                               "_mytype._tcp",
                                                               "mydomain.com",
                                                               NULL,
                                                               9999,
                                                               "txt=value",
                                                               NULL);
                /* THIS IS WHERE avahiError IS -49 (AVAHI_ERR_NOT_SUPPORTED) */
            }
    }
}
 
void OnAvahiEntryGroupState(AvahiEntryGroup* group, AvahiEntryGroupState state, void* userdata)
{
    /* NOT RELEVANT FOR THIS EXAMPLE, JUST NEEDED FOR COMPILATION ;) */
}
 
void main()
{
    int avahiError = AVAHI_OK;
 
    g_poll = avahi_threaded_poll_new();
    g_client = avahi_client_new(avahi_threaded_poll_get(g_poll,
                                                        AVAHI_CLIENT_NO_FAIL,
                                                        OnAvahiClientState,
                                                        NULL,
                                                        &avahiError);
    avahiError = avahi_threaded_poll_start(g_poll);
}
 
--------------- CODE END -------------------
 
Marcel Versteeg
Bosch Security System BV
LOB Communication Systems, Software Competence Team (ST-CO/ENG1.4)
 
Picon

Size of TXT Records

According to the proposed RFC for avahi TXT records, the maximum size
can be up to 65535 long. I have TXT records that are much smaller than 
that but when starting avahi-daemon, I get:

Failed to add service 'blahhostname' of type '_mysql._tcp', ignoring
service group (/services/dbservices)

This is on:
CentOS 5.5

with:
avahi-0.6.21-10
avahi-compat-libdns_sd-0.6.21-10
avahi-glib-0.6.21-10
avahi-tools-0.6.21-10
avahi-compat-libdns_sd-devel-0.6.21-10

Any help would be much appreciated.

Best regards,
Mike Jones
Picon

avahi with site-local scope

Hi guys,
I need to use avahi in a IPv6 private network with several routers. I have 
modifed the AVAHI_IPV6_MCAST_GROUP to ff05::fb (site-local scope multicast 
address) and avahi seems to work fine in my network. It is able to resolve node 
names that are more than 1 hop away, as well as to discover services.

Is there any known issue in using avahi in this way? 

Thanks for your time,
Massimiliano

Error code -49 when registering service

Hi all,
 
I have an issue when registering a service via the Avahi API. Below is a small code file that produces the issue. In the code file I put a comment where the error code -49 ("Not supported") is returned by the library. What am I doing wrong??
 
I have Avahi 0.6.25 running on Fedora 13. Due to other restrictions I cannot upgrade to a higher version of Fedora and thus am "confined" to using Fedora 0.6.25 which is the highest version available in a binary version for this OS.
The configuration of Avahi (avahi-daemon.conf) is default and was not changed. The Avahi-daemon is running.
 
In the code file I removed all other error detection and handling to prevent a large code file which might be harder to understand. The service is registered on another domain that .local which is where it goes wrong. If I change the code below and replace AVAHI_PUBLISH_USE_WIDE_AREA with 0 (a zero) and "mydomain.com" with NULL, the service myservice._mytype._tcp.local can be found and resolved on another computer running Apple's Bonjour service.
 
--------------- CODE START -------------------
 
#include <avahi-client/publish.h>
#include <avahi-common/error.h>
#include <avahi-common/thread-watch.h>
 
static AvahiThreadedPoll* g_poll = NULL;
static AvahiClient* g_client = NULL;
static AvahiEntryGroup* g_group = NULL;
 
void OnAvahiClientState(AvahiClient* client, AvahiClientState state, void* userdata)
{
    switch (state)
    {
        case AVAHI_CLIENT_S_RUNNING:
            if (NULL == group)
            {
                g_group = avahi_entry_group_new(client, OnAvahiEntryGroupState, userdata);
            }
            if ((NULL != group) && avahi_entry_group_is_empty(g_group))
            {
                int avahiError = avahi_entry_group_add_service(g_group,
                                                               AVAHI_IF_UNSPEC,
                                                               AVAHI_PUBLISH_USE_WIDE_AREA,
                                                               "myservice",
                                                               "_mytype._tcp",
                                                               "mydomain.com",
                                                               NULL,
                                                               9999,
                                                               "txt=value",
                                                               NULL);
                /* THIS IS WHERE avahiError IS -49 (AVAHI_ERR_NOT_SUPPORTED) */
            }
    }
}
 
void OnAvahiEntryGroupState(AvahiEntryGroup* group, AvahiEntryGroupState state, void* userdata)
{
    /* NOT RELEVANT FOR THIS EXAMPLE, JUST NEEDED FOR COMPILATION ;) */
}
 
void main()
{
    int avahiError = AVAHI_OK;
 
    g_poll = avahi_threaded_poll_new();
    g_client = avahi_client_new(avahi_threaded_poll_get(g_poll,
                                                        AVAHI_CLIENT_NO_FAIL,
                                                        OnAvahiClientState,
                                                        NULL,
                                                        &avahiError);
    avahiError = avahi_threaded_poll_start(g_poll);
}
 
--------------- CODE END -------------------
 
Marcel Versteeg
Bosch Security System BV
LOB Communication Systems, Software Competence Team (ST-CO/ENG1.4)
 
 

Gmane