# ping *.local gives me System Error

## davidshen84

Hi,

I have systemd-resolved disabled, emerged avahi-daemon and configured /etc/nsswitch.conf. I was able to ping the hosts in my LAN such as gentoo.local. But today, when I try to ping any ".local" host, I got "System Error"

If I ping a wrong name, such as "gentoo.local2", I got name not resolved. So I think the name resolution is working, but ping is failing. However, I can ping google.com and host in LAN using IP.

The only thing I can think of is that I enabled a bunch of conn_track related kernel configuration and emerged "minikube" package.

There's no error log anywhere.

----------

## mike155

Reset /etc/nsswitch.conf to its original contents and retry. Does ping work now?

----------

## davidshen84

 *mike155 wrote:*   

> Reset /etc/nsswitch.conf to its original contents and retry. Does ping work now?

 

I did, I even re-compiled glibc and restart the computer.

One interesting thing is that on boot the avahi-daemon log shows everything is fine. But if I restart the service I got a warning "WARNING: Detected another IPv4 mDNS stack running on this host. This makes mDNS unreliable and is thus not recommended.". I have disabled systemd-resolved on my system and I have checked that the service is not running. I just could not figure out what other services could cause this conflict.

----------

## alamahant

Maybe you disabled systemd-resolved but maybe it somehow started...

Systemd is very paternalistic about things like that.

It knows best.

```

systemctl status systemd-resolved #####and also to be sure

systemctl mask systemd-resolved

systemd-resolve --flush-caches

```

Do you have dnsmasq?

Also check

```

man resolved.conf

```

From the above

 *Quote:*   

> 
> 
>   MulticastDNS=
> 
>            Takes a boolean argument or "resolve". Controls Multicast DNS support (RFC 6762[2]) on the local host.
> ...

 

Are you using systemd-networkd for network?

Maybe if you switched to NM?

Do you really feel enthusiastic about avahi?

Would you be averse to using maybe bind instead?

----------

## davidshen84

I disabled and stopped my "avahi-daemon" and configured "systemd-resolved". After playing for a while and checking the log, I don't know why my system can connect to Internet now...

I have dnscrypt-proxy running on my host and it reports working. But "resolvectl status" shows my DNS does not support DNSSEC.

```

Global

       LLMNR setting: yes                 

MulticastDNS setting: yes                 

  DNSOverTLS setting: no                  

      DNSSEC setting: allow-downgrade     

    DNSSEC supported: no                  

  Current DNS Server: 127.0.0.1           

         DNS Servers: 127.0.0.1           

                      ::1                 

Fallback DNS Servers: 1.1.1.1             

                      8.8.8.8             

                      1.0.0.1             

                      8.8.4.4             

                      2606:4700:4700::1111

                      2001:4860:4860::8888

                      2606:4700:4700::1001

                      2001:4860:4860::8844

          DNS Domain: ~.                  

          DNSSEC NTA: 10.in-addr.arpa     

                      16.172.in-addr.arpa 

                      168.192.in-addr.arpa

                      17.172.in-addr.arpa 

                      18.172.in-addr.arpa 

                      19.172.in-addr.arpa 

                      20.172.in-addr.arpa 

                      21.172.in-addr.arpa 

                      22.172.in-addr.arpa 

                      23.172.in-addr.arpa 

                      24.172.in-addr.arpa 

                      25.172.in-addr.arpa 

                      26.172.in-addr.arpa 

                      27.172.in-addr.arpa 

                      28.172.in-addr.arpa 

                      29.172.in-addr.arpa 

                      30.172.in-addr.arpa 

                      31.172.in-addr.arpa 

                      corp                

                      d.f.ip6.arpa        

                      home                

                      internal            

                      intranet            

                      lan                 

                      local               

                      private             

                      test                

```

```
resolvectl query openwrt.lan                                                                                      

openwrt.lan: 192.168.86.13                     -- link: wlan0

-- Information acquired via protocol DNS in 7.9ms.

-- Data is authenticated: no

```

```
ping openwrt.lan                                                                                                 

ping: openwrt.lan: Name or service not known
```

```
resolvectl query openwrt.local                                                                                   

openwrt.local: resolve call failed: 'openwrt.local' does not have any RR of the requested type
```

```
ping openwrt.local                                                                                                

ping: openwrt.local: System error
```

----------

## Ant P.

Which version of nss-mdns do you have?

----------

## davidshen84

 *Ant P. wrote:*   

> Which version of nss-mdns do you have?

 

0.14.1

----------

## davidshen84

BTW, the reason I use avahi-daemon before was that I want to use "dnscrypt-proxy" and it is recommended to not use systemd-resolved with it. I just learned that "systemd-resolved" can work as a client and rely on the configured DNS, so I tried.

----------

## Ant P.

Unless dnscrypt-proxy has some built in mdns support, you'll need nsswitch.conf configured as shown in libnss-mdns's readme to resolve .local addresses.

----------

## davidshen84

 *Ant P. wrote:*   

> Unless dnscrypt-proxy has some built in mdns support, you'll need nsswitch.conf configured as shown in libnss-mdns's readme to resolve .local addresses.

 

That's why I had "avahi-daemon" running for mdns.

----------

## Ant P.

avahi-daemon does not provide a glibc name resolution plugin of its own.

----------

## davidshen84

OK. Eventually, I want to use dnscrypt-proxy for general DNS and mDNS for my local network. What tools, packages and configurations would you recommend on gentoo?

----------

