Re: Computer host name

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 2009-03-05 at 14:22 -0500, Steve wrote:
> I had thought the same thing but I recently spent some time sifting
> through the code to try to find where the host name is set. What I
> found is that it's not set by dhclient at all. It is set in the
> script /etc/sysconfig/network-scripts/ifup-post by the ipcalc command
> which is passed the IP address that the DHCP server gives your
> machine. Essentially this is a DNS lookup.

In both directions...  DHCP server says here's your IP, or the box has a
static IP set into it.  That IP resolves to this name.  Checking that
name resolves to the same IP.  I am /that/ name.  That's how Linux (and
some services running on the box) works out what its name is, in the
absence of it being fixed some other way (e.g. the user setting a
hostname in a configuration file, regardless of what IP address it gets,
even if that causes problems by using something that doesn't resolve, or
resolves wrongly).

> If you know otherwise or if this is not always true, I'd be interested
> to hear about it.

DHCP clients can tell the DCHP server the name it wants, and DHCP
servers can tell the clients what name it wants them to use.  Neither of
them has to obey.

If you want to fix a name to a box that travels, it's a good idea to
configure the DHCP client to ask for it.  It might help.  But no well
set up server is going to let a client name itself in a manner would
harm a network - such as a rogue box being attached that insists it's
the name server (this being a good admin issue versus bad admin,
people-wise).

On a dynamically configured network, the best approach is centrally
control names and addresses via your DHCP and DNS servers, and have your
clients obey.  You only have one thing to adjust - your server.

-- 
[tim@localhost ~]$ uname -r
2.6.27.15-78.2.23.fc9.i686

Don't send private replies to my address, the mailbox is ignored.  I
read messages from the public lists.



-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux