gvandenbosch
Posts: 6
Joined: Thu Apr 21, 2016 2:37 am

local domain not working when no internet

Thu Apr 21, 2016 2:39 am

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

User avatar
DougieLawson
Posts: 36105
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: local domain not working when no internet

Thu Apr 21, 2016 1:05 pm

You're wrong.

.local needs avahi-daemon running somewhere on the local subnet.
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

Aydan
Posts: 692
Joined: Fri Apr 13, 2012 11:48 am
Location: Germany, near Lake Constance

Re: local domain not working when no internet

Thu Apr 21, 2016 1:10 pm

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

gvandenbosch
Posts: 6
Joined: Thu Apr 21, 2016 2:37 am

Re: local domain not working when no internet

Thu Apr 21, 2016 2:53 pm

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

stderr
Posts: 2178
Joined: Sat Dec 01, 2012 11:29 pm

Re: local domain not working when no internet

Thu Apr 21, 2016 3:21 pm

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

Aydan
Posts: 692
Joined: Fri Apr 13, 2012 11:48 am
Location: Germany, near Lake Constance

Re: local domain not working when no internet

Thu Apr 21, 2016 5:18 pm

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

User avatar
DougieLawson
Posts: 36105
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: local domain not working when no internet

Sat Apr 23, 2016 4:17 pm

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
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

gvandenbosch
Posts: 6
Joined: Thu Apr 21, 2016 2:37 am

Re: local domain not working when no internet

Mon Apr 25, 2016 1:40 am

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?

gvandenbosch
Posts: 6
Joined: Thu Apr 21, 2016 2:37 am

Re: local domain not working when no internet

Fri Apr 29, 2016 7:39 am

Anyone a idea or pointer what I could be doing wrong changing to alocal in avahi?

Return to “Troubleshooting”