# Slow <host>.local host resolv on LAN with avahi + nss-mdns

## ivan2k

Hi guys

I recently noticed a slowdown in remote login via ssh between my gentoo systems.

I use avahi + nss-mdns for local area hostnames resolution with .local domain. With this configuration works for more than 3 years until some days ago.

Now my hostname resolution is very slow, not only for ssh, but for ping too. Example: ping host.local show me instantly the host ip address but answers are very slow despite the low response times and the fast connection.

My /etc/nsswitch.conf is:

```
hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4
```

If I remove the default gateway with:

```
route del default gw 192.168.1.xxx
```

Then address resolution start working fast.

If I re-add the default gateway, I have slow resolution again.

I think it tries to resolv host.local with internet DNS before use mDNS. Don't know why.

Someone can help?

(sorry for my english)

----------

## boospy

This should only a problem when the DNS Service is unavailable. But i know this problem only with IPV6 and in use with "enable-wide-area=no" for a public domain. Can you test your results with:

```
hosts:       files dns mdns4

hosts:       files mdns4 dns
```

Greetings

boospy

----------

## ivan2k

I forgot about this thread I opened a while ago.

In the mean time I have solved the issue and forgot to remember to post on this thread the solution. Now for completeness I've forgot the solution too.   :Embarassed: 

Now I'm trying (and hope) to remeber how I did it, so it could help others people in the future.

However boopsy thank a lot for your concern !!

Now I'm struggling with a worse issue.

----------

