JANUS NAMESERVER: Difference between revisions

From m204wiki
Jump to navigation Jump to search
mNo edit summary
No edit summary
 
(12 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{DISPLAYTITLE:JANUS NAMESERVER}}
{{DISPLAYTITLE:JANUS NAMESERVER}}
<span class="pageSubtitle"><section begin="desc" />NAMESERVER<section end="desc" /></span>
<span class="pageSubtitle">NAMESERVER</span>


This specifies the IP address(es) and port(s) of the TCP/IP name server(s).
This specifies the IP address(es) and port(s) of the TCP/IP name server(s).


The <var>JANUS NAMESERVER</var> command only has an effect when running in an IBM (<code>TCPTYPE=IBM</code>) TCP/IP environment. If <var>JANUS NAMESERVER</var> is executed without parameters, it displays the current setting for <var>NAMESERVER</var>.
If <var>JANUS NAMESERVER</var> is executed without parameters, it displays the current setting for <var>NAMESERVER</var>.
 
The <var>JANUS NAMESERVER</var> command only has an effect when running in an IBM (<code>TCPTYPE=IBM</code>) TCP/IP environment.
 


==Syntax==
==Syntax==


<p class="syntax"><section begin="syntax" /> JANUS NAMESERVER ip_address port_number -
The following form, invoked without any parameters, displays the current <var>NAMESERVER</var> setting:
<p class="syntax"> JANUS NAMESERVER</p>
 
The following form specifies the new <var>NAMESERVER</var> setting:
<p class="syntax"> JANUS NAMESERVER ip_address port_number -
       [AND ip_address port_number]] ... -
       [AND ip_address port_number]] ... -
       [TIMEOUT numsec] -
       [TIMEOUT numsec] -
       [CACHE numcache] -
       [CACHE numcache] -
       [MAXTTL maxsec]
       [MAXTTL maxsec]  -
<section end="syntax" /></p>
      [RETRIES num]
</p>


<table class="syntaxTable">
<table class="syntaxTable">
Line 33: Line 41:
</p>
</p>


Since name servers rarely go down, it is probably quite unnecessary to have more than two name servers, but as many as eight name servers are supported by Janus.<blockquote> A negative response from a name server, that is, a response that indicates that the name server does not know the requested host name, does '''not''' cause a subsequent name server to be tried. If name servers are properly configured, changing name servers should not affect the success of a hostname lookup.</blockquote>  
Since name servers rarely go down, it is probably quite unnecessary to have more than two name servers, but as many as eight name servers are supported by Janus.
<p>
'''Note:''' A negative response from a name server, that is, a response that indicates that the name server does not know the requested host name, does '''not''' cause a subsequent name server to be tried. If name servers are properly configured, changing name servers should not affect the success of a hostname lookup.</p>


The other <var>JANUS NAMESERVER</var> command parameters available in <var class="product">Sirius Mods</var> Version 6.8 and later are:
The other <var>JANUS NAMESERVER</var> command parameters available in <var class="product">Sirius Mods</var> Version 6.8 and later are:


<table class="syntaxTable">
<table class="syntaxTable">
<tr><th>TIMEOUT numsec</th>
 
<tr><th nowrap><var>TIMEOUT</var> numsec</th>
<td>This sets the maximum number of seconds to wait for a name server response. The internet standard for this value, and the value used by <var class="product">Janus Sockets</var> before <var class="product">Sirius Mods</var> Version 6.8, was 10. While this might be a reasonable value if lookups are going against busy name servers on the other side of the world, and the internet is extremely busy, this value is absurdly high for business applications where the name server is local and all host names being sought are local. Even for internet-wide lookups, a ten-second timeout is probably overkill these days. In any case, the cost of a high timeout value is that if there should be a problem with a name server, it would take the timeout number of seconds to notice the problem and correct for it. 10 seconds is a fairly long time for this to happen, so one might want to set this timeout to a lower value.</td></tr>
<td>This sets the maximum number of seconds to wait for a name server response. The internet standard for this value, and the value used by <var class="product">Janus Sockets</var> before <var class="product">Sirius Mods</var> Version 6.8, was 10. While this might be a reasonable value if lookups are going against busy name servers on the other side of the world, and the internet is extremely busy, this value is absurdly high for business applications where the name server is local and all host names being sought are local. Even for internet-wide lookups, a ten-second timeout is probably overkill these days. In any case, the cost of a high timeout value is that if there should be a problem with a name server, it would take the timeout number of seconds to notice the problem and correct for it. 10 seconds is a fairly long time for this to happen, so one might want to set this timeout to a lower value.</td></tr>
<tr><th>CACHE numcache</th>
 
