...> domain <subcommand> [parameters]
The domain commands show the status and control the process of maping a domain name into an Internet address referred to as DNS (Domain Name Service). JNOS DNS client is always available as part of jnos however the DNS server is not. To make the server available requires #define DOMAINSERVER in ConfigHFile, at compile time. The client returns the IP address for a given URL (or the reverse) to a calling program. The server will answer client queries from data in the domain cache, plus from information stored in the DomainTxtFile.
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. Examples:
domain addserver wg7j.ece.orst.edu 30 domain addserver 128.193.48.1 domain addserver ucsd.edu
domain cache <subcommand> Following commands work on the domain cache. These are resource records collected during operation and held in memory to speed the lookup in the event the request is duplicated. (described in RFC1033/1034)
domain cache clean [<yes | NO>] Displays or sets the discard 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 off (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 on, expired records will be removed from the file whenever any new record is added to the file.
- Example:
domain cache clean yes
domain cache dump Immediately clears the domain cache. This amounts to being a "flush".
domain cache list This command shows the current content of the in-memory cache of resource records.
domain cache size [<size>] Display or set the maximum size of the local in-memory domain cache. Default is 5. 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. Upldating is controlled by the 'domain update' command (see also).
domain dns [on|off] Display or toggle the state of the Domain Name Server. If off, the jnos client must rely on look-up from remote host servers. If on, the system is active as a Domain Name Server to then answer queries (manage the table look-up functions) from the local and remote tcp/ip clients regarding hostname to ip-address, and ip-address to hostname translations.
domain dropserver <hostid> Remove a domain name server from the list of name servers. You are warned when you delete the last name server.
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 suppoed <search_text> must match exactly, i.e., case is significant. This subcommand requires #define MORESESSION when JNOS was compiled.
domain maxclients [<N>] Command to limit loading, N=number of clients, while acting as a Domain Name Server. Default is 6.
domain maxwait [<time-out>] This sets a time-out value (1 to 255 seconds) to a query or 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 mailbox'T host' command). Note that (PC based) name servers can have trouble finding records in a large database. Default is 60 seconds.
domain maxwait 10
domain query [<hostid>] Displays the results of a DNS query for <hostid>.
domain retries [<retries>] Default is 2. 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 timeouts/retries high !
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."
domain suffix ece.orst.edu
domain trace [on| OFF] Display or set the flag controlling the tracing of domain server requests and responses. This only works when console is enabled. Default is off.
domain trace on
domain translate [on | OFF] 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.
domain translate on
domain ttl [ttl] Select a default 'ttl' value to be applied to server responses than contain none.
domain update [on | off] Controls whether or not DomainTxtFile is updated with server responses from the cache.
domain verbose [on | off] 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'
