9.3 ".local" domain name

Status
Not open for further replies.

monarchdodra

Explorer
Joined
Feb 15, 2012
Messages
79
Back before 9.3, I had a freenas server called "myNas". I could access this server from my linux computer (K-Ubuntu) simply via the name "myNas", eg "http://myNas", "ssh me@myNas" etc...

Due to "unforeseen circumstances", while 9.3 came out, I lost both my PC and nas box. So I built a fresh new freenas, and connected to it via a fresh new linux (vanilla Ubuntu this time).

The issue I'm encountering is that I now must suffix it with ".local" to access it, eg "http://myNas.local", "ssh me@myNas.local" etc...

What is even stranger, is that I modified the domain name to something else "myDomain", so that the "hostname" is now "myNas.myDomain", this changes nothing! The nas' access name is still "myNas.local" on my ubuntu linux box?

Both my Win7 and Win8 computers can access it via simple "myNas".

Anybody have any idea what this is about. Is it a 9.3 thing? Is it a Ubuntu specific thing? Or is it a configuration specific thing?

Sorry if the answer seems obvious, networking is not really my thing...

Thanks !
 

demon

Contributor
Joined
Dec 6, 2014
Messages
117
The ".local" TLD is a fixed appellation for mDNS link-local name resolution (as part of Bonjour, formerly known as Rendezvous). I use that quite regularly on my home network. Do you have the domain you appended to the hostname as an actual DNS domain? Do you have a DNS entry added for the FreeNAS box? Does it (perhaps) need updating since the new hardware took the place of the old? Usually the only way you can do "shortname"-only name resolution (and have it work across all OSes like that) is to have a legitimate DNS domain in the global DNS server tree (or to use a nameserver with some private domain within your own network that gets first crack at any queries) and have the domain you're using configured statically or via DHCP on all your clients.

If you do 'getent hosts myNas' on the KUbuntu machine, does it show it resolving to something? I'm pretty sure Ubuntu and FreeNAS don't support LLMNR, so I'm doubting it's something esoteric like that. What does "ping myNas" say on Windows, for comparison?
 

monarchdodra

Explorer
Joined
Feb 15, 2012
Messages
79
Hum... I also had to change routers, so it could definitely be that.

My ubuntu says:
$ getent hosts myNas
$ getent hosts myNas.local
192.168.0.201 myNas.local

My Win7 says:
> ping myNas
> Reply from myNas [192.168.0.201] ...

In my setup, I configured the three "nameservers" to use the IP's I recovered using Win7's "ipconfig /all". I had to fill these in, or my nas would return "ping: cannot resolve google.com: Host name lookup failure". I guess those are my ISP's DNS servers? Is there any way to have it point directly at the router maybe?

I also configured "Host name data base:" to "192.168.0.201 myNas", as I was getting some weird: "STATUS=daemon 'smbd' finished starting up and ready to serve connectionsmatchname: host name/name mismatch: 192.168.0.14 != (NULL)" error messages (though that did nothing to help...)

The interesting part is that if I open my router's "LAN" page (which also configures DHCP), there are 3 fields "DNS server1", "DNS server2" and "Domain Name" that I can fill. I tried changing them to use google's 8.8.[8.8|4.4], but it doesn't really change anything. I also tried changing the domain name, but I noticed nothing different.
 
Last edited:
Joined
Mar 6, 2014
Messages
686
Point your "nameservers" to your gateway (router). Do this for your FreeNAS box, as well as your linux pc (the latter one should automatically get that from your router via DHCP however). Configure your router to use your ISP's nameservers (or Google's if you like) for wan/internet acces. If it is your ISP's router, that would probably already be configured. That is what worked for me.
 

UdoB

Dabbler
Joined
Dec 6, 2014
Messages
39
$ getent hosts myNas
$ getent hosts myNas.local
192.168.0.201 myNas.local

If you manage to edit /etc/resolv.conf to have a line
Code:
search .local.

the first getent will probably work. The challenge is to make this persistent as it might get overwritten by DHCP on next reboot.

Best regards
 

monarchdodra

Explorer
Joined
Feb 15, 2012
Messages
79
Point your "nameservers" to your gateway (router). Do this for your FreeNAS box, as well as your linux pc (the latter one should automatically get that from your router via DHCP however). Configure your router to use your ISP's nameservers (or Google's if you like) for wan/internet acces. If it is your ISP's router, that would probably already be configured. That is what worked for me.

I did that, but no cookie. Worst yet, if I do this, then my freenas fails to find *any* nameserver. If I ping google.com, I just get errors.

