On 06/11/12 16:36, Joachim Schrod pecked at the keyboard and wrote:
Ken Schneider - openSUSE wrote: own is a well-known technique to shortcut traffic to these hosts.
Also the entry needs to be in the format of:
<IP address> FQDM ALIAS
Example:
123.456.789 webmachine.domain.com webmachine
Ahem, technically no. You probably know that, but I want to mention it for the archives. The format is
IP_address name1 [name2 ...]
-- You can have as many names on the line as you want. -- Only one name is needed. Adding an alias is not mandatory. -- The first name is not necessarily the fully qualified domain name (FQDN), though it's custom to do so. To have a short name first, an arbitrary dotted name second, and than the FQDN is equally valid. That's because FQDN is a concept from DNS that doesn't exist in a hosts file. That leads to: -- Names can have as many or as few periods in them as you want. They don't need to refer to any domain in DNS or so. As long as the contain only alphanumeric characters, minus signs, and periods, they are valid.
Just my 0.03 EUR (adjusted for inflation ;-))
Joachim
I beg to differ: pc1:~ # 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. # Syntax: # # IP-Address Full-Qualified-Hostname Short-Hostname # 127.0.0.1 localhost # special IPv6 addresses ::1 localhost ipv6-localhost ipv6-loopback fe00::0 ipv6-localnet ff00::0 ipv6-mcastprefix ff02::1 ipv6-allnodes ff02::2 ipv6-allrouters ff02::3 ipv6-allhosts -- Ken Schneider SuSe since Version 5.2, June 1998 -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org