What's new

LAN hostname syntax: with / without the '.'

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

gatorback

Regular Contributor
I threw a number of keywords at Google to better understand the syntax used to resolved LAN hostnames, but was not successful in finding resolving my questions. Router configuration provided in signature.

Context: Ping commands issued from Win10 command line (CLI):

WIN10> ping hostname(.)
OBSERVATIONS
  1. When hostname is a raspberry-pi: ping requires '.' after the hostname: no reply without the '.'
  2. When hostname is a win10 box, ping responds with IPV6 address
  3. When hostname. is a win10 box, ping responds with IPV4 address
GOAL: resolve the raspberry-pi hostname to the IP address, without the '.' suffix, because an app on the Win10 box does not append the period when trying to communicate with the rPi (and is unable to resolve the IP address). Unfortunately, it's not an option to use the IP address.

QUESTIONS
  1. What are the optimal keywords to Google so as to produce the articles that explain the '.' in LAN hostname resolution? If you recommend a specific article that is also appreciated
  2. Is there a simple ROUTER remedy to resolve the rPi hostname sans '.'
  3. Is there a simple remedy at the WIN10 box to resolve the rPi hostname sans '.'
If there is a decision to be made between router vs a host remedy, I am leaning towards a router solution, however, I am also interested in any line of reasoning to a remedy at the Win10x box. Diagnostic questions are also appreciated: thank you
 
This is basically tied to how your resolver will handle hostnames, and whether or not it has a default domain. If you don't append a trailing dot, the default domain will get appended automatically to the hostname. Putting a trailing dot tells the resolver to not append anything (it means this is a FQDN).

Some resolvers/servers might automatically retry with and without a default domain in case of failure, but this is not always the case.

To resolve these type of issues, the first thing to do is ensure that everyone uses the same default domain. If using DHCP, then configure it at the router level.
 
A lot of folks use .lan which is appropriate for in-house, just avoid .local, as that is reserved for mDNS lookups...
 
Thanks for nudging the conversation forward.

To resolve these type of issues, the first thing to do is ensure that everyone uses the same default domain. If using DHCP, then configure it at the router level

All LAN devices are DHCP configured: I believe that that they are on the same domain. Is there a good CLI test to confirm this is or is not the case?

If using DHCP, then configure it at the router level
Are the relevant router parameters in the screenshot below? Given the number of combinations, please advise which items should be addressed: I am interested in understanding the thought process (or model) that allows one to conclude which items need to be changed and how they should be changed.

A lot of folks use .lan which is appropriate for in-house, just avoid .local, as that is reserved for mDNS lookups...
I think you are suggesting that .lan should be configured in the third item: "RT-AC68U's Domain Name"= lan?


snap00382.jpg
 
I think you are suggesting that .lan should be configured in the third item: "RT-AC68U's Domain Name"= lan?

gateoback.lan would be fine one would think... it's all on the private side, and the .lan TLD isn't in use out on the public internet...
 
This single change allows the Win10 box to resolve (ping) the hostname to an IP address without the '.' appended to the hostname. Thanks to all that responded.

snap00383.jpg
 
Last edited:
This single change allows the Win10 box to resolve (ping) the hostname to an IP address without the '.' appended to the hostname.

snap00383.jpg

As sfx pointed out, it's best to define a "valid" domain, which would include a "fake" TLD. myhome.lan, whateveryouwant.lan, etc...

For example, I use lostrealm.lan at home (while my Internet domain is lostrealm.ca).
 
As sfx pointed out, it's best to define a "valid" domain, which would include a "fake" TLD. myhome.lan, whateveryouwant.lan, etc...

For example, I use lostrealm.lan at home (while my Internet domain is lostrealm.ca).

Would be nice if Asus were to put something in a tooltip "on mouseover" along those lines...
 

Similar threads

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top