3 ndb \- Network database
6 The network database consists of files
7 describing machines known to the local
8 installation and machines known publicly.
9 The files comprise multi-line tuples made up of
10 attribute/value pairs of the form
14 Each line starting without white space starts a new tuple.
21 is the root of the database.
22 Other files are included in the
23 database if a tuple with an
24 attribute-value pair of attribute
26 and no value exists in
27 .BR /lib/ndb/local
\r.
31 each pair with attribute
33 identifies a file to be included in the database. The files are searched
34 in the order they appear.
44 declares the database to be composed of the three files
51 is searched before the others.
54 may be included in the
56 to redefine its ordering.
58 Within tuples, pairs on the same line bind tighter than
59 pairs on different lines.
61 Programs search the database directly using the routines in
73 impose structure on the otherwise flat database by using
74 knowledge specific to the network.
75 The internet is made up of networks which can be subnetted
76 multiple times. A network must have an
78 attribute and is uniquely identified by the values of its
84 is missing, the relevant Class A, B or C one is used.
86 A search for an attribute associated with a network or host starts
87 at the lowest level, the entry for the host or network itself,
88 and works its way up, bit by bit, looking at entries for nets/subnets
89 that include the network or host. The search ends when the attribute
91 For example, consider the following entries:
94 ipnet=murray-hill ip=135.104.0.0 ipmask=255.255.0.0
96 ntp=ntp.cs.bell-labs.com
97 ipnet=plan9 ip=135.104.9.0 ipmask=255.255.255.0
98 ntp=oncore.cs.bell-labs.com
99 smtp=smtp1.cs.bell-labs.com
100 ip=135.104.9.6 sys=anna dom=anna.cs.bell-labs.com
101 smtp=smtp2.cs.bell-labs.com
108 which is in turn on the class B net
110 Assume that we're searching for
116 The search starts by looking for an entry with
118 We find the anna entry. Since it has an
119 .B smtp=smtp2.cs.bell-labs.com
121 we're done looking for that attribute.
122 To fulfill the NTP request, we continue by looking for networks
123 that include anna's IP address.
124 We lop off the right most one bit from anna's address and
129 Not finding one, we drop another bit and look for an
134 such an entry and it has the pair,
135 .BR ntp=oncore.cs.bell-labs.com ,
139 can be made to perform such network aware
140 searches by using metanames in the dialstring.
143 followed by an attribute name.
145 looks up the attribute relative to the system it is running
146 on. Thus, with the above example, if a program called
149 dial("tcp!$smtp!smtp", 0, 0, 0);
152 the dial would connect to the SMTP port of
153 .BR smtp2.cs.bell-labs.com .
155 A number of attributes are meaningful to programs and thus
161 system name (a short name)
164 Internet fully-qualified domain name
171 IPv6 Internet address.
177 Internet network name
180 Internet network mask
183 Internet gateway (ip address)
187 (must be lower-case hex)
190 Specific vendor attribute for dhcp and bootp
193 file to download for initial bootstrap;
195 to boot a PC via PXE.
198 an TFTP server to use for PXE bootstrap
201 Plan 9 file server to be used
204 Plan 9 authentication server to be used
207 Plan 9 authentication domain.
208 To specify an authentication server for a particular domain,
209 add a tuple containing both
213 attributes and values.
216 the NFS root for unix machines
219 the NFS server used with rootpath
224 adds onto any unrooted names when doing a search.
225 There may be multiple
230 a DNS server to use (for DNS and DHCP)
233 an NTP server to use (for DHCP)
236 an SMTP server to use (for DHCP)
239 a time server to use (for DHCP)
242 a Windows name server (for DHCP)
245 mail exchanger (for DNS and DHCP);
250 service location (for DNS);
258 start of area (for DNS)
267 a TCP or UDP port number
270 a TCP service that can be called only by ports numbered
274 a protocol supported by a host.
281 in tuples for hosts that supported the IL protocol
287 to translate dotted names to IP addresses,
288 only consulting the database files if
290 cannot translate the name.
293 allows network entries with
300 Searches for the system name are resolved
301 by looking up the domain name with
306 is used during authentication to decide who has the power to `speak for' other
311 A tuple for the CPU server, spindle.
315 dom=spindle.research.bell-labs.com
316 bootf=/mips/9powerboot
317 ip=135.104.117.32 ether=080069020677
320 Entries for the network
325 ipnet=mh-astro-net ip=135.104.0.0 ipmask=255.255.255.0
326 ipgw=r70.research.bell-labs.com
327 fs=bootes.research.bell-labs.com
328 auth=p9auth.research.bell-labs.com
329 ipnet=unix-room ip=135.104.117.0
331 ipnet=third-floor ip=135.104.51.0
335 Mappings between TCP service names and port numbers.
338 .ta \w'\fLtcp=sysmonxxxxx'u \w'\fLtcp=sysmonxxxxxport=512xxx'u
340 tcp=rexec port=512 restricted
347 first database file searched