<td>This parameter indicates that <var class="product">Janus Sockets</var> is to save hostname-to-IP address mappings in the Online address space. This means that subsequent name server lookups would be extremely fast in-memory lookups, rather than calls to an external name server. This would both save CPU and reduce name lookup latency. <var class="term">Numcache</var> is the maximum number of hostnames to cache in the Online. Names are cached in virtual storage, and the amount of virtual storage required for the cache is about 100*<var class="term">numcache</var>. If the number of hostnames ever looked up is relatively small, it would make sense to set <var class="term">numcache</var> to a little more than this number of hostnames. Otherwise, the setting of <var class="term">numcache</var> is a trade-off between CPU savings and latency and virtual storage -- cache entries are saved according to a most-recently-used algorithm so that frequently requested hostnames tend to remain in cache. There are several system statistics the can be viewed via <var class="product">[[SirMon]]</var> that make it possible to determine how well the name caching is working. These statistics are described below.</td></tr>
<tr><th><var>CACHE</var> numcache</th>
<tr><th>MAXTTL maxsec</th>
<td>This parameter indicates that <var class="product">Janus Sockets</var> is to save hostname-to-IP address mappings in the Online address space. This means that subsequent name server lookups would be extremely fast in-memory lookups, rather than calls to an external name server. This would both save CPU and reduce name lookup latency. <var class="term">numcache</var> is the maximum number of hostnames to cache in the Online. Names are cached in virtual storage, and the amount of virtual storage required for the cache is about 100*<var class="term">numcache</var>. If the number of hostnames ever looked up is relatively small, it would make sense to set <var class="term">numcache</var> to a little more than this number of hostnames. Otherwise, the setting of <var class="term">numcache</var> is a trade-off between CPU savings and latency and virtual storage &#x2014; cache entries are saved according to a most-recently-used algorithm so that frequently requested hostnames tend to remain in cache. There are several system statistics the can be viewed via <var class="product">[[SirMon]]</var> that make it possible to determine how well the name caching is working. These statistics are described below.</td></tr>
<td>This parameter indicates the maximum amount of time <var class="product">Janus Sockets</var> is to save a hostname to IP address mapping in its local cache before checking it again with the name server. The name <var>MAXTTL</var> stands for MAXimum Time To Live. This parameter might be useful in highly dynamic environments where host addresses might change somewhat frequently. When a name server sends a hostname to IP address mapping response, it also sends a "Time To Live" with that response. This indicates that the requestor should revalidate the name after the indicated time-to-live. <var class="product">Janus Sockets</var> uses the minimum of the time-to-live sent by the name server and the value of MAXTTL for the effective time-to-live of a name server response. <var class="product">Janus Sockets</var> does not cache negative responses. That is, if the name server did not know a particular hostname, and that hostname is requested again, <var class="product">Janus Sockets</var> will again query the name server for that hostname.
 
</td></tr></table>
<tr><th><var>MAXTTL</var> maxsec</th>
<td>This parameter indicates the maximum amount of time <var class="product">Janus Sockets</var> is to save a hostname to IP address mapping in its local cache before checking it again with the name server. The name <var>MAXTTL</var> stands for MAXimum Time To Live. This parameter might be useful in highly dynamic environments where host addresses might change somewhat frequently. When a name server sends a hostname to IP address mapping response, it also sends a "Time To Live" with that response. This indicates that the requestor should revalidate the name after the indicated time-to-live. <var class="product">Janus Sockets</var> uses the minimum of the time-to-live sent by the name server and the value of <var>MAXTTL</var> for the effective time-to-live of a name server response. <var class="product">Janus Sockets</var> does not cache negative responses. That is, if the name server did not know a particular hostname, and that hostname is requested again, <var class="product">Janus Sockets</var> will again query the name server for that hostname. </td></tr>
 
