*BSD News Article 98747


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!platinum.sge.net!como.dpie.gov.au!news.gan.net.au!act.news.telstra.net!vic.news.telstra.net!news.mira.net.au!news.netspace.net.au!news.mel.connect.com.au!munnari.OZ.AU!uunet!in3.uu.net!144.212.100.12!news.mathworks.com!cam-news-hub1.bbnplanet.com!cpk-news-hub1.bbnplanet.com!news.bbnplanet.com!rill.news.pipex.net!pipex!tank.news.pipex.net!pipex!news.utell.co.uk!shift.utell.net!nobody
From: brian@shift.utell.net (Brian Somers)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: Hostname for box w/ part time internet connection
Date: Mon, 30 Jun 1997 10:46:37 +0100
Organization: Awfulhak Ltd.
Lines: 148
Message-ID: <t9v7p5.lc2.ln@shift.utell.net>
References: <24aac599.u9t27e.1@slip106.termserv.siu.edu>
Reply-To: brian@awfulhak.org, brian@utell.co.uk
NNTP-Posting-Host: shift.utell.net
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Newsreader: knews 0.9.8
Xref: euryale.cc.adfa.oz.au comp.unix.bsd.freebsd.misc:43735

In article <24aac599.u9t27e.1@slip106.termserv.siu.edu>,
	jimd@slip106.termserv.siu.edu (Jim Dutton) writes:
> Hi Brian, on Jun 30 you wrote:
> 
> [...]
>> If the truth's to be known, IMO, a machine name is bogus to start
> 
> Not true.
> 
>> with.  If I have a machine with N network interfaces, then by
>> definition, I have N names.  So what makes any one of these names
> 
> Not true. Haven't you ever heard of MULTIHOMED hosts? In the DNS, there
> may be multiple A records with the same hostname. This constitutes
> ONE host with N addresses, one for each interface. A variant on this
> is ALIAS IP addresses defined via IFCONFIG for the same interface, but
> there still is the question of proper DNS definitions.

This is fine for stuff on the same network segment, but if I have two
'net connections (or 2 connections to any given network) that aren't
on the same subnet, I then have two names.

I agree, that what I'm doing isn't strictly right - I'm talking
from one network to another without having a "legal presence"
on the other.

> [...]
> 
> Brian - I think that you and I are talking about two different things;
> two different kinds of networks/network setups. Isolated LAN's (most
> likely without DNS) don't have as much of a need to worry about proper
> hostnames since nobody else in the world will see them. A properly
> configured Net-10 network is required by RFC to keep ALL of its interna=
> l
> names (and addresses) from ever leaving said network.

This is the key to my saying that hostnames are bogus.  If any
software transmits your hostname (as distinct from the name
found by a reverse-lookup on the interfaces IP), it is *wrong*.

With my previous example, the 158.152.17.1 address is my
hostname (awfulhak.demon.co.uk), but X transmits that
to 10.0.1.4..... why ?  It should be transmitting the
name of 10.0.1.1 'cos that's the network address that
belongs on the network on which the traffic is being
sent.

> When you give the blanket "choose any name" response to someone who
> is connecting to the Internet, you are implying that there are no RFC's
> (or "regulations") that govern host definitions on the Internet, but th=
> is
> is not the case.

But it is.  My hostname can be anything I want.  Who's to say
that the Internet is the "real" network.

>> So what ?  Any problems resulting are IMO software bugs.
> 
> Umm - how is choosing a hostname a software bug, when it was a HUMAN
> that configured the name into the software???

That's not what I mean.  The hostname is something that
should *not* be transmitted.  The reverse-lookup of the
interface IP should always be used.

If you agree that the hostname should not be transmitted (it
can't be when a machine's connected to two different networks),
then you host name is irrelevent.

>> Of course in the above example, 10.0.1.4 shouldn't really
>> be allowed to do things like send mail and post to usenet -
>> there's no way for that machine to create correct From:
>> lines or to create unique message ids.  This is circumvented
>> (in my case) by hacking sendmail full of things like
>> MASQUERADE_AS, and setting "reply-to" addresses in usenet.
> 
> Ah, so you DO use proper (DNS) hostnames, somewhere - thank you.
> 
>> A good example is this message.  It's posted from that 10.0.1.4
>> machine (ok, in practice, 10.0.1.1 *is* a gateway!).  I've called
>> my LAN "lan.awfulhak.org" because I own "awfulhak.org" and know
> 
> Hmmm - here is another difference between what you and I are talking
> about. You have your OWN network with its OWN registered Internic
> domain. Most people your advice is going to, do NOT have this type
> of scenario (as was particular to our local student).
> 
> Since you already OWN "awfulhak.org", you (and you alone) have the righ=
> t
> to choose anything to the left of that domain name (considering RFC
> constraints of course). But then, what you choose will be meaningless t=
> o
> the rest of the Internet if it isn't defined in a DNS.
> 
> Users who do not OWN their own network (properly Internic registered)
> do NOT have the legal right to choose whatever they want for their host=
> name
> when they connect that host to the Internet (or perhaps some other loca=
> l
> organizational network). This is where the suggestion of "just choose
> anything" leads people into trouble (ie; reverse name lookup security,
> refused E-mails, responsible DNS Admins, etc.).

Maybe if the person doesn't know what they're doing - maybe even
if the person does.  All of the above should not be a result of
the machine having some arbitrary hostname (although in the
case of sendmail, it most probably is).

>> > Anthony - take a look at the MANual page for PPPD. It should have s=
> ome
>> > information on setting up an "IP-UP" script for use with PPP which =
> you
>> > SHOULD USE to properly set your hostname and IP address to what is
>> > determined during the PPP negotiation. I can post a sample script l=
> ater
>> > (with IFCONFIG, and HOSTNAME commands) if need be.
>>=20
>> I hope this doesn't involve changing your "hostname" while running.
>> This gets tricky.  You've got to at least HUP sendmail (assuming it's
>> being run with a full path name), and you must restart things like
>> rwhod & (old versions of) nmbd and any other brainos that use hostnam=
> e.
> 
> The IP-UP script invoked by PPP can take care of all of this, so there =
> is
> no need to worry anything getting tricky. Use the script to IFCONFIG th=
> e
> dial-up/PPP interface (any other interfaces would simply use the static
> /etc/hostname.... configuration process),  set the HOSTNAME according t=
> o
> what PPP returned, and recycle or start any other tasks that are depend=
> ent
> upon the current hostname, if need be. Tres simple.

The *problem* with changing your host name is that restarting tasks
is not necessarily that easy (depending on your application).


The real answer is not to have a hostname - the software that
currently thinks it needs a hostname should be made smarter
(including the almost infinitely smart/complicated/stupid sendmail)
and should determine its interface "context" before it thinks
it knows the answer.

-- 
Brian <brian@awfulhak.org> <brian@freebsd.org>
      <http://www.awfulhak.org>
Don't _EVER_ lose your sense of humour !