NAME
ndb – Network database |
DESCRIPTION
The network database consists of files describing machines known
to the local installation and machines known publicly. The files
comprise multi–line tuples made up of attribute/value pairs of
the form attr=value or sometimes just attr. Each line starting
without white space starts a new tuple. Lines starting with #
are comments.
The file /lib/ndb/local is the root of the database. Other files
are included in the database if a tuple with an attribute–value
pair of attribute database and no value exists in /lib/ndb/local.
Within the database tuple, each pair with attribute file identifies
a file to be included in the database. The
files are searched in the order they appear. For example:
Within tuples, pairs on the same line bind tighter than pairs on different lines. Programs search the database directly using the routines in ndb(2) or indirectly using ndb/cs and ndb/dns (see ndb(8)). Both ndb/cs and the routine ndbipinfo impose structure on the otherwise flat database by using knowledge specific to the network. The internet is made up of networks which can be subnetted multiple times. A network must have an ipnet attribute and is uniquely identified by the values of its ip and ipmask attributes. If the ipmask is missing, the relevant Class A, B or C one is used. A search for an attribute associated with a network or host starts at the lowest level, the entry for the host or network itself, and works its way up, bit by bit, looking at entries for nets/subnets that include the network or host. The search ends when the attribute is found. For example, consider the following entries:
Ndb/cs can be made to perform such network aware searches by using
metanames in the dialstring. A metaname is a $ followed by an
attribute name. Ndb/cs looks up the attribute relative to the
system it is running on. Thus, with the above example, if a program
called
A number of attributes are meaningful to programs and thus reserved.
They are: Cs defers to dns to translate dotted names to IP addresses, only consulting the database files if dns cannot translate the name. Cs allows network entries with sys and dom attributes but no ip attribute. Searches for the system name are resolved by looking up the domain name with dns.
The file /lib/ndb/auth is used during authentication to decide
who has the power to `speak for' other users; see authsrv(6). |
EXAMPLES
A tuple for the CPU server, spindle.
sys=spindle
ipnet=mh–astro–net ip=135.104.0.0 ipmask=255.255.255.0
tcp=sysmon port=401 |
FILES
/lib/ndb/local first database file searched |
SEE ALSO
con(1), dial(2), ndb(2), 9boot(8), booting(8), dhcpd(8), ipconfig(8),
ndb(8) |