version 2, including all changes.
.
Rev |
Author |
# |
Line |
1 |
perry |
1 |
---- |
|
|
2 |
__NAME__ |
|
|
3 |
|
|
|
4 |
|
|
|
5 |
hostname - host name resolution description |
|
|
6 |
__DESCRIPTION__ |
|
|
7 |
|
|
|
8 |
|
|
|
9 |
Hostnames are domains. A domain is a hierarchical, dot-sep- |
|
|
10 |
arated list of subdomains. For example, the machine |
|
|
11 |
``monet'', in the ``Berkeley'' subdomain |
|
|
12 |
of the ``EDU'' sub- domain of the Internet Domain |
|
|
13 |
Name System would be repre- sented as |
|
|
14 |
|
|
|
15 |
|
|
|
16 |
monet.Berkeley.EDU |
|
|
17 |
|
|
|
18 |
|
|
|
19 |
(with no trailing dot). |
|
|
20 |
|
|
|
21 |
|
|
|
22 |
Hostnames are often used with network client and server pro- |
|
|
23 |
grams, which must generally translate the name to an address |
|
|
24 |
for use. (This task is usually performed by the library |
|
|
25 |
routine gethostbyname(3).) The default method for |
|
|
26 |
resolving hostnames by the Internet name resolver is to |
|
|
27 |
follow RFC 1535's security recommendations. Actions can be |
|
|
28 |
taken by the administrator to override these recommendations |
|
|
29 |
and to have the resolver behave the same as earlier, non-RFC |
|
|
30 |
1535 resolvers. |
|
|
31 |
|
|
|
32 |
|
|
|
33 |
The default method (using RFC 1535 guidelines) |
|
|
34 |
follows: |
|
|
35 |
|
|
|
36 |
|
|
|
37 |
If the name consists of a single component, i.e. contains no |
|
|
38 |
dot, and if the environment variable |
|
|
39 |
``HOSTALIASES'' is set to the name of a file, that |
|
|
40 |
file is searched for a string matching the input hostname. |
|
|
41 |
The file should consist of lines made up of two strings |
|
|
42 |
separated by white-space, the first of which is the hostname |
|
|
43 |
alias, and the second of which is the complete hostname to |
|
|
44 |
be substituted for that alias. If a case-insensitive match |
|
|
45 |
is found between the hostname to be resolved and the first |
|
|
46 |
field of a line in the file, the substituted name is looked |
|
|
47 |
up with no further pro- cessing. |
|
|
48 |
|
|
|
49 |
|
|
|
50 |
If there is at least one dot in the name, then the name is |
|
|
51 |
first tried ``as-is''. The number of dots to cause this |
|
|
52 |
action is configurable by setting the threshold using the |
|
|
53 |
``ndots'' option in /etc/resolv.conf |
|
|
54 |
(default: 1). If the name ends with a dot, the trailing dot |
|
|
55 |
is removed, and the remaining name is looked up (regardless |
|
|
56 |
of the setting of the ndots option), without |
|
|
57 |
further processing. |
|
|
58 |
|
|
|
59 |
|
|
|
60 |
If the input name does not end with a trailing dot, it is |
|
|
61 |
looked up by searching through a list of domains until a |
|
|
62 |
match is found. If neither the search option in the |
|
|
63 |
/etc/resolv.conf file or the |
|
|
64 |
``LOCALDOMAIN'' environment variable is used, then |
|
|
65 |
the search list of domains contains only the full domain |
|
|
66 |
specified by the domain option (in |
|
|
67 |
/etc/resolv.conf) or the domain used in the local |
|
|
68 |
hostname (see hostname(1) and |
|
|
69 |
resolver(5)). For example, if the |
|
|
70 |
``domain'' option is set to |
|
|
71 |
CS.Berkeley.EDU, then only CS.Berkeley.EDU |
|
|
72 |
will be in the search list, and this will be the only domain |
|
|
73 |
appended to the partial hostname. For exam- ple, if |
|
|
74 |
``lithium'' is the name to be resolved, this would |
|
|
75 |
make lithium.CS.Berkeley.EDU the only name to be |
|
|
76 |
tried using the search list. |
|
|
77 |
|
|
|
78 |
|
|
|
79 |
If the search option is used in |
|
|
80 |
/etc/resolv.conf or the environment variable |
|
|
81 |
``LOCALDOMAIN'' is set by the user, then the search |
|
|
82 |
list will include what is set by these meth- ods. For |
|
|
83 |
example, if the ``search'' option |
|
|
84 |
contained |
|
|
85 |
|
|
|
86 |
|
|
|
87 |
CS.Berkeley.EDU CChem.Berkeley.EDU |
|
|
88 |
Berkeley.EDU |
|
|
89 |
|
|
|
90 |
|
|
|
91 |
then the partial hostname (e.g., ``lithium'') will |
|
|
92 |
be tried with ''each'' domain name appended (in the same |
|
|
93 |
order speci- fied); the resulting hostnames that would be |
|
|
94 |
tried are: |
|
|
95 |
|
|
|
96 |
|
|
|
97 |
lithium.CS.Berkeley.EDU |
|
|
98 |
lithium.CChem.Berkeley.EDU |
|
|
99 |
lithium.Berkeley.EDU |
|
|
100 |
The environment variable ``LOCALDOMAIN'' overrides the ``search'' and ``domain'' options, and if both search and domain options are present in the resolver configuration file, then only the ''last'' one listed is used (see resolver(5)). |
|
|
101 |
|
|
|
102 |
|
|
|
103 |
If the name was not previously tried ``as-is'' (i.e., it |
|
|
104 |
fell below the ``ndots'' threshold or did not |
|
|
105 |
contain a dot), then the name as originally provided is |
|
|
106 |
attempted. |
|
|
107 |
__ENVIRONMENT__ |
|
|
108 |
LOCALDOMAIN |
|
|
109 |
Affects domains appended to partial host- names. |
|
|
110 |
|
|
|
111 |
|
|
|
112 |
HOSTALIASES |
|
|
113 |
Name of file containing (host alias, full hostname) pairs. |
|
|
114 |
|
|
|
115 |
|
|
|
116 |
__FILES__ |
|
|
117 |
/etc/resolv.conf |
|
|
118 |
See resolve(5). |
|
|
119 |
|
|
|
120 |
|
|
|
121 |
__SEE ALSO__ |
|
|
122 |
|
|
|
123 |
|
|
|
124 |
gethostbyname(3), resolver(5), |
|
|
125 |
mailaddr(7), named(8). |
|
|
126 |
|
|
|
127 |
|
2 |
perry |
128 |
4th Berkeley !DistributionFebruary 16, 1994 1 |
1 |
perry |
129 |
---- |