[6351] in RedHat Linux List
Re: How can I pick a domain name?
daemon@ATHENA.MIT.EDU (bilker@bigfoot.com)
Tue Nov 26 22:21:13 1996
Date: Tue, 26 Nov 1996 19:20:23 -0800
To: redhat-list@redhat.com
From: bilker@bigfoot.com
Resent-From: redhat-list@redhat.com
Reply-To: redhat-list@redhat.com
Ed Osinski re-asked a question I asked several weeks ago: "What can I use
as a valid FQDN?" His situation is similar to mine: standalone machine
that connects to the world only by non-permanent PPP links to an ISP that
dyanmically assigns IP numbers.
There have been a few responses to Ed's query --- they have basically
said that Ed should get a domain name. Justin Dobbs suggested picking
anything, e.g.: "freddy.asdf.1234". There are a couple of problems with
this.
1. According to RFC 1035, each component of a domain name must begin
with a letter, may contain only letters, numbers and hyphens, and
may not end with a hyphen. Therefore the "1234" component is
illegal. [[ In practice, I've noticed that not all programs
check the legality of name components, but some might. This could
cause weird problems. ]]
2. A domain name is useful for resolving names into IP addresses.
This is a more flexible method than distributing consistent
/etc/hosts files, if the number of machines is large. But
nameservers need to work together, and no one will know about yours.
It is certainly possible, on a standalone system, to invent a domain
as Justin suggests, but what have you accomplished? You've got a
hostname that has dots in it. But so what? When connected to your
ISP, you use the nameserver at their site to resolve names (URLs,
etc.) But their nameserver won't know about your invented domain,
so no one outside your local net (or standalone system) will be able
to resolve your hostname, regardless of whether said name has dots
or not. So the dots don't buy much, if anything.
I've homebrewed a system whereby I dynamically assign a new hostname to
my standalone system after establishing a PPP link. Basically, I wait
for the link to become established, then use "ifconfig" to determine the
IP address I've been assigned, and from that use the ISP's nameserver to
determine the hostname by which I'm now known to the world. When the
PPP links is dissolved, I set the hostname back to an unqualified name
("sludge"). This is the hostname that is assigned at boot (when there is
no PPP link).
The second essential part of my homebrew system is the /etc/resolv.conf
file. Many people have remarked here that sendmail "hangs" for a few
minutes during boot. Essentially, what is happening is that sendmail
is attempting to resolve the hostname through a nameserver. Since there
is no network connection (PPP not up), sendmail waits until the resolver
times out. This is the delay. I get around this by haveing in place, at
boot time, an "empty" /etc/resolv.conf file. Thus there is no nameserver
that sendmail (through the resolver library functions) attempts to contact,
and thus no delay.
So in sum:
at boot:
hostname: sludge
/etc/resolve.conf -- symlink --> /etc/resolv.conf-noapp
ppp-on script outline:
/etc/resolv.conf -- symlink --> /etc/resolv.conf-isp
<start pppd, dial up ISP, etc.>
once PPP link established:
use ifconfig to determine IP address
use IP address to determine FQDN (from ISP's nameserver)
set hostname to the FQDN
[[ for example, right now my hostname is "max2-151.spiritone.com",
but last night it was "max1-50.spiritone.com". ]]
once PPP link terminates, put things back to boottime conditions:
set hostname back to sludge
/etc/resolv.conf -- symlink--> /etc/resolv.conf-noapp
The only problems with this (so far) are:
1. A crash or powerfail with PPP up leaves the wrong /etc/resolv.conf
file in place. This is not serious, and could be fixed via "rc".
2. without proper training, sendmail uses a default "From: <bilker@sludge>"
header in outgoing mail (I use an emacs macro to override).
------------ /etc/resolv.conf-noapp The "empty" resolver config file ----
search
nameserver
--------------------------------------------------------------------------
I've sent my scripts and programs out to a few people. I'll send them to
anyone who asks. I'd also be interested in hearing better ideas, as I'm
under no illusions that this is the best of all possible solutions.
Bill Kerr
bilker@sludge (haha)
--
PLEASE read the Red Hat FAQ, Tips, Errata and the MAILING LIST ARCHIVES!
________________________________________________________________________
http://www.redhat.com/RedHat-FAQ http://www.redhat.com/RedHat-Errata
http://www.redhat.com/RedHat-Tips http://www.redhat.com/mailing-lists
------------------------------------------------------------------------
To unsubscribe: mail -s unsubscribe redhat-list-request@redhat.com < /dev/null