Domain name

Where Penguins and Daemons chill together in the warmth of the Sun.

Moderators: SecretSquirrel, notfred

Domain name

Postposted on Tue Jan 24, 2012 6:13 am

Why do Unix-related OSs always want a domain name as well as a hostname? Sure they can be easily appeased with "local", but that's not the point. What should I put in there? What shouldn't I put in there? Why does the box need to know its domain name at all?
Mothership: Thuban 1055T@3.7GHz, 12GB DDR3, M5A99X EVO, GTX470+Icy Vision Rev.2@840/3800, Vertex 2E 60GB
Supply ship: Sargas@2.8GHz, 12GB DDR3, M4A88TD-V EVO/USB3
Corsair: Macbook Air Ivy Bridge
Crayon Shin Chan
Minister of Gerbil Affairs
 
Posts: 2238
Joined: Fri Sep 06, 2002 11:14 am
Location: Malaysia

Re: Domain name

Postposted on Tue Jan 24, 2012 8:31 am

Unix-related OSs tend to follow standards and a lot of the standards want fully qualified domain names e.g. for sending email. Some other OSs (e.g. Windows) are rather more sloppy about the standards and will skip things that are inconvenient.

For choosing the domain see:
http://superuser.com/questions/117056/h ... me-network
http://serverfault.com/questions/17255/ ... orks/17566

Don't put .local (it can break mDNS) and don't make up some valid TLD (it can break if ICANN ever releases that TLD).
notfred
Grand Gerbil Poohbah
 
Posts: 3731
Joined: Tue Aug 10, 2004 10:10 am
Location: Ottawa, Canada

Re: Domain name

Postposted on Tue Jan 24, 2012 8:36 am

so it can communicate with other hosts on the network and vice versa using DNS rather than IP addresses etc.

You can setup your dhcp server to set the domain and/or hostname of its clients and then register them with your network's DNS server so (on a home network) bedroom.localdomain always points at your bedroom machine. If you were talking about windows boxes then they could communicate with each other with their workgroup names but nix boxes wouldn't want to have to rely on you installing samba before they could get talking so it expects you to do a basic manual setup of DNS even if you never actually use it.

To get a manual setup working you'd still have to register the hostname on your dns server somehow... or perhaps add it to each of your boxes' hosts files if you wanted to be really old skool.

Granted it isn't necessary on home networks as you can just use IPs and anyway most hosts on home networks are only talking to the internet and not to each other so they never need to do local name resolution.
Fernando!
Your mother ate my dog!
cheesyking
Minister of Gerbil Affairs
 
Posts: 2254
Joined: Sun Jan 25, 2004 7:52 am
Location: That London (or so I'm told)

Re: Domain name

Postposted on Tue Jan 24, 2012 8:41 am

notfred wrote:Don't put .local (it can break mDNS) and don't make up some valid TLD (it can break if ICANN ever releases that TLD).


There have been a fair number of "the end in nigh" type stories since ICANN said they were going to start offering custom tlds. I'd imagine there are admins out there who've made some very poor decisions in the light of this.
Fernando!
Your mother ate my dog!
cheesyking
Minister of Gerbil Affairs
 
Posts: 2254
Joined: Sun Jan 25, 2004 7:52 am
Location: That London (or so I'm told)

Re: Domain name

Postposted on Tue Jan 24, 2012 8:48 am

hostname - show or set the system's host name
dnsdomainname - show the system's DNS domain name

ie: dnsdomainname
com

ie: hostname
techreport.com

all of which is set inside /etc/hostname

Best site to explain all this junk: http://jblevins.org/notes/hostname
thegleek
Darth Gerbil
Gold subscriber
 
 
Posts: 7360
Joined: Tue Jun 10, 2003 11:06 am
Location: Detroit, MI

Re: Domain name

Postposted on Tue Jan 24, 2012 8:59 am

notfred wrote:Unix-related OSs tend to follow standards and a lot of the standards want fully qualified domain names e.g. for sending email. Some other OSs (e.g. Windows) are rather more sloppy about the standards and will skip things that are inconvenient.

I would include in the "sloppy other OSes" category those UNIX-related OSes that try to be more friendly to people coming over from the Windows side, e.g. Ubuntu. :wink:
(this space intentionally left blank)
just brew it!
Administrator
Gold subscriber
 
 
Posts: 37673
Joined: Tue Aug 20, 2002 10:51 pm
Location: Somewhere, having a beer


Return to Linux, Unix, and Assorted Madness

Who is online

Users browsing this forum: No registered users and 3 guests