Subject: Re: dhclient & hostname interactions
To: None <current-users@netbsd.org>
From: Bob Bernstein <rs@bernstein.providence.ri.us>
List: current-users
Date: 04/07/2003 00:16:58
On Mon, Apr 07, 2003 at 01:21:38PM +1000, George Michaelson wrote:
> I have /etc/myname defining my hostname.
>
> but from the behaviours I see moving from cable at home, IETF and office,
> dhclient overrides hostname.
This may be a feature of your cable company, since I have a hostname
defined in /etc/myname and get an IP from my cable company with no
sendmail problems.
However, I'm not sure why you feel you need to override the
cable-supplied hostname. For me:
rs ~$ hostname
localhost.localdomain
rs ~$ cat /etc/myname
localhost.localdomain
I find this useful in some contexts wherein I don't wish to reveal who
I "really" am, and I can use it for local LAN purposes. However:
rs ~$ ifconfig ex0
ex0: flags=8863<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTICAST> mtu
1500
capabilities=7<IP4CSUM,TCP4CSUM,UDP4CSUM>
enabled=0
address: 00:50:04:9a:ca:81
media: Ethernet autoselect (10baseT)
status: active
inet 12.3.45.678 netmask 0xfffffc00
[snip]
and:
rs ~$ host 12.3.45.678
678.45.3.12.IN-ADDR.ARPA domain name pointer ip12-3-45-678.ri.ri.cox.net
(IP munged, of course...)
So, I have a "real" internet IP address, and a "real" internet
hostname, in the sense that one can look up the one with the other
with a "real" DNS service.
Are you saying you want the "real" IP address, but wish to assign your
own made-up hostname to it? What does this gain you? Sometimes I wish
to override dhcp host-provided data, particularly DNS server IPs, and
then I use a 'prepend' statement in a /etc/dhclient.conf file. But
currently, I don't even have one of those files! Don't need it.
(And, I realize we're rapidly lurching off-topic...)
--
Bob Bernstein M: Argument is an intellectual process.
Contradiction is just the automatic
gainsaying of any statement the other
person makes.
A: No it isn't.