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.
178 (must be lower-case hexadecimal).
179 Beware that for machines with multiple
183 may expect requests to come from the address in the first
188 file to download for initial bootstrap;
190 to boot a PC via PXE.
193 Internet network name
196 Internet network mask
202 authentication server to be used
205 authentication domain. Plan 9 supports multiple authentication
206 domains. To specify an authentication server for a particular domain,
207 add a tuple containing both
211 attributes and values.
214 file server to be used
223 a TCP or UDP port number
226 a TCP service that can be called only by ports numbered
230 a protocol supported by a host.
237 in tuples for hosts that supported the IL protocol
242 adds onto any unrooted names when doing a search.
243 There may be multiple
248 a DNS server to use (for DNS and DHCP)
251 an NTP server to use (for DHCP)
254 an SMTP server to use (for DHCP)
257 a time server to use (for DHCP)
260 a Windows name server (for DHCP)
263 mail exchanger (for DNS and DHCP);
268 service location (for DNS);
276 start of area (for DNS)
282 to translate dotted names to IP addresses,
283 only consulting the database files if
285 cannot translate the name.
288 allows network entries with
295 Searches for the system name are resolved
296 by looking up the domain name with
301 is used during authentication to decide who has the power to `speak for' other
306 A tuple for the CPU server, spindle.
310 dom=spindle.research.bell-labs.com
311 bootf=/mips/9powerboot
312 ip=135.104.117.32 ether=080069020677
315 Entries for the network
320 ipnet=mh-astro-net ip=135.104.0.0 ipmask=255.255.255.0
321 fs=bootes.research.bell-labs.com
322 ipgw=r70.research.bell-labs.com
323 auth=p9auth.research.bell-labs.com
324 ipnet=unix-room ip=135.104.117.0
326 ipnet=third-floor ip=135.104.51.0
330 Mappings between TCP service names and port numbers.
333 .ta \w'\fLtcp=sysmonxxxxx'u \w'\fLtcp=sysmonxxxxxport=512xxx'u
335 tcp=rexec port=512 restricted
342 first database file searched