Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] mDNS works with systemd-resolve but not with ping
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
MetroWind
n00b
n00b


Joined: 14 Oct 2020
Posts: 2

PostPosted: Wed Oct 14, 2020 7:21 am    Post subject: [SOLVED] mDNS works with systemd-resolve but not with ping Reply with quote

So I just started my first Gentoo build. The network is a simple wired DHCP setup with systemd-{networkd,resolved}. I enabled MulticastDNS for the wired interface. Somehow I can resolve other machines in the network with systemd-resolve, but ping keeps giving me "Name or service not known":

Code:
$ systemd-resolve adenine.local                                                                                                                 
adenine.local: 192.168.1.22                    -- link: eno1

-- Information acquired via protocol mDNS/IPv4 in 133.3ms.
-- Data is authenticated: no
$ ping adenine.local                                                                                                                           
ping: adenine.local: Name or service not known

Adenine.local is an Arch machine that has a very similar network setup with systemd, but with static IP.

This is my /etc/systemd/network/50-dhcp.network:
Code:
[Match]
Name=en*

[Network]
DHCP=ipv4
MulticastDNS=yes

[DHCP]
UseDomains=route

and my /etc/systemd/resolved.conf:
Code:
[Resolve]
MulticastDNS=yes

And "ip a" result for reference:
Code:
$ ip a                                                                                                                                         
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: eno1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 44:8a:5b:a0:af:ec brd ff:ff:ff:ff:ff:ff
    altname enp0s25
    inet 192.168.1.145/24 brd 192.168.1.255 scope global dynamic eno1
       valid_lft 5582sec preferred_lft 5582sec
    inet6 2601:647:5b00:2743:468a:5bff:fea0:afec/64 scope global dynamic mngtmpaddr noprefixroute
       valid_lft 85887sec preferred_lft 13887sec
    inet6 fe80::468a:5bff:fea0:afec/64 scope link
       valid_lft forever preferred_lft forever
3: sit0@NONE: <NOARP> mtu 1480 qdisc noop state DOWN group default qlen 1000
    link/sit 0.0.0.0 brd 0.0.0.0

Other mDNS-enabled machines in the network (my Mac and other Arch machines) could ping adenine.local with no problem.
Could anyone shine some light on why ping couldn't work with mDNS?


Last edited by MetroWind on Thu Oct 15, 2020 7:41 am; edited 1 time in total
Back to top
View user's profile Send private message
MetroWind
n00b
n00b


Joined: 14 Oct 2020
Posts: 2

PostPosted: Thu Oct 15, 2020 7:40 am    Post subject: Reply with quote

Solved by linking /run/systemd/resolve/stub-resolv.conf to /etc/resolv.conf
Back to top
View user's profile Send private message
Banana
l33t
l33t


Joined: 21 May 2004
Posts: 690
Location: Germany

PostPosted: Thu Oct 15, 2020 7:59 am    Post subject: Reply with quote

No expert here but this sounds not very correct. I mean, if it works sure. But I don't think that manually overwriting a base file with a symbolic link is a good idea. Could be wrong though...
_________________
My personal space
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum