0

I know from research that .local domains are a considered a very bad idea.

And yet, I am trying to use two different astronomy applications designed to run on a Raspberry Pi for which the stated instructions say that one should connect to the system running on the Pi via a .local address. The purpose of these applications is to control a telescope and associated equipment remotely, ultimately with viewing the astronomical object pointed to without peering through eyepieces. I don't know why the developers of these systems would have chosen this method of connection. I'm just trying to deal with it.

The instructions for both say you should point your computer at the WiFi hotspot for the system running on the Pi (both systems have a hotspot) and then access it from the main computer by a ....local address. This works on both systems (I can switch between systems by swapping out the microSD card). Interestingly, on one system, I find I can connect to it whether I have pointed my computer at the Pi Hotspot or not. On the other, I can only connect when I have pointed the computer at the hotspot.

I am just trying to achieve an understanding of how all this works, particularly, how in the one case, I am able to access the .local address without connecting to the hotspot, while in the other system, this is not possible.

I would be grateful for any assistance in understanding all this.

4
  • The .local domain is not a bad idea when used for its intended purpose. The .local domain is reserved for the mDNS (Multicast DNS). mDNS works without a central DNS server. A client queries a name with a .local suffix using multicast (i.e. the query sent on the local network is received by any host that is interested in it), and the matching host responds with its network address. Commented Sep 30, 2023 at 18:19
  • Thanks much for this explanation. It fills in my understanding, but it still doesn't explain why, in one case, I need to be connected to the hotspot for this to work, while in the other case, this is not required. Commented Sep 30, 2023 at 18:35
  • What do you mean by "hotspot"? Is that just another word for a WiFi AP? Commented Sep 30, 2023 at 21:02
  • What do you mean by "AP"? If you mean "access point" then, yes, that is what I mean. But the documentation for the program calls it a "hotspot", an address on the remote machine to which you can connect your local machine to get access to the internet - exactly as you can use your iphone's hotspot to access the internet when no wifi connection is available. Commented Sep 30, 2023 at 22:30

1 Answer 1

1

"I know from research that .local domains are a considered a very bad idea."*

No, that's not true. IF you were using a FQDN (Fully Qualified Domain Name) e.g. .com, .net, etc. it would be true, but .local is what is known as a "Special-Use Domain Name (SUDN)", and will never be designated as a FQDN. IOW, it's safe to use .local.

"I am just trying to achieve an understanding of how all this works, particularly, how in the one case, I am able to access the .local address without connecting to the hotspot, while in the other system, this is not possible."

The Raspberry Pi uses a program called avahi as its mDNS (multicastDNS) client. As its name suggests mDNS is a form of DNS that utilizes multicast between clients to resolve hostnames to IP addresses.

As long as you have properly configured a hostname (/etc/hostname) file, there's typically nothing to do as far as configuring avahi on the RPi. However, feel free to peruse /etc/avahi/avahi-daemon.conf & refer to man 5 avahi-daemon.conf for details and options. You can check the status of avahi from systemd using the command: service avahi-daemon status.

In other words, declare unique hostnames for each of your RPi in the file /etc/hostname, and avahi should (after a brief period) resolve yourhostname.local. I wasn't fully clear on your comment regarding "... swapping out the microSD card", but you shouldn't need to do this for two different RPi.

1
  • Thanks, Seamus. These astronomy systems (there are several) tell you about the hotspot, say you should connect to it, but don't say why. I think the only reason is to make the initial connection, and make some configuration changes needed to put the Pi on your network (with a tool such as nm-connection-editor). Then the Pi can be rebooted without further need of the hotspot. But the directions don't say that causing frustration for new users. Commented Oct 1, 2023 at 20:45

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.