<tr><th><var>RETRIES</var> num</th>
<td>This parameter retries a DNS UDP packet for which no response is received. This means that if <var class="product">Janus</var> does a DNS lookup just when the target nameserver is down for an instant, or if the UDP packet gets lost on the network (IP networks don't have to guarantee delivery of IP packets), the DNS lookup does not fail.
<p>
Setting <var>RETRIES</var> to a positive integer value, say 2, instructs <var class="product">Janus</var>
to retry as many as two times if no response was received to a DNS lookup.
Setting <var>RETRIES</var> to 0, its default, means no retries are attempted.</p>
<p>
On a swamped network, it is probably better to
set a <var>JANUS NAMESERVER TIMEOUT</var> value of, say, 3 and a <var>RETRIES</var> setting of 2, rather than to set <var>TIMEOUT</var> to 10 with <var>RETRIES</var> at 0. This is so because:
*If a packet gets dropped, there is no benefit to waiting 10 seconds instead of 3.
*It is very unlikely that it would take a nameserver 3 seconds to respond to a received request (including packet turnaround time). </p>
<p>
It probably does not make sense to set <var>RETRIES</var>
to a value greater than 2: if packets are being dropped so frequently
that three consecutive DNS requests are dropped, you have problems much more serious than the failed lookups. </p>
<p>
<var>RETRIES</var> is available as of Version 7.8 of the <var class="product">Sirius Mods</var>. </p></td></tr>
</table>


The <var>JANUS NAMESERVER</var> command can be issued at any time, so the name server lookup behavior of <var class="product">Janus Sockets</var> can be dynamically changed for extraordinary situations such as name server crashes, name server reconfigurations, wholesale IP address changes on the local network, and so on.  
The <var>JANUS NAMESERVER</var> command can be issued at any time, so the name server lookup behavior of <var class="product">Janus Sockets</var> can be dynamically changed for extraordinary situations such as name server crashes, name server reconfigurations, wholesale IP address changes on the local network, and so on.  
Line 52: Line 83:
The following system statistics can be viewed in <var class="product">SirMon</var> to determine how name server lookups are faring in an Online:
The following system statistics can be viewed in <var class="product">SirMon</var> to determine how name server lookups are faring in an Online:
<table class="syntaxTable">
<table class="syntaxTable">
<tr><th>DNSCACHE</th>
<tr><th><var>DNSCACHE</var></th>
<td>The number of entries in the name server cache (the <var>CACHE</var> value on the <var>JANUS NAMESERVER</var> command).</td></tr>
<td>The number of entries in the name server cache (the <var>CACHE</var> value on the <var>JANUS NAMESERVER</var> command).</td></tr>
<tr><th>DNSMAXTL</th>
<tr><th><var>DNSMAXTL</var></th>
<td>The value of the <var>MAXTTL</var> parameter on the <var>JANUS NAMESERVER</var> command.</td></tr>
<td>The value of the <var>MAXTTL</var> parameter on the <var>JANUS NAMESERVER</var> command.</td></tr>
<tr><th>DNSCURNS</th>
<tr><th><var>DNSCURNS</var></th>
<td>The current "go to" name server, in dotted IP address format with the port number in parentheses. For example: :lit.198.242.244.9(53):elit..</td></tr>
<td>The current "go to" name server, in dotted IP address format with the port number in parentheses. For example: <code>198.242.244.9(53)</code>.</td></tr>
<tr><th>DNSRTOT</th>
<tr><th><var>DNSRTOT</var></th>
<td>Total number of name lookup requests.</td></tr>
<td>Total number of name lookup requests.</td></tr>
<tr><th>DNSRFAIL</th>
<tr><th><var>DNSRFAIL</var></th>
<td>Number of name lookup requests that did not succeed, that is, did not get an IP address.</td></tr>
<td>Number of name lookup requests that did not succeed, that is, did not get an IP address.</td></tr>
<tr><th>DNSRSUCC</th>
<tr><th><var>DNSRSUCC</var></th>
<td>Number of name lookup requests that succeeded.</td></tr>
<td>Number of name lookup requests that succeeded.</td></tr>
<tr><th>DNSRCACH</th>
<tr><th><var>DNSRCACH</var></th>
<td>Number of name lookup requests that found the requested name in the local cache.</td></tr>
<td>Number of name lookup requests that found the requested name in the local cache.</td></tr>
<tr><th>DNSRTIMO</th>
<tr><th><var>DNSRTIMO</var></th>
<td>Number of requests to name servers that timed out before they got a response. With multiple name servers, a single request can try several servers and so get several timeouts. But, of course, this is probably rare in practice.</td></tr>
<td>Number of requests to name servers that timed out before they got a response. With multiple name servers, a single request can try several servers and so get several timeouts. But, of course, this is probably rare in practice.</td></tr>
<tr><th>DNSWTIME</th>
<tr><th><var>DNSWTIME</var></th>
<td>Total time spent waiting for responses from name servers.
<td>Total time spent waiting for responses from name servers.
</td></tr></table>
</td></tr></table>


See: [[List of Janus commands]]
==See also==
<ul>
<li>[[List of Janus commands]]
</ul>
 
[[Category:Janus commands|JANUS NAMESERVER]]
[[Category:Janus commands|JANUS NAMESERVER]]

Latest revision as of 14:32, 3 July 2013

NAMESERVER

This specifies the IP address(es) and port(s) of the TCP/IP name server(s).

If JANUS NAMESERVER is executed without parameters, it displays the current setting for NAMESERVER.

The JANUS NAMESERVER command only has an effect when running in an IBM (TCPTYPE=IBM) TCP/IP environment.


Syntax

The following form, invoked without any parameters, displays the current NAMESERVER setting:

JANUS NAMESERVER

The following form specifies the new NAMESERVER setting:

JANUS NAMESERVER ip_address port_number - [AND ip_address port_number]] ... - [TIMEOUT numsec] - [CACHE numcache] - [MAXTTL maxsec] - [RETRIES num]

