Re: Setting up LocalHost and LocalNet

John F Hall <jfhall-wwu-8Wqby1sJ1UaTY6FTCsQk+9Bc4/[email protected]> Mon, 14 Aug 2006 12:50:52 +0100
Newsgroups gmane.network.wwwoffle.user
Message-ID <[email protected]>
On Sun, Aug 13, 2006 at 14:57:00 +0200, Micha wrote:
> 
> | address.  If your domainname is lan1 then the name woody actually
> | means woody.lan1, it is just a shortened version of it.
> 
> 
> /home mi: cat /etc/hosts | grep woody
> 127.0.0.1       woody           localhost
> 192.168.1.2	woody.lan1	          # localhost eth0 
> 
> What's wrong with this setup ?

Better is
 127.0.0.1      localhost
 192.168.1.2    woody.lan1 woody     # localhost eth0 

See my (Slackware) hosts file - I don't have the machine name in it as I
have named running:
 #
 # 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 <[email protected]> says that 127.0.0.1
 # should NEVER be named with the name of the machine.  It causes problems
 # for some (stupid) programs, irc and reputedly talk. :^)
 #

 # For loopbacking.
 127.0.0.1	localhost
 # This next entry is technically wrong, but good enough to get TCP/IP apps
 # to quit complaining that they can't verify the hostname on a loopback-only
 # Linux box.
 #127.0.0.1	darkstar.example.net darkstar

 # End of hosts.

-- 
John F Hall