Page 1 of 1

local domain not working when no internet

Posted: Thu Apr 21, 2016 2:39 am
by gvandenbosch
Hello,

I successfully configured my PI with a .local domain and this works.

However when I put the PI in a network without internet this doesn't work anymore.
After some googling I found out that .local domains require internet access to work, correct me if I am wrong.

Would there be any other easy way to resolv the PI to a local domain without internet access?

Cheers,
Gerard

Re: local domain not working when no internet

Posted: Thu Apr 21, 2016 1:05 pm
by DougieLawson
You're wrong.

.local needs avahi-daemon running somewhere on the local subnet.

Re: local domain not working when no internet

Posted: Thu Apr 21, 2016 1:10 pm
by Aydan
How is the .local domain set up?
I assume no internet means no router in the network?

Then you either need Avahi (or smilar) running on all clients, as DougieLawson states or you need to run your own DHCP and Bind9 DNS with DDNS enabled.

Regards
Aydan

Re: local domain not working when no internet

Posted: Thu Apr 21, 2016 2:53 pm
by gvandenbosch
The avahi daemon is running on the raspberry pi with the default configuration.

There is a router in the network but not connected to the internet, the raspberrypi is connected wired and clients wireless.

When connecting a Linux laptop to the network, I get the following error:
Network service discovery disabled - current network has a .local domain, which is not recommended + incompatible with Avahi network

Re: local domain not working when no internet

Posted: Thu Apr 21, 2016 3:21 pm
by stderr
gvandenbosch wrote:The avahi daemon is running on the raspberry pi with the default configuration.

There is a router in the network but not connected to the internet, the raspberrypi is connected wired and clients wireless.

When connecting a Linux laptop to the network, I get the following error:
Network service discovery disabled - current network has a .local domain, which is not recommended + incompatible with Avahi network
In the past and perhaps the present too, .local was used in various ways that are incompatible with the avahi thing they want to use .local with now. This page has some discussion, all the messages seem to include links and details that might or might not make a difference for you: https://askubuntu.com/questions/339702/ ... ean-for-me

Re: local domain not working when no internet

Posted: Thu Apr 21, 2016 5:18 pm
by Aydan
you could always call your domain something else, preferably something that is not likely to be an existing top level domain.
e.g. you name or the name of your company/organization. Just don'T let it end in ".com" or somesuch.
The IT department in my company did something stupid like that. The Domain is called company.net
That's all well and good as long as you are inside the company network. But try to connect to a company PC via VPN and you might end up resolving the internet address and not the company internal one.

Regards
Aydan

Re: local domain not working when no internet

Posted: Sat Apr 23, 2016 4:17 pm
by DougieLawson
That's why .local has been reserved. It's disallowed as a ICANN gTLD so you can never connect to example.local and get to the wrong address. That TLD has to be resolved by a local DNS (or MDNS). The same is true for .test .example .invalid and .localhost.

https://tools.ietf.org/html/rfc6761

Re: local domain not working when no internet

Posted: Mon Apr 25, 2016 1:40 am
by gvandenbosch
I have changed avahi configuration from local to alocal.

In /etc/nsswitch.conf I have removed:

Code: Select all

[NOTFOUND=return]
And in /etc/default/avahi-deamon I changed to 0:

Code: Select all

AVAHI_DAEMON_DETECT_LOCAL=0
But when I try to resolve my hostname.alocal now, I get the reply:

Code: Select all

Host pitest.alocal not found: 3(NXDOMAIN)
Is there anything I am missing?

Re: local domain not working when no internet

Posted: Fri Apr 29, 2016 7:39 am
by gvandenbosch
Anyone a idea or pointer what I could be doing wrong changing to alocal in avahi?