Score:1

ubuntu doens't resolve usb device name

gr flag

I have a ARM SBC running linux and configured to be connected to a pc via USB using rndis gadget. Inside my device I configured dnsmasq to provide to the host pc an ipv6 address, I also configured the avahi-daemon to give (via ipv6) the name of my device (device-1234). If I connect my device to a Windows pc from the ms-prompt I can ping the device using its name (ping device-1234) I have also a PC with Ubuntu 20.04, I can ping my device using IPV6 ip but if I try to ping using its name (ping device-1234) I receive: "Name or service not known"

Is there a package I have to install in my Ubuntu that allow it to resolv my device name?

My problem is that with Ubuntu I'm not able to resolve the ipv6 address from its name (like windows do) In my device I configured avahi-daemon like:

[server]
host-name=device-1234
use-ipv4=no
use-ipv6=yes
allow-interfaces=usb0
..

Once connected to windows pc, from windows prompt:

ping device-1234 

Pinging device-1234.local [fda7:cae0:0:7::1] with 32 bytes of data:
Reply from fda7:cae0:0:7::1: time=7ms
Reply from fda7:cae0:0:7::1: time<1ms
Reply from fda7:cae0:0:7::1: time=1ms
Reply from fda7:cae0:0:7::1: time=2ms

Once connected with Ubuntu pc, from Ubuntu console:

ping device-1234
ping: device-1234: Name or service not known

but if I ping using my device ipv6 address

ping fda7:cae0:0:7::1
PING fda7:cae0:0:7::1(fda7:cae0:0:7::1) 56 data bytes
64 bytes from fda7:cae0:0:7::1: icmp_seq=1 ttl=64 time=14.8 ms
64 bytes from fda7:cae0:0:7::1: icmp_seq=2 ttl=64 time=3.34 ms
64 bytes from fda7:cae0:0:7::1: icmp_seq=3 ttl=64 time=3.06 ms

It seems Ubuntu is not able to resolve my device host name while Windows do it. It seems zeroconf work in Windows but I don't know how let it work on Ubuntu

Best Regards

Score:1
gr flag

I found the solution:

by default Ubuntu resolves mDNS only for ipv4. To enable the mDNS on ipv6 it must change the file /etc/nsswitch.conf from:

files mdns4_minimal dns myhostname

to:

files mdns_minimal dns myhostname
user.dz avatar
ng flag
Welcome to Ask Ubuntu. This is a QA site, it will be nice and easier to find answer if checked as accepted answer. See [about] for how it works.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.