Re: Computer host name

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

 



---- Rick Stevens <ricks@xxxxxxxx> wrote: 
> James Allsopp wrote:
> > Hi,
> > I've deactivated NetworkManager as it was interfering with my wireless
> > networking, but since then my computer has been renamed to
> > <ip-address>-bethere.co.uk, instead of localhost.localdomain. I've
> > looked at /etc/hosts
> > /etc/sysconfig/network
> > and these are all set up as localhost.localdomain and the network card
> > facing the internet is set up statically.
> > 
> > Anyone have any ideas how to stop this happening?
> 
> If you are running a DHCP client (and it looks like you are), the DHCP
> server you're using gave your machine a host name.  That's pretty
> normal.

I don't think that this is true. At least not if you're running dhcp-4.0.0 as I am on my F9 system.
$ rpm -qa | grep dhclient
dhclient-4.0.0-22.fc9.x86_64

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.

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

> My guess is that your ISP is "bethere.co.uk", therefore they gave you
> a hostname that reflects the IP address they gave you.  That's good,
> generally, because that means they're probably maintaining a reverse DNS
> entry for your IP address that points at you.
> 
> You can ignore the host name the DHCP server gives you by editing the
> DHCP client config on your machine and adding
> 
> 	supercede host-name localhost.localdomain;
> 
> to the lease clause.  See "man dhclient.conf" and "man dhcp-options".

You can also put

send host-name "my_host_name";

in the dhclient.conf file or add

DHCP_HOSTNAME="my_host_name"

to /etc/sysconfig/network

Steve

-- 
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