Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages


home | help
NDB(7)		       Miscellaneous Information Manual			NDB(7)

       ndb - Network database

       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 at-
       tribute	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 ap-
       pear.  For example:


       declares	the database to	be composed of the three  files	 /lib/ndb/com-
       mon,  /lib/ndb/local,  and /lib/ndb/global.  By default,	/lib/ndb/local
       is searched before the others.  However,	/lib/ndb/local may be included
       in the database to redefine its ordering.

       Within  tuples,	pairs on the same line bind tighter than pairs on dif-
       ferent lines.

       Programs	search the database directly using  the	 routines  in  ndb(3).
       The  routine ndbipinfo imposes 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  in-
       clude  the  network  or	host.	The  search ends when the attribute is
       found.  For example, consider at	the following entries:

	      ipnet=murray-hill	ip= ipmask=
	      ipnet=plan9 ip= ipmask=
	      ip= sys=anna

       Here anna is on the subnet plan9	which is in turn on the	 class	B  net
       murray-hill.   Assume  that  we're  searching  for  anna's NTP and SMTP
       servers.	 The search starts by looking for an entry with	sys=anna.   We
       find the	anna entry.  Since it has an pair,
       we're done looking for that attribute.  To fulfill the NTP request,  we
       continue	 by  looking  for networks that	include	anna's IP address.  We
       lop off the right most one bit from anna's address and look for an  ip-
       net=  entry  with ip=  Not finding one, we drop another bit
       and look	for an ipnet= entry with ip=  There	is such	an en-
       try  and	 it  has  the  pair,,  ending our

       A number	of attributes are meaningful to	programs  and  thus  reserved.
       They are:

       sys    system name

       dom    Internet domain name

       ip     Internet address

       ether  Ethernet address

       bootf  file to download for initial bootstrap

       ipnet  Internet network name

       ipmask Internet network mask

       ipgw   Internet gateway

       auth   authentication server to be used

	      authentication  domain.  Plan 9 supports multiple	authentication
	      domains.	To specify an authentication server for	 a  particular
	      domain,  add a tuple containing both auth	and authdom attributes
	      and values.

       fs     file server to be	used

       tcp    a	TCP service name

       udp    a	UDP service name

       il     an IL service name

       port   a	TCP, UDP, or IL	port number

	      a	TCP service that can be	called only  by	 ports	numbered  less
	      that 1024

       proto  a	protocol supported by a	host.

	      a	domain name that ndb/dns adds onto any unrooted	names when do-
	      ing a search There may be	multiple dnsdomain pairs.

       dns    a	DNS server to use (for DNS and DHCP)

       ntp    an NTP server to use (for	DHCP)

       smtp   an SMTP server to	use (for DHCP)

       time   a	time server to use (for	DHCP)

       wins   a	Windows	name server (for DHCP)

       mx     mail exchanger (for DNS and DHCP)

       soa    start of area (for DNS)

       A tuple for the CPU server, spindle.

       sys = spindle
	    ip= ether=080069020677

       Entries for the network mh-astro-net and	its subnets.

       ipnet=mh-astro-net ip= ipmask=
       ipnet=unix-room ip=
       ipnet=third-floor ip=

       Mappings	between	TCP service names and port numbers.

       tcp=sysmon     port=401
       tcp=rexec      port=512	 restricted
       tcp=9fs	      port=564

	      first database file searched

       ndb(1), ndb(3)



Want to link to this manual page? Use this URL:

home | help