3 d93fca6a 2005-02-11 devnull ndb \- Network database
4 d93fca6a 2005-02-11 devnull .SH DESCRIPTION
6 d93fca6a 2005-02-11 devnull The network database consists of files
7 d93fca6a 2005-02-11 devnull describing machines known to the local
8 d93fca6a 2005-02-11 devnull installation and machines known publicly.
9 d93fca6a 2005-02-11 devnull The files comprise multi-line tuples made up of
10 d93fca6a 2005-02-11 devnull attribute/value pairs of the form
11 d93fca6a 2005-02-11 devnull .IB attr = value
12 d93fca6a 2005-02-11 devnull or sometimes just
13 d93fca6a 2005-02-11 devnull .IR attr .
14 d93fca6a 2005-02-11 devnull Each line starting without white space starts a new tuple.
15 d93fca6a 2005-02-11 devnull Lines starting with
17 d93fca6a 2005-02-11 devnull are comments.
20 d93fca6a 2005-02-11 devnull .B /lib/ndb/local
21 d93fca6a 2005-02-11 devnull is the root of the database.
22 d93fca6a 2005-02-11 devnull Other files are included in the
23 d93fca6a 2005-02-11 devnull database if a tuple with an
24 d93fca6a 2005-02-11 devnull attribute-value pair of attribute
25 d93fca6a 2005-02-11 devnull .B database
26 d93fca6a 2005-02-11 devnull and no value exists in
27 d93fca6a 2005-02-11 devnull .BR /lib/ndb/local
.
28 d93fca6a 2005-02-11 devnull Within the
29 d93fca6a 2005-02-11 devnull .B database
31 d93fca6a 2005-02-11 devnull each pair with attribute
33 d93fca6a 2005-02-11 devnull identifies a file to be included in the database. The files are searched
34 d93fca6a 2005-02-11 devnull in the order they appear.
35 d93fca6a 2005-02-11 devnull For example:
38 d93fca6a 2005-02-11 devnull database=
39 d93fca6a 2005-02-11 devnull file=/lib/ndb/common
40 d93fca6a 2005-02-11 devnull file=/lib/ndb/local
41 d93fca6a 2005-02-11 devnull file=/lib/ndb/global
44 d93fca6a 2005-02-11 devnull declares the database to be composed of the three files
45 d93fca6a 2005-02-11 devnull .BR /lib/ndb/common ,
46 d93fca6a 2005-02-11 devnull .BR /lib/ndb/local ,
48 d93fca6a 2005-02-11 devnull .BR /lib/ndb/global .
49 d93fca6a 2005-02-11 devnull By default,
50 d93fca6a 2005-02-11 devnull .B /lib/ndb/local
51 d93fca6a 2005-02-11 devnull is searched before the others.
53 d93fca6a 2005-02-11 devnull .B /lib/ndb/local
54 d93fca6a 2005-02-11 devnull may be included in the
55 d93fca6a 2005-02-11 devnull .B database
56 d93fca6a 2005-02-11 devnull to redefine its ordering.
58 d93fca6a 2005-02-11 devnull Within tuples, pairs on the same line bind tighter than
59 d93fca6a 2005-02-11 devnull pairs on different lines.
61 d93fca6a 2005-02-11 devnull Programs search the database directly using the routines in
62 83c4506a 2005-02-11 devnull .IR ndb (3).
63 d93fca6a 2005-02-11 devnull .\" or indirectly using
64 d93fca6a 2005-02-11 devnull .\" .B ndb/cs
66 d93fca6a 2005-02-11 devnull .\" .B ndb/dns
68 d93fca6a 2005-02-11 devnull .\" .IR ndb (1)).
70 d93fca6a 2005-02-11 devnull .\" .B ndb/cs
71 d93fca6a 2005-02-11 devnull The routine
72 d93fca6a 2005-02-11 devnull .I ndbipinfo
73 d93fca6a 2005-02-11 devnull imposes structure on the otherwise flat database by using
74 d93fca6a 2005-02-11 devnull knowledge specific to the network.
75 d93fca6a 2005-02-11 devnull The internet is made up of networks which can be subnetted
76 d93fca6a 2005-02-11 devnull multiple times. A network must have an
78 d93fca6a 2005-02-11 devnull attribute and is uniquely identified by the values of its
81 d93fca6a 2005-02-11 devnull .B ipmask
82 d93fca6a 2005-02-11 devnull attributes. If the
83 d93fca6a 2005-02-11 devnull .B ipmask
84 d93fca6a 2005-02-11 devnull is missing, the relevant Class A, B or C one is used.
86 d93fca6a 2005-02-11 devnull A search for an attribute associated with a network or host starts
87 d93fca6a 2005-02-11 devnull at the lowest level, the entry for the host or network itself,
88 d93fca6a 2005-02-11 devnull and works its way up, bit by bit, looking at entries for nets/subnets
89 d93fca6a 2005-02-11 devnull that include the network or host. The search ends when the attribute
90 d93fca6a 2005-02-11 devnull is found.
91 d93fca6a 2005-02-11 devnull For example, consider at the following entries:
94 d93fca6a 2005-02-11 devnull ipnet=murray-hill ip=135.104.0.0 ipmask=255.255.0.0
95 d93fca6a 2005-02-11 devnull dns=135.104.10.1
96 d93fca6a 2005-02-11 devnull ntp=ntp.cs.bell-labs.com
97 d93fca6a 2005-02-11 devnull ipnet=plan9 ip=135.104.9.0 ipmask=255.255.255.0
98 d93fca6a 2005-02-11 devnull ntp=oncore.cs.bell-labs.com
99 d93fca6a 2005-02-11 devnull smtp=smtp1.cs.bell-labs.com
100 d93fca6a 2005-02-11 devnull ip=135.104.9.6 sys=anna dom=anna.cs.bell-labs.com
101 d93fca6a 2005-02-11 devnull smtp=smtp2.cs.bell-labs.com
106 d93fca6a 2005-02-11 devnull is on the subnet
107 d93fca6a 2005-02-11 devnull .B plan9
108 d93fca6a 2005-02-11 devnull which is in turn on the class B net
109 d93fca6a 2005-02-11 devnull .BR murray-hill .
110 d93fca6a 2005-02-11 devnull Assume that we're searching for
111 d93fca6a 2005-02-11 devnull .BR anna 's
115 d93fca6a 2005-02-11 devnull servers.
116 d93fca6a 2005-02-11 devnull The search starts by looking for an entry with
117 d93fca6a 2005-02-11 devnull .BR sys=anna .
118 d93fca6a 2005-02-11 devnull We find the anna entry. Since it has an
119 d93fca6a 2005-02-11 devnull .B smtp=smtp2.cs.bell-labs.com
121 d93fca6a 2005-02-11 devnull we're done looking for that attribute.
122 d93fca6a 2005-02-11 devnull To fulfill the NTP request, we continue by looking for networks
123 d93fca6a 2005-02-11 devnull that include anna's IP address.
124 d93fca6a 2005-02-11 devnull We lop off the right most one bit from anna's address and
125 d93fca6a 2005-02-11 devnull look for an
126 d93fca6a 2005-02-11 devnull .B ipnet=
127 d93fca6a 2005-02-11 devnull entry with
128 d93fca6a 2005-02-11 devnull .BR ip=135.104.9.4 .
129 d93fca6a 2005-02-11 devnull Not finding one, we drop another bit and look for an
130 d93fca6a 2005-02-11 devnull .B ipnet=
131 d93fca6a 2005-02-11 devnull entry with
132 d93fca6a 2005-02-11 devnull .BR ip=135.104.9.0 .
133 d93fca6a 2005-02-11 devnull There is
134 d93fca6a 2005-02-11 devnull such an entry and it has the pair,
135 d93fca6a 2005-02-11 devnull .BR ntp=oncore.cs.bell-labs.com ,
136 d93fca6a 2005-02-11 devnull ending our search.
138 d93fca6a 2005-02-11 devnull .\" .I Ndb/cs
139 d93fca6a 2005-02-11 devnull .\" can be made to perform such network aware
140 d93fca6a 2005-02-11 devnull .\" searches by using metanames in the dialstring.
141 d93fca6a 2005-02-11 devnull .\" A metaname is a
142 d93fca6a 2005-02-11 devnull .\" .I $
143 d93fca6a 2005-02-11 devnull .\" followed by an attribute name.
144 d93fca6a 2005-02-11 devnull .\" .I Ndb/cs
145 d93fca6a 2005-02-11 devnull .\" looks up the attribute relative to the system it is running
146 d93fca6a 2005-02-11 devnull .\" on. Thus, with the above example, if a program called
149 d93fca6a 2005-02-11 devnull .\" dial("tcp!$smtp!smtp", 0, 0, 0);
152 d93fca6a 2005-02-11 devnull .\" the dial would connect to the SMTP port of
153 d93fca6a 2005-02-11 devnull .\" .BR smtp2.cs.bell-labs.com .
155 d93fca6a 2005-02-11 devnull A number of attributes are meaningful to programs and thus
156 d93fca6a 2005-02-11 devnull reserved.
157 d93fca6a 2005-02-11 devnull They are:
158 d93fca6a 2005-02-11 devnull .TF restricted
161 d93fca6a 2005-02-11 devnull system name
164 d93fca6a 2005-02-11 devnull Internet domain name
167 d93fca6a 2005-02-11 devnull Internet address
169 d93fca6a 2005-02-11 devnull .B ether
170 d93fca6a 2005-02-11 devnull Ethernet address
172 d93fca6a 2005-02-11 devnull .B bootf
173 d93fca6a 2005-02-11 devnull file to download for initial bootstrap
175 d93fca6a 2005-02-11 devnull .B ipnet
176 d93fca6a 2005-02-11 devnull Internet network name
178 d93fca6a 2005-02-11 devnull .B ipmask
179 d93fca6a 2005-02-11 devnull Internet network mask
182 d93fca6a 2005-02-11 devnull Internet gateway
185 d93fca6a 2005-02-11 devnull authentication server to be used
187 d93fca6a 2005-02-11 devnull .B authdom
188 d93fca6a 2005-02-11 devnull authentication domain. Plan 9 supports multiple authentication
189 d93fca6a 2005-02-11 devnull domains. To specify an authentication server for a particular domain,
190 d93fca6a 2005-02-11 devnull add a tuple containing both
193 d93fca6a 2005-02-11 devnull .B authdom
194 d93fca6a 2005-02-11 devnull attributes and values.
197 d93fca6a 2005-02-11 devnull file server to be used
200 d93fca6a 2005-02-11 devnull a TCP service name
203 d93fca6a 2005-02-11 devnull a UDP service name
206 d93fca6a 2005-02-11 devnull an IL service name
209 d93fca6a 2005-02-11 devnull a TCP, UDP, or IL port number
211 d93fca6a 2005-02-11 devnull .B restricted
212 d93fca6a 2005-02-11 devnull a TCP service that can be called only by ports numbered
213 d93fca6a 2005-02-11 devnull less that 1024
215 d93fca6a 2005-02-11 devnull .B proto
216 d93fca6a 2005-02-11 devnull a protocol supported by a host.
218 d93fca6a 2005-02-11 devnull .B dnsdomain
219 d93fca6a 2005-02-11 devnull a domain name that
220 d93fca6a 2005-02-11 devnull .I ndb/dns
221 d93fca6a 2005-02-11 devnull adds onto any unrooted names when doing a search
222 d93fca6a 2005-02-11 devnull There may be multiple
223 d93fca6a 2005-02-11 devnull .B dnsdomain
227 d93fca6a 2005-02-11 devnull a DNS server to use (for DNS and DHCP)
230 d93fca6a 2005-02-11 devnull an NTP server to use (for DHCP)
233 d93fca6a 2005-02-11 devnull an SMTP server to use (for DHCP)
236 d93fca6a 2005-02-11 devnull a time server to use (for DHCP)
239 d93fca6a 2005-02-11 devnull a Windows name server (for DHCP)
242 d93fca6a 2005-02-11 devnull mail exchanger (for DNS and DHCP)
245 d93fca6a 2005-02-11 devnull start of area (for DNS)
249 d93fca6a 2005-02-11 devnull .\" The file
250 d93fca6a 2005-02-11 devnull .\" .B \*9/ndb/auth
251 d93fca6a 2005-02-11 devnull .\" is used during authentication to decide who has the power to `speak for' other
252 d93fca6a 2005-02-11 devnull .\" users; see
253 d93fca6a 2005-02-11 devnull .\" .IR authsrv (6).
254 d93fca6a 2005-02-11 devnull .SH EXAMPLES
256 d93fca6a 2005-02-11 devnull A tuple for the CPU server, spindle.
259 d93fca6a 2005-02-11 devnull sys = spindle
260 d93fca6a 2005-02-11 devnull dom=spindle.research.bell-labs.com
261 d93fca6a 2005-02-11 devnull bootf=/mips/9powerboot
262 d93fca6a 2005-02-11 devnull ip=135.104.117.32 ether=080069020677
263 d93fca6a 2005-02-11 devnull proto=il
266 d93fca6a 2005-02-11 devnull Entries for the network
267 d93fca6a 2005-02-11 devnull .B mh-astro-net
268 d93fca6a 2005-02-11 devnull and its subnets.
271 d93fca6a 2005-02-11 devnull ipnet=mh-astro-net ip=135.104.0.0 ipmask=255.255.255.0
272 d93fca6a 2005-02-11 devnull fs=bootes.research.bell-labs.com
273 d93fca6a 2005-02-11 devnull ipgw=r70.research.bell-labs.com
274 d93fca6a 2005-02-11 devnull auth=p9auth.research.bell-labs.com
275 d93fca6a 2005-02-11 devnull ipnet=unix-room ip=135.104.117.0
276 d93fca6a 2005-02-11 devnull ipgw=135.104.117.1
277 d93fca6a 2005-02-11 devnull ipnet=third-floor ip=135.104.51.0
278 d93fca6a 2005-02-11 devnull ipgw=135.104.51.1
281 d93fca6a 2005-02-11 devnull Mappings between TCP service names and port numbers.
284 d93fca6a 2005-02-11 devnull .ta \w'\fLtcp=sysmonxxxxx'u \w'\fLtcp=sysmonxxxxxport=512xxx'u
285 d93fca6a 2005-02-11 devnull tcp=sysmon port=401
286 d93fca6a 2005-02-11 devnull tcp=rexec port=512 restricted
287 d93fca6a 2005-02-11 devnull tcp=9fs port=564
289 d93fca6a 2005-02-11 devnull .SH FILES
291 d93fca6a 2005-02-11 devnull .B \*9/ndb/local
292 d93fca6a 2005-02-11 devnull first database file searched
293 d93fca6a 2005-02-11 devnull .SH "SEE ALSO"
294 d93fca6a 2005-02-11 devnull .\" .IR dial (2),
295 d93fca6a 2005-02-11 devnull .IR ndb (1),
296 d93fca6a 2005-02-11 devnull .IR ndb (3)
297 d93fca6a 2005-02-11 devnull .\" .IR dhcpd (8),
298 d93fca6a 2005-02-11 devnull .\" .IR ipconfig (8),
299 d93fca6a 2005-02-11 devnull .\" .IR con (1)