Re: Host Name Problem

On 31 Dec, Rik Burt wrote:

> 1.  Can I give my computer its own hostname?

Yes--absolutely you should--especially if you plan to do any home
networking in the future.

Now, I'm a Slacker, so all I ever did was edit /etc/HOSTNAME, but if as
previously reported, some distros are resetting that file on boot, you
should either edit the rc script to disable that change, or as
suggested, include the hostname command in your rc.local (or whatever
name is appropriate for your distro).

Personally, I use:

$ cat /etc/HOSTNAME

$ cat /etc/hosts
# hosts		This file describes a number of hostname-to-address
#		mappings for the TCP/IP subsystem.  It is mostly
#		used at boot time, when no name servers are running.
#		On small systems, this file can be used instead of a
#		"named" name server.  Just add the names, addresses
#		and any aliases to this file...
# By the way, Arnt Gulbrandsen <agulbra nvg unit no> says that
# should NEVER be named with the name of the machine.  It causes problems
# for some (stupid) programs, irc and reputedly talk. :^)

# Standard entry for loopbacking.	localhost unix
# Personal LAN 	calainar.pennswald.pri calainar

# End of hosts.

Note too that sometimes /etc/hosts is used for redirection of unwanted
domains, like banner ad servers . . .

> 2.  If not then where in all the data my ISP provides through DHCP is my
> hostname or is it even there?

DHCP will only provide what is needed for the network served by that
DHCP server. If you run DHCP on your own LAN, it will primarily assign
IP addresses for the NICs (Network Interface Cards). [If you're coming
from a Win98 or later background, you probably *don't* use DHCP for your
local LAN, instead relying on the automagically supplied LOCAL-LINK
addresses (169.254.x.x). This becomes confusing because MS doesn't
widely advertise this feature--users just set TCP/IP to obtain an IP
automatically. The LOCAL-LINK range is used as a fallback when a DHCP
server is not found, as is the case on all standalone WinDOS boxen, as
well as most WinDOS LANs.]

With respect to your ISP, their DHCP servers will assign the dynamic IP
associated with your network interface which may be software (e.g. ppp0
on a dialup modem) or hardware (e.g. the external/WAN interface on a
router). They will also provide IPs for the DNS servers and Gateway, if

However, unless you have your NIC directly connected to your ISP
(doubtful), your ISP's DHCP servers will *never* assign an IP to your
internal NIC. Most users will be using a dialup or DSL modem, in which
case the dynamic IP is assigned to the ppp or pppoe interface. The only
time your NIC is involved is if you're using a DSL modem w/ an ethernet
interface or a router--and in those cases, your NIC's IP must be
assigned before you can even attempt the connection.


Ob. GNOME content: the Helix setup tools include interfaces for
manipulating DNS & SMB name servers and network adapters . . . 
   ld_barthel yahoo com |
       Organization: The Pennswald Group -- Linux powered!!

Conquest is easy. Control is not. -Kirk (Mirror, Mirror)

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