ip_addressThe IP address of the host on which the name server resides.
port_numberThe port on the name server host that is used to access the name server. If port_number is not specified, it defaults to 53, the standard port for name servers.

In the following example, the name server location is specified as port 53 on the host at IP address 198.242.244.33:

JANUS NAMESERVER 198.242.244.33 53

Under Sirius Mods Version 6.8 and later, the AND clause(s) allow specification of alternative backup name servers. This can be useful to provide redundancy in the unlikely case that there is a failure or shutdown of the primary name server.

Typically, all DNS requests go to the primary (first) name server. If a request times out, it is assumed that that name server is having problems, and the second name server is sent the request. If the second name server sends a response, it becomes the primary name server. That is, all subsequent DNS requests are sent to it. If the second name server fails to respond, the third name server is tried; if it responds, it becomes the primary name server. And so on.

The following command tells Janus Sockets to use the nameserver at IP address 198.242.244.9 as the primary name server, and to use the one at 198.242.244.47 as a backup. No port numbers are specified because the name servers use the default port of 53 (as do almost all name servers):

JANUS NAMESERVER 198.242.244.9 AND 198.242.244.47

Since name servers rarely go down, it is probably quite unnecessary to have more than two name servers, but as many as eight name servers are supported by Janus.

Note: A negative response from a name server, that is, a response that indicates that the name server does not know the requested host name, does not cause a subsequent name server to be tried. If name servers are properly configured, changing name servers should not affect the success of a hostname lookup.

The other JANUS NAMESERVER command parameters available in Sirius Mods Version 6.8 and later are:

