
domain <subcommand>

     The domain commands control and show the working of the name  to
Internet address  mapping software (referred to as DNS: Domain Name Service).
JNOS has both a DNS client and a server.  The server will answer queries from
data in the domain cache, and from information stored in the DOMAIN.TXT file.
The DNS server is only available when DOMAINSERVER is defined in config.h,
but the DNS client is always available.
     

    domain addserver <hostid> [<timeout>]

     Add a domain name server to the list of name servers.

     <timeout> is an optional timeout setting in seconds for
     this server.  If <timeout> is not included in the command, the
     value defaults to 3 * (tcp_irtt).  Servers are queried in the
     opposite order in which they were added.
     
          Example:  domain addserver wg7j.ece.orst.edu
                    domain addserver 128.193.48.1
                    domain addserver ucsd.edu
          
          
    domain cache <subcommand>

     The following commands work on the domain cache, which contains
     resource records held in memory (see RFC1033/1034).
     
       domain cache clean [<yes | NO>]

        Displays or sets the discarding of expired resource records.
        Expired records have their time-out value decremented to zero.
        Normally resource records get a default time-out value of 1800
        seconds.  After this time they are  considered "old" and if
        referenced again the domain name resolver should be inquired
        again.  When clean is NO (the default), expired records will
        be retained; if no replacement can be obtained from another
        domain name server, these records will continue to be used.
        When clean is YES, expired records will be removed from the
        file whenever  any new record is added to the file.
          
          
       domain cache dump

        Immediately clears the domain cache.  This amounts to being a
        "flush" and the name ought to be changed accordingly!
        
        
       domain cache list

        This command shows the current content of the in-memory  cache
        of  resource records.
     

       domain cache size [<size>]                       Default: 5

        (B)    Display or set the maximum size (number of entries) of
        the local in-memory domain cache.
        Example:  domain cache size 10

                    
       domain cache wait [<secs>]                        Default: 300

        Display or set the number of seconds which must elapse before
        the domain.txt file is updated from the resource records stored
        in the domain cache.  Updating is controlled by the 'domain
        update' command (see also).


    domain dns [on|off]

     (B)  Display or  toggle the state of the Domain Name Server.  If
     on, the system is active as a Domain Name Server. The system will
     then answer queries from other tcp/ip hosts regarding hostname to
     ip-address, and ip-address to hostname translations.  For more
     information, see the section SETTING UP THE DOMAIN NAME SYSTEM (in
     the JNOS40 CONFIGURATION MANUAL, the relevant section is called
     'Configuring the Domain Name System').

     The dns subcommand is only available when DOMAINSERVER was defined
     when Jnos was compiled.
     

    domain dropserver <hostid>

     Remove a domain name server from the list of name servers.   You
     are  warned when you delete the last name server.
     Example:  domain dropserver ece.orst.edu
          
          
    domain listservers

     List the currently configured domain name servers, along with
     statistics  on how  many  queries  and  replies  have been
     exchanged with each one, response times, etc.
     

    domain look <search_text>

     This command searches domain.txt and displays records matching
     <search_text>.  The supplied <search_text> must match exactly, ie,
     case is significant.  This subcommand is available only if
     MORESESSION was defined when Jnos was compiled.


    domain maxclients [<N>]                                Default: 6

     This command sets or displays the maximum number of simultaneous
     DNS server processes allowed.  This subcommand is available only if
     DOMAINSERVER was defined when Jnos was compiled.


    domain maxwait [<time-out>]

     (B)  This sets a time-out value (1 to 255 seconds) for a query of
     a domain name server.   This is not set for an already defined
     server but will be used for a newly defined name server.  Also
     the value is used for domain name lookups (E.g. when a user does
     a telnet to a host with the nodeshell 'T host' command).  Note
     that (PC based) name servers can have trouble finding records in
     a large database.  Default is 60 seconds.
     Example:  domain maxwait 10
          
          
    domain query <hostid>

     The query command displays the results of asking the DNS servers for
     any domain records for <hostid>.  THis command is available when Jnos
     was compiled with DQUERYSESSION #define'd.


    domain retries [<retries>]

     (B)  The retry value (number) limits the number of queries  sent
     out to remote domain  name resolvers before giving up and telling
     you that host xyzzy.ampr.org does not exist.  The total time lost
     with a query is (retries * time-out * number of domain servers
     defined); i.e., the delay between requesting a hostname to ip-
     address translation and getting the answer can become very long
     if you use many servers, and set the time-outs/retries high !
     Default is 2.
     Example:  domain retries 1


    domain subnet [ON | off]

     This command works in conjunction with 'domain translate' to
     allow or disallow translation of any address ending in 0 or 255.
     On systems which have a lot of subnets, turning off subnet
     translation can result in a considerable speedup when displaying
     routes with 'domain translate on'.

 
    domain suffix [<domain suffix> | none]

     Display or specify the default domain name suffix to be appended
     to a host name when it contains no periods.  For example, if the
     suffix is set to "ampr.org." and the user enters 'telnet ka9q',
     the domain resolver will attempt to  find 'ka9q.ampr.org.' If the
     host name being sought contains one or more periods, however, the
     default suffix is NOT applied if the last part of the name is
     less than 5 characters and contains only letters; e.g., 'telnet
     foo.bar' would NOT be turned into 'foo.bar.ampr.org.' 'telnet
     foo.ka9q' will be turned into 'foo.ka9q.ampr.org.' Note  that a
     trailing dot (.) is required for the suffix.  If the suffix is
     the string 'none' (without trailing period), the current suffix
     is cleared and forgotten.  Default is "ampr.org."
     Example:  domain suffix ece.orst.edu.


    domain trace [on| OFF]

     (B)  Display or set the flag controlling the tracing of domain
     server requests and responses.  This only works when console is
     enabled.  Default is off.
     Example:  domain trace on
          
          
    domain translate [on | OFF]

     (B)  Display or set the flag that controls the translation of  ip
     addresses in dot notation into symbolic names.  The translation
     process makes heavy use of reverse domain name lookups.  Do not
     set this flag unless you have a good and fast connection to a
     domain name server.
     Example:  domain translate on
          
          
    domain ttl [ttl]

     Select a default 'ttl' value to be applied to server responses
     than contain none.  This subcommand is available only if
     DOMAINSERVER was defined when Jnos was compiled.
          
          
    domain update [ON | off]

          
     Controls whether or not the domain.txt file is updated with server
     responses.  See also 'domain cache wait'.


    domain verbose [on | OFF]

     (B)  Display or set the flag controlling the return of a full name
     (on) or only the first name (dot delimiter) (off).  This is for
     IP address to name translation only.  If off, home.wg7j.ampr.org.
     will show as 'home.wg7j', whereas if on it will show as
     'home.wg7j.ampr.org'
     Example:  domain verbose on
          
