How to associate a domain name with my RL VM?

I have a Rocky Linux VM running on a Synology NAS as host.

The RL VM is virrtually networked into the NAS. It has (on the LAN) the IP address 192.168.0.25 and I can ping it from the Synology via ping 192.168.0.25.

The Synology NAS I login to via ssh from my Mac. Luckily I can also ping the Rocky Linux VM from my Mac. So the VM is visible on the full LAN.

Inside Rocky Linux I gave the machine on install the domain name rocksolid.local.

However when I issue

ping rocksolid.local

from my Mac terminal or from the Synology shell it does not resolve: I get the error (on the Mac):

ping: cannot resolve rocksolid.local: Unknown host

or on the Synology:

ping: rocksolid.local: Temporary failure in name resolution

How can I make the domain name resolve?

As I wrote in How to network RL when it runs as VM on a Synology NAS - #2 by jlehtone the RL is not important for the resolution.

Then again, I don’t know how Mac does it, but I presume it to be similar to what Linux uses.
Which is typically ā€œfiles dnsā€. When given a name, local ā€œfileā€ is checked first. If the name appears, the IP address from that entry is returned. If there is no result from files, then go for dns.
Network config on the Mac should set one (or more) DNS servers. A query is sent to server.
If server knows the name, it returns an address. (It might forward query to other servers, if it does know the name.)

So, who are the DNS servers that the Mac and Synology do query from? Can you configure them to return ā€œ192.168.0.25ā€ for the ā€œrocksolid.localā€?

On RL the ā€œfilesā€ is /etc/hosts, but Mac and Syno might use something different.

1 Like

Have you turned off Bonjour on the Mac ?

Yes, Bonjour is switched on (mDNSResponder is running).

Aha, yes, of course. I’ll look at the other machines.

Thanks for explaining this in detail!

You can also install/start the avahi-daemon, which is Linux implementation of mDNS (bonjour).
This protocol allows the devices to broadcast a DNS request on a local network to ask hosts directly about their names and services they offer, so you do not need to configure a DNS server or static /etc/hosts files.

2 Likes

Cool. That sounds promising! Thanks.

Somewhere else I read the nss-mdns does a similar job. What is recommend on Rocky Linux, avahi or nss-mdns?

If ā€˜.local’ is really your TLD, then you need to do one of two things, either turn off Bonjour on your Mac and Avahi on Linux, or change ā€˜.local’ to something else (ā€˜home.arpa’ perhaps), ā€˜.local’ is reserved for mdns.

I can tell you my RL9 desktop came with avahi-daemon preinstalled, it only was not preenabled. It is also the preinstalled mdns daemon for Ubuntu. So I think you will be fine using it.

1 Like

Can’t adding bonjour on NAS and Linux machine help?

No, DNS and mdns are different and will interfere with each other if you use a ā€˜.local’ TLD. I say this from experience, using ā€˜.local’ with mdns always ends in tears. I know that at one time Microsoft recommended using it, but it was only for a short while and they have since stopped doing so.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.