TIMEOUT numsec This sets the maximum number of seconds to wait for a name server response. The internet standard for this value, and the value used by Janus Sockets before Sirius Mods Version 6.8, was 10. While this might be a reasonable value if lookups are going against busy name servers on the other side of the world, and the internet is extremely busy, this value is absurdly high for business applications where the name server is local and all host names being sought are local. Even for internet-wide lookups, a ten-second timeout is probably overkill these days. In any case, the cost of a high timeout value is that if there should be a problem with a name server, it would take the timeout number of seconds to notice the problem and correct for it. 10 seconds is a fairly long time for this to happen, so one might want to set this timeout to a lower value.
CACHE numcache This parameter indicates that Janus Sockets is to save hostname-to-IP address mappings in the Online address space. This means that subsequent name server lookups would be extremely fast in-memory lookups, rather than calls to an external name server. This would both save CPU and reduce name lookup latency. numcache is the maximum number of hostnames to cache in the Online. Names are cached in virtual storage, and the amount of virtual storage required for the cache is about 100*numcache. If the number of hostnames ever looked up is relatively small, it would make sense to set numcache to a little more than this number of hostnames. Otherwise, the setting of numcache is a trade-off between CPU savings and latency and virtual storage — cache entries are saved according to a most-recently-used algorithm so that frequently requested hostnames tend to remain in cache. There are several system statistics the can be viewed via SirMon that make it possible to determine how well the name caching is working. These statistics are described below.
MAXTTL maxsec This parameter indicates the maximum amount of time Janus Sockets is to save a hostname to IP address mapping in its local cache before checking it again with the name server. The name MAXTTL stands for MAXimum Time To Live. This parameter might be useful in highly dynamic environments where host addresses might change somewhat frequently. When a name server sends a hostname to IP address mapping response, it also sends a "Time To Live" with that response. This indicates that the requestor should revalidate the name after the indicated time-to-live. Janus Sockets uses the minimum of the time-to-live sent by the name server and the value of MAXTTL for the effective time-to-live of a name server response. Janus Sockets does not cache negative responses. That is, if the name server did not know a particular hostname, and that hostname is requested again, Janus Sockets will again query the name server for that hostname.
RETRIES num This parameter retries a DNS UDP packet for which no response is received. This means that if Janus does a DNS lookup just when the target nameserver is down for an instant, or if the UDP packet gets lost on the network (IP networks don't have to guarantee delivery of IP packets), the DNS lookup does not fail.

Setting RETRIES to a positive integer value, say 2, instructs Janus to retry as many as two times if no response was received to a DNS lookup. Setting RETRIES to 0, its default, means no retries are attempted.

On a swamped network, it is probably better to set a JANUS NAMESERVER TIMEOUT value of, say, 3 and a RETRIES setting of 2, rather than to set TIMEOUT to 10 with RETRIES at 0. This is so because:

  • If a packet gets dropped, there is no benefit to waiting 10 seconds instead of 3.
  • It is very unlikely that it would take a nameserver 3 seconds to respond to a received request (including packet turnaround time).

It probably does not make sense to set RETRIES to a value greater than 2: if packets are being dropped so frequently that three consecutive DNS requests are dropped, you have problems much more serious than the failed lookups.

RETRIES is available as of Version 7.8 of the Sirius Mods.

The JANUS NAMESERVER command can be issued at any time, so the name server lookup behavior of Janus Sockets can be dynamically changed for extraordinary situations such as name server crashes, name server reconfigurations, wholesale IP address changes on the local network, and so on.

Resets of CACHE and MAXTTL should "do the right thing." That is, a change of CACHE value should preserve as many as the new CACHE value's number of entries. For example, if CACHE went from 300 to 50, the fifty most recently used entries would be preserved. If it went from 100 to 200, all entries would be preserved, of course. So if one wants to clear the cache, numcache should be set down to 0, then back up to the desired cache size.

The following system statistics can be viewed in SirMon to determine how name server lookups are faring in an Online:

DNSCACHE The number of entries in the name server cache (the CACHE value on the JANUS NAMESERVER command).
DNSMAXTL The value of the MAXTTL parameter on the JANUS NAMESERVER command.
DNSCURNS The current "go to" name server, in dotted IP address format with the port number in parentheses. For example: 198.242.244.9(53).
DNSRTOT Total number of name lookup requests.
DNSRFAIL Number of name lookup requests that did not succeed, that is, did not get an IP address.
DNSRSUCC Number of name lookup requests that succeeded.
DNSRCACH Number of name lookup requests that found the requested name in the local cache.
DNSRTIMO Number of requests to name servers that timed out before they got a response. With multiple name servers, a single request can try several servers and so get several timeouts. But, of course, this is probably rare in practice.
DNSWTIME Total time spent waiting for responses from name servers.

See also