Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ (8) — Plan9 1st Edition

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

ndb(2)

ndb(6)

NDB(8)

NAME

query, mkhash, mkdb, cs, csquery, dns, dnsquery − network database

SYNOPSIS

­ndb/query ­attr value [rattr]
­ndb/mkhash ­file attr
­ndb/cs
­ndb/csquery
­ndb/dns [ ­-s ]
­ndb/dnsquery
­ndb/mkdb

DESCRIPTION

The network database holds administrative information used by network programs such as bootp(8), ipconfig(8), con(1), etc.

­Ndb/query searches the database for an attribute of type ­attr and value value. If ­rattr is not specified, all entries matched by the search are returned.  If ­rattr is specified, the value of the first pair with attribute ­rattr of all the matched entries is returned. 

­Ndb/mkhash creates a hash file for all entries with attribute ­attr in database file file. The hash files are used by ­ndb/query and by the ndb library routines. 

­Ndb/cs is a server used by dial(2) to translate network names. It is started at boot time. It finds out what networks are configured by looking for ­/net/∗/clone when it starts.  It can also be told about networks by writing to ­/net/cs a message of the form:

add net1 net2 .... 

­Ndb/cs also sets the system name in ­/dev/sysname if it can figure it out.  ­Ndb/csquery can be used to query ­ndb/cs to see how it resolves addresses.  ­Ndb/csquery prompts for addresses and prints out what ­ndb/cs returns. 

­Ndb/dns is a server used by ­ndb/cs and by remote systems to translate Internet domain names.  ­Ndb/dns is started at boot time.  By default ­dns serves only requests written to /net/dns.  Option ­−s causes the server to also answer domain requests sent to UDP port 53.  Name resolution is performed by searching the local database and by querying remote servers.  The server for a domain is indicated by a database entry containing both a ­dom and a ­ns attribute.  For example, the entry for the Internet root is:

 dom=
ns=ns.nic.ddn.mil
ns=kava.nisc.sri.com
ns=aos.brl.mil
 

The root of a domain subtree served by the local database is indicated by an entry with an ­soa attribute.  For example, the AT&T research domain is:

 dom=research.att.com soa
mb=ches.research.att.com
ns=inet.research.att.com
ns=research.research.att.com
 

Here, the ­mb entry is the mail address of the person responsible for the domain (default postmaster).  Wildcarded domain names can also be used.  For example, to specify a mail forwarder for all AT&T research systems:

 dom=∗.research.att.com
mx=research.att.com
 

­Ndb/dnsquery can be used to query ­ndb/dns to see how it resolves requests.  ­Ndb/dnsquery prompts for commands of the form

­domain-name request-type

where ­request-type can be ­ip, mx, ns, cname, ... 

­Ndb/mkdb is used in concert with awk(1) scripts to convert uucp systems files, IP hosts files, and Datakit configuration files into database files. It is very specific to the situation at Murray Hill.

EXAMPLES

% ndb/query sys helix
sys=helix dom=helix.research.att.com bootf=/mips/9powerboot
ip=135.104.117.31 ether=080069020427
dk=nj/astro/helix
proto=il
% ndb/query sys helix ip
135.104.117.31

FILES

­/lib/ndb/local first database file searched

­/lib/ndb/global second database file searched

­/lib/ndb/local.∗ hash files for ­/lib/ndb/local

­/lib/ndb/global.∗
hash files for ­/lib/ndb/global

­/srv/cs service file for ­ndb/cs

­/net/cs where ­/srv/cs gets mounted

SEE ALSO

ndb(2) ndb(6)

Plan 9  —  January 03, 1993

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026