THAT SAID, I did discover something interesting. I had an interface set to have a fixed IP address with "192.168.0.201". Once I delete that, then my box can properly ping google, and the network sumamry shows the nameservers as defined by my router. However, when I create an interface (either with fixed IP, or DHCP + fixed IP alias), then my freenas box simply seems to not "see" any name servers anymore... It would seem that setting a fixed IP address means my freenas stops querying my router for nameservers...?

I did not have *any* of these problems before! Could it be something weird with the way my new router works?
 
Joined
Mar 6, 2014
Messages
686
Maybe a silly question, but when you set a fixed IP address for FreeNAS, did you also set the IPv4 gateway?
 

monarchdodra

Explorer
Joined
Feb 15, 2012
Messages
79
Maybe a silly question, but when you set a fixed IP address for FreeNAS, did you also set the IPv4 gateway?

How do I do that though?
In the global config, I can only set the default gateway.
When I go to the intefaces page, there is no gateway option. There is just netmask (which I set to /24).

Can you even specify the IP you want without creating an interface?
 
Joined
Mar 6, 2014
Messages
686
That is what i meant. The IPv4 Default Gateway in the global configuration tab of the network settings. Just below the domain name.
 
Joined
Mar 6, 2014
Messages
686
It would seem that setting a fixed IP address means my freenas stops querying my router for nameservers...?
If you specify a static IP you HAVE to also set the default gateway and DNS servers (which could also be the gateway). I made that mistake once, even found a bug :cool:
 

monarchdodra

Explorer
Joined
Feb 15, 2012
Messages
79
That is what i meant. The IPv4 Default Gateway in the global configuration tab of the network settings. Just below the domain name.

OK. That's what I did then. Just double checking.

If you specify a static IP you HAVE to also set the default gateway and DNS servers (which could also be the gateway). I made that mistake once, even found a bug :cool:

Right. That makes things confusing, but can be worked around with a reboot.

In any case, setting my DNS servers ("nameserver") to my default gateway isn't working. When I do this, my nas box can't resolve any names outside the local network. I'm better off just leaving it blank, in which case my freenas *does* resolve what's set in my router 0_o. I guess this means that my router does *NOT* work as a DNS server, but *does* forward DNS IPs via DHCP? This could explain the behavior I'm seeing?

That said, leaving the nameservers blank rather than copy pasted seems to work better: When I do it set them, I seem to get "connectionsmatchname: host name/name mismatch" errors, as well as (apparently) some issues getting jail json data. I haven't had enough time to let things run to know.

Regarding ".local", I'm still nowhere better. I reverted the freenas' domain to "local". I also tried changing my linux box's name from "myLinux" to "myLinux.local". But no cookie either. EDIT: Isn't it possible to just have a freenas without a domain name? My linux box didn't have one...?
 
Last edited:
Joined
Mar 6, 2014
Messages
686
In any case, setting my DNS servers ("nameserver") to my default gateway isn't working. When I do this, my nas box can't resolve any names outside the local network.
I'm better off just leaving it blank, in which case my freenas *does* resolve what's set in my router 0_o. I guess this means that my router does *NOT* work as a DNS server, but *does* forward DNS IPs via DHCP? This could explain the behavior I'm seeing?
Looks to me like something not correctly configured in the router. This SHOULD work:
Global network config:
- set default gateway (router)
- set DNS servers (from your ISP, Google, whatever)
save
Network interface:
- static ip (so DHCP OFF)
- IP in the same subnet as the gateway of course
save

Check if this works. Don't think you need a reboot, but you could try.

Iḿ off to bed now, it's 03:00 here.
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
A client will typically resolve host names using following methods in the following order:

1) hosts file on client
2) DNS
3) peer-to-peer protocols (NetBIOS, mdns, pnrp)

(3) in general sucks, and (2) is broken or not configured on your network. My guess is that you haven't set up a DNS server for your LAN (most people don't do this).

It also sounds like NetBIOS name resolution isn't working perfectly (it never is really). I'd check the smb.conf file on your Linux clients and verify they're in the same workgroup as your freenas server. I'd also verify that the Linux clients are not configured as master browser (there can be only one).

My personal preference if I don't have functional DNS is to use IP addresses.
 

monarchdodra

Explorer
Joined
Feb 15, 2012
Messages
79
OK, thank you guys for your replies. I have a stronger grasp of what's going on now. I was not able to solve the "problem" of ".local", but it's not that big of an issue. While playing around, one of the other things I did notice is that sometimes, in my "Network summary", "Default route" shows up as empty. So maybe the issue is not the router, but that the default route fails to initialize? Does that make any sense?
 
Status
Not open for further replies.
Top