Confused about .lan vs .local

I've never heard of .lan before, so I don't know whether it has any special meaning over .local. However, I would like to have all my devices use .local for their hostnames.

I'm confused by the "Resolve these locally" field in the DHCP settings.

What are the slashes around "lan" for? I'm guessing this field corresponds to

option local '/lan/'

but that doesn't explain anything to me.

Better not use local as that is reserved for mDNS.

Resolve these locally will instruct DNSMasq to resolve domain names ending in .lan to resolve locally and not forward to the upstream resolvers

So usually you will then have your local domain also named lan

But I use home1 for my main router (as it has the 192.168.1.0 subnet) so my router on 192.168.9.0 subnet is home9 (I do have a lot of routers :slight_smile: )

4 Likes

.local is reserved for mDNS so I would highly suggest that you avoid using it.

.lan is just a made up TLD that is deliberately invalid. You can use anything in its place as long as it isn't a valid TLD. You could just as well set it to something like .mycrazyhome or .tabicat

3 Likes

If .local is already a thing, then why have .lan?

I was able to point my browser at octopi.local, so I guess mDNS is already working. I'm not at home now so I can't test it, but what is octopi.lan supposed to do? Also resolve to the same address as octopi.local?

Not everybody has mDNS besides it is restricted to your current subnet (it uses broadcast) so is entirely different from name resolution via DNSMasq

2 Likes

.lan uses the local DNS server on your OpenWRT device. The difference is that it is a central source of truth which is going to be a lot more reliable than mDNS. The problem with mDNS is that it doesn't allow for a way to restrict which devices can just self declare. mDNS is also a little bit noisy network wise although it really isn't bad when you are dealing with fast connections.

Where mDNS really shines is p2p and service discovery. Things like printers and TV's will often advertise there services on the network.

Ok, I get it. .local is reserved for mDNS, so when I tell my browser to go to octopi.local, it (or my PC) will send an mDNS request.

If I also set up my regular DNS to use .local, then there will be a conflict.

1 Like

I like to use .intranet, it makes the FQDN both prettier and non-ambiguous, e.g. camera.intranet.

My 2 cents on what domain is used locally...

I have like 14 local networks and each has its own domain under home.arpa. like guest.clients.home.arpa. and I personally don't want to depend on mdns and its local....

I’m now using “.internal” for my networks ( all 3 of them :slight_smile: )
A Top-level Domain for Private Use

1 Like

TIL .internal!

Does this mean that a client has e.g. "foobar.guest.clients.home.arpa" as fqdn?
I also use .home.arpa for my homenetwork.

I have for each vlan a domain and i.e. my PC lives in admin.clients.home.apra and with a second interface in user.clients.home.arpa.
If the search option is configured properly in resolve conf everything is smooth

1 Like