DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD General

OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 9th December 2010
jackthechemist jackthechemist is offline
Port Guard
 
Join Date: Dec 2010
Posts: 14
Default Installation: Choosing a host & domain name ... (slightly confused)

Greeting all,

This year I moved from MS Windows to Ubuntu Linux, to Arch Linux, and finally to OpenBSD, which I'm rather enjoying.

During the installation I was asked to provide a host-name, and domain-name. Can anyone come up with a terse explanation of the their significance?

e.g. Suppose I made my hostname "bilbo" and my domainname "shire.middleearth" (is that period even necessary?) I know that "bilbo@shire.middleearth" is me, I'm "bilbo", in the TLD "middleearth", in the subdomain "shire" ... but what does THAT mean? How can I just go making up domain names? I thought I had to register to get those. If someone wanted to send mail to that address how would the DNS servers know where to look?

(Please try to avoid being cryptic) Thanks in advance!

Jack
Reply With Quote
  #2   (View Single Post)  
Old 9th December 2010
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,977
Default

Jack,

If you never connect to the Internet, you can use anything you want for a domain name. The default, you'll note, is "my.domain" which is not usable on the Internet.

Leaving the Internet OUT of the discussion for the moment:

Domain names are, however, tied to DNS -- domain name resolution to IP address. Some applications will attempt to resolve your fully qualified name, such as bilbo.shire.middle-earth. If that name is not provisioned in a DNS server (and you may have one, Internet or not) you must use file based resolving -- the /etc/hosts file.

On the Internet:

If your OpenBSD platform is publicly exposed to the Internet -- you can use the domain name that resolves to that IP address.

If your OpenBSD platform has an indirect connection, such as on a private IP network, you can use /etc/hosts or your own DNS servers to resolve bilbo.shire.middle-earth.
Reply With Quote
  #3   (View Single Post)  
Old 9th December 2010
jackthechemist jackthechemist is offline
Port Guard
 
Join Date: Dec 2010
Posts: 14
Default

Hmmm...(thinking, reading, thinking, reading)

Well, in spite of your excellently worded reply, I know there is still something fundamental I'm just not grasping.

Suppose that two computers are connected to a router and are installed with OpenBSD with the following hostname@domainname:
bilbo@shire.middleearth
frodo@mtdoom.middleearth

First of all I am imagining that each of these exist within the routers domain:

(some higher level domain name)
|
<router's domain-name>
/ \
middleearth middleearth
/ \
mtdoom shire
/ \
frodo bilbo

Am I correct in thinking this? And if I registered a new domain name, would it then take the place of my router's domain name? Something about this doesn't seem right!

