09-24-2014
Hi,
The /etc/hosts file is local only to the server that it is on - other servers don't actually know about it.
It is used to allow the local server to identify other hosts on a network, it has generally fallen out of favour where there are comprehensive DNS services etc.
Regards
Dave
10 More Discussions You Might Find Interesting
1. IP Networking
ok i have a question now when i add machines on network that are running unix do i add them in the /etc/hosts file also include them in dns (4 Replies)
Discussion started by: rmuhammad
4 Replies
2. UNIX for Advanced & Expert Users
Hey all,
I'm having some apache problems. I've installed apache countless times on FreeBSD. However, I'm having some problems and I could use some help. Here is my system info:
FreeBSD 5.2.1
Apache 2.0.51 (/usr/local/apache2), doc root (/www symlink to /var/www)
PHP 5.0.1 (/usr/local/php)... (2 Replies)
Discussion started by: ezekiel61
2 Replies
3. IP Networking
Hi
I have my DNS servers (BIND 8) running on two Solaris 8 boxes. I need to be able to resolve an address blah.xxx.net to an IP address followed by :8080 - (for Tomcat). I tried doing this in my zone file but it failed. Can someone give me a pointer on where this configuration should be done?... (1 Reply)
Discussion started by: korfnz
1 Replies
4. UNIX for Advanced & Expert Users
I have configured my solaris 9 box to obtain a IP from the DHCP server which is on windows, I have also set up the DNS with domain name and name servers under /etc/resolv.conf
I can ping a ip address I just cant seem to ping hostnames, theres probaly something im not doing. I have looked through... (9 Replies)
Discussion started by: Mr Pink
9 Replies
5. UNIX for Advanced & Expert Users
Hi,
This is more of a verification rather than a question of technical nature.
This is based on solaris 10 machine
Could we use Virtual hosts (within our hosts file):
123.1.1.10 virtual_host_name
123.1.1.10 host_A
(note: 123.1.1.10 - host_A is also in our DNS server entry)
And... (0 Replies)
Discussion started by: jackola
0 Replies
6. Solaris
Hi all
Is there any reason to have "hosts ldap dns" as line in /etc/nsswitch.conf ? My understanding is that ldap does not contain any host information..(?)
Best regards...Ludwig (1 Reply)
Discussion started by: ludwig
1 Replies
7. Solaris
As i understand, host/nslookup/dig only query DNS server to resolve name to ip.
ping can query both, but it seems if ping is blocked, ping won't return IP.
traceroute can query both, but i am not able to test if traceroute is blocked, What is the result?
Neither ping/traceroute is... (3 Replies)
Discussion started by: honglus
3 Replies
8. IP Networking
Hi all,
I have an entry in my hosts file on a server called tractor as follows:
10.67.34.128 digger-m2m digger
I have a DNS server configured but it doesn't seem to know about digger. When I do an nslookup on tractor for digger i get the following:
new_dns1.oam.uk can't find digger: Non... (0 Replies)
Discussion started by: Donkey25
0 Replies
9. IP Networking
Old skool UNIX and Linux geek here, but newbie to the world of DNS and bind. I've recently been tasked with replacing our DNS infrastructure, currently on Windows, with a RHEL based solution. And I assume that means using bind, which I've not used before. Here's my question:
Suppose our company... (3 Replies)
Discussion started by: lupin..the..3rd
3 Replies
10. AIX
Hello guys,
I am new to AIX .
I have two AIX v5.3 servers running BIND DNS service on them. The plan is to shut down only the DNS service on them, but in order to do that I have to determine which internal hosts are still using the servers to resolve DNS queries.
Can you please advice on... (2 Replies)
Discussion started by: tihomirvs
2 Replies
HOSTS(5) Debian GNU/Linux manual HOSTS(5)
NAME
hosts - The static table lookup for host names
SYNOPSIS
/etc/hosts
DESCRIPTION
This manual page describes the format of the /etc/hosts file. This file is a simple text file that associates IP addresses with hostnames,
one line per IP address. For each host a single line should be present with the following information:
IP_address canonical_hostname aliases
Fields of the entry are separated by any number of blanks and/or tab characters. Text from a "#" character until the end of the line is a
comment, and is ignored. Host names may contain only alphanumeric characters, minus signs ("-"), and periods ("."). They must begin with
an alphabetic character and end with an alphanumeric character. Aliases provide for name changes, alternate spellings, shorter hostnames,
or generic hostnames (for example, localhost). The format of the host table is described in RFC 952.
The Berkeley Internet Name Domain (BIND) Server implements the Internet name server for UNIX systems. It augments or replaces the
/etc/hosts file or host name lookup, and frees a host from relying on /etc/hosts being up to date and complete.
In modern systems, even though the host table has been superseded by DNS, it is still widely used for:
bootstrapping
Most systems have a small host table containing the name and address information for important hosts on the local network. This is
useful when DNS is not running, for example during system bootup.
NIS Sites that use NIS use the host table as input to the NIS host database. Even though NIS can be used with DNS, most NIS sites still
use the host table with an entry for all local hosts as a backup.
isolated nodes
Very small sites that are isolated from the network use the host table instead of DNS. If the local information rarely changes, and
the network is not connected to the Internet, DNS offers little advantage.
EXAMPLE
127.0.0.1 localhost
192.168.1.10 foo.mydomain.org foo
192.168.1.13 bar.mydomain.org bar
216.234.231.5 master.debian.org master
205.230.163.103 www.opensource.org
HISTORICAL NOTE
Before the advent of DNS, the host table was the only way of resolving hostnames on the fledgling Internet. Indeed, this file could be cre-
ated from the official host data base maintained at the Network Information Control Center (NIC), though local changes were often required
to bring it up to date regarding unofficial aliases and/or unknown hosts. The NIC no longer maintains the hosts.txt files, though looking
around at the time of writing (circa 2000), there are historical hosts.txt files on the WWW. I just found three, from 92, 94, and 95.
FILES
/etc/hosts
SEE ALSO
hostname(1) resolver(3), resolver(5), hosts(5), hostname(7), named(8), Internet RFC 952
AUTHOR
This manual page was written by Manoj Srivastava <srivasta@debian.org>, for the Debian GNU/Linux system.
Debian 2002-06-16 HOSTS(5)