If my computer is in a private network with about 2 other computers, it would seem completely unnecessary to specifying the domain name during OpenBSD installation (i.e. if all the computers share the router's domain name, then really they just need unique hostnames; in the above example, the domain middleearth, mtdoom, and shire, are useless)

To be honest, I didn't really know what to put when OpenBSD asked so for a domain name I put "^_^" which it gladly accepted (I installed disconnected from my LAN) so now I'm wondering what if I set up two computers with OpenBSD with exactly the same hostname and domain name?

*looks up* hmm, sorry for the longish reply, and thanks in advance (again) to anyone that cares to give their input!

Jack
Reply With Quote
  #4   (View Single Post)  
Old 9th December 2010
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,977
Default

You're very confused.

First, it's user@host.domain.name -- this is not what you have been considering.

Second, you are right. If it is a private network, or no network at all, you do not need a domain name. But you will still need the name to resolve, via DNS or via /etc/hosts files.

Example: Two computers, "Barbie" and "Ken" are on a private network together. Barbie is at 10.0.0.1, and Ken is at 10.0.0.2.

Obviously, in order for Barbie to reach Ken, applications must either use the 10.0.0.2 IP address, or resolve "Ken" to 10.0.0.2.

What is not quite so clear is that Barbie needs to know it is at 10.0.0.1. This is done through the resolver, which points to DNS server(s), or to the /etc/hosts file, or to both -- in the order you choose. See the resolv.conf(5) man page.

There are many network applications that look up their host name (fully qualified -- meaning including the domain name if there is one) to figure out their own IP address.

You can change your hostname (and domain name) at any time. It's in the /etc/hostname file. See the hostname(5) man page. But what you put in /etc/hosts or in your DNS server configurations should match it.

Both Barbie and Ken need to be able to resolve each other's IP addresses. But they also need to be able to resolve their own.
Reply With Quote
  #5   (View Single Post)  
Old 9th December 2010
jackthechemist jackthechemist is offline
Port Guard
 
Join Date: Dec 2010
Posts: 14
Default

Huh...well that's starting to make MUCH more sense now!

Thank you!

(I'm still not sure which mechanism is responsible for ensuring hosts share and learn the host/domain names of other hosts in a LAN--likely some type of ARP protocol methinks--but that I can discover myself.)

One last lingering obscurity remains...while it makes perfect sense on a scale as large as the Internet, is there any practical reason for hosts in small LANs to have domain names???

(lol, that last question was 20 lines long before I condensed it :P)

***Comon people, don't make jggimi answer ALL the questions!***

Jack
Reply With Quote
  #6   (View Single Post)  
Old 9th December 2010
ocicat ocicat is offline
Administrator
 
Join Date: Apr 2008
Posts: 3,318
Default

Quote:
Originally Posted by jackthechemist View Post
...is there any practical reason for hosts in small LANs to have domain names???
For communication between hosts, one would need to identify other hosts by IP address unless the hosts file is appropriately configured or a DNS server is in place. While the technically oriented can remember a number of hosts numerically, most people can better deal with descriptive names.
Quote:
***Comon people, don't make jggimi answer ALL the questions!***
You are making the assumption that this site has members who can answer questions live as they are posted. This isn't always true; in fact, it is rarely the case. Most members can only check once or twice a day which means that any questions asked are much more likely of getting an answer sometime within 24 hours, not within minutes.
Reply With Quote
  #7   (View Single Post)  
Old 9th December 2010
BSDfan666 BSDfan666 is offline
Real Name: N/A, this is the interweb.
Banned
 
Join Date: Apr 2008
Location: Ontario, Canada
Posts: 2,223
Default

There is no automatic propagation of host names, as has been repeated several times.

During installation when you specify your hostname as "bilbo" no other system is made aware of this name, systems on your internal network must list this hostname in their /etc/hosts file or it must be added to a local resolver.. for example your router might intercept requests for "shire.middleearth" and if "bilbo" is known it would return the IP.

Before the existence of DNS servers all known host/domain names were distributed in a large /etc/hosts file, "hosts" were publicly addressable on the Internet as part of a "domain", for example a university or college.

Also, I'd recommend not using underslashes as part of a host or domain name as their violation of the RFC specifications (..which you may wish to read), basically just avoid choosing a domain name that is on the public Internet, as you'll be unable to reach them.

A small helpful man page exists that attempts to explain the concept of "hostnames" which themselves are just special forms of "domain names", see hostname(7).
Reply With Quote
  #8   (View Single Post)  
Old 10th December 2010
IdOp's Avatar
IdOp IdOp is offline
Too dumb for a smartphone
 
Join Date: May 2008
Location: twisting on the daemon's fork(2)
Posts: 1,027
Default

Quote:
Originally Posted by BSDfan666 View Post
... just avoid choosing a domain name that is on the public Internet, as you'll be unable to reach them.
Exactly so. Hence be sure to avoid choosing a top level domain (TLD) from this list.

What has always puzzled me is that the IANA (or whoever is in charge of deciding these things), apparently has not reserved at least one TLD permanently for private use, i.e., guaranteed that it won't ever be used on the public internet. (Although there have been some suggestions for private name space.) This would be the analog, for domain names, of the well known private IP addresses like 10.x.x.x etc. Since the name space is effectively infinite, the cost of reserving a piece of it would seem negligible.
Reply With Quote
  #9   (View Single Post)  
Old 10th December 2010
jackthechemist jackthechemist is offline
Port Guard
 
Join Date: Dec 2010
Posts: 14
Default

Well, sleep seemed to help.

Your comments really helped me put it all together, thanks!

Hmmm...although if letters, digits and hyphens are the only chars specified in the RFC, it's a little disappointing that the OpenBSD installation let me set my domain-name to "^_^"

Thanks again though!

Jack
Reply With Quote
Old 10th December 2010
ocicat ocicat is offline
Administrator
 
Join Date: Apr 2008
Posts: 3,318
Default

Quote:
Originally Posted by jackthechemist View Post
it's a little disappointing that the OpenBSD installation let me set my domain-name to "^_^"
I can't claim that I can give a definitive reason why this is the case other than:
  • The domain name is written to /etc/myname. If you want to change it, open up the file as root or preferably through sudo(8) or su(1).
  • The installation process is done simply by a shell script. The community sees this as a plus. The installation script is not meant to save users from themselves. It is meant to be a minimalistic tool which gets the job done.
It is also worth repeating that while the OpenBSD developers do make the results of their efforts available to the public with a minimum of restrictions (meaning the BSD license...), the target audience of OpenBSD is the OpenBSD developers themselves. The rest of us sponge off their work. The stated goals of the project can be found at the following:

http://www.openbsd.org/goals.html
Reply With Quote
Old 9th December 2010
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,977
Default

ARP is used only on and among local subnets -- to convert IP addresses to MAC addresses (the serial number of the NIC, if you will) and MAC addresses to IP addresses.

A local DNS server can replace or supplement various /etc/hosts files, or their equivalents on each OS. It can also act as a "local network resolver cache" for resolutions of Internet addresses made by requests from machines on the local network. A request from "Barbie" to resolve the IP address for yahoo.com can be obtained from the local server by "Ken".

But even the DNS server needs to have at least two records for every host provisioned -- one for each direction: IP address to name, name to IP address. This is usually a manual operation, but because DNS is designed to be a tree of servers, each server in most cases only needs a small, humanly managed configuration. And yes, the Internet's DNS, if you combine all the servers interconnected by it, is a very, very large tree.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to set reverse DNS to my domain? guitarscn General software and network 1 12th September 2010 04:58 PM
Hardware Choosing the Right Solid State Drive for Your Storage Network J65nko News 0 6th March 2010 06:04 PM
A little confused. Do "snapshots" (vs dump=image) have any correlation, non-unix? jb_daefo FreeBSD General 9 21st November 2009 04:41 AM
Wireless + wired = confused network setup davidgurvich FreeBSD General 3 27th May 2008 06:10 PM
Choosing a modem for freebsd 7.0 Johnny2Bad General Hardware 3 6th May 2008 02:44 AM


All times are GMT. The time now is 07:16 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick