DIGITAL TCP/IP Services for OpenVMS
Management


Previous Contents Index

5.9.5 Query Types

You can change the type of information you receive from a query. The default query type is A. Table 5-14 lists the different types of query information.

5.9.5.1 A Query Type

This is the default NSLOOKUP query type. It returns the name and IP address of a host. The following NSLOOKUP session shows a query for the host apple. The query to the server condor.lgk.dec.com is successful, and the server returns the IP address 16.99.208.10.


$ nslookup 
Default Server:  condor.lgk.dec.com 
Address:  16.99.208.53 
 
> apple 
Server:  condor.lgk.dec.com 
Address:  16.99.208.53 
 
Name:    apple.lgk.dec.com 
Address:  16.99.208.10 
> 

If you enter a domain name without a trailing period, NSLOOKUP appends the default domain to the name. You can change the default domain with the set domain or set srchlist commands.

To look up up a host not in the current domain, append a period to the name as shown in the following example:


$NSLOOKUP apple.koz.dec.com. 

5.9.5.2 PTR Query Type

To obtain the host name for an IP address, change the query type to PTR and enter the IP address as shown in the following example:


> set type=ptr 
> 16.99.208.189 
Server:  condor.lgk.dec.com 
Address:  16.99.208.53 
 
Name:    dove.lgk.dec.com 
Address:  16.99.208.189 

You can also use the PTR query type to obtain more information about a domain as the following example shows:


> lgk.dec.com 
Server:  condor.lgk.dec.com 
Address:  16.99.208.53 
 
lgk.dec.com 
        origin = condor.lgk.dec.com 
        mail addr = postmaster.lgk.dec.com 
        serial = 1998101948 
        refresh = 3600 (1H) 
        retry   = 300 (5M) 
        expire  = 604800 (1W) 
        minimum ttl = 43200 (12H) 
> 

5.9.5.3 MX Query Type

To obtain information about mail exchanger records, set the query type to MX and enter a domain. The output tells you which host(s) handles mail for the specified domain.


> set type=mx 
> lgk.dec.com 
Server:  condor.lgk.dec.com 
Address:  16.99.208.53 
 
lgk.sea.com preference = 200, mail exchanger = crl.sea.com 
lgk.sea.com preference = 50, mail exchanger = collie.lgk.sea.com 
lgk.sea.com preference = 100, mail exchanger = mail13.digital.com 
lgk.sea.com preference = 100, mail exchanger = mail11.digital.com 
lgk.sea.com preference = 200, mail exchanger = mail2.digital.com 
lgk.sea.com nameserver = collie.lgk.sea.com 
lgk.sea.com nameserver = condor.lgk.sea.com 
lgk.sea.com nameserver = hageln.lgk.sea.com 
crl.sea.com     internet address = 192.58.206.2 
collie.lgk.sea.com  internet address = 16.99.208.100 
mail13.digital.com      internet address = 192.208.46.30 
mail2.digital.com       internet address = 204.123.2.56 
condor.lgk.sea.com  internet address = 16.99.208.53 
hageln.lgk.sea.com  internet address = 16.99.208.10 

5.9.5.4 SOA Query Type

This query type returns the domain's start-of-authority information.


> set type=soa 
> microsoft.com 
Server:  condor.lgk.sea.com 
Address:  16.99.208.53 
 
microsoft.com 
        origin = dns1.microsoft.com 
        mail addr = msnhst.microsoft.com 
        serial = 1998101204 
        refresh = 7200 (2H) 
        retry   = 1800 (30M) 
        expire  = 2592000 (4w2d) 
        minimum ttl = 86400 (1D) 
microsoft.com   nameserver = dns3.nwnet.net 
microsoft.com   nameserver = dns4.nwnet.net 
microsoft.com   nameserver = dns1.microsoft.com 
microsoft.com   nameserver = dns2.microsoft.com 
microsoft.com   nameserver = dns1.moswest.msn.net 
microsoft.com   nameserver = dns2.moswest.msn.net 
dns3.nwnet.net  internet address = 192.220.250.7 
dns4.nwnet.net  internet address = 192.220.251.7 
dns1.microsoft.com      internet address = 131.107.1.7 
dns2.microsoft.com      internet address = 131.107.1.240 

5.9.5.5 NS Query Type

To obtain information about the name servers for a particular zone, set the query type to NS and then enter the zone you want. The following example shows the name servers for the microsoft.com zone.


> set type=ns 
> microsoft.com 
Server:  condor.lgk.sea.com 
Address:  16.99.208.53 
 
Non-authoritative answer: 
microsoft.com   nameserver = dns2.microsoft.com 
microsoft.com   nameserver = dns1.moswest.msn.net 
microsoft.com   nameserver = dns2.moswest.msn.net 
microsoft.com   nameserver = dns3.nwnet.net 
microsoft.com   nameserver = dns4.nwnet.net 
microsoft.com   nameserver = dns1.microsoft.com 
 
Authoritative answers can be found from: 
dns2.microsoft.com      internet address = 131.107.1.240 
dns3.nwnet.net  internet address = 192.220.250.7 
dns4.nwnet.net  internet address = 192.220.251.7 
dns1.microsoft.com      internet address = 131.107.1.7 
> 

5.9.6 Changing the Default Server

If you want to use another name server as your default server, use the server command.


$ nslookup 
Default Server:  condor.klg.sea.com 
Address:  16.99.208.53 
 
> server ns01.koz.sea.com 
Default Server:  ns01.koz.sea.com 
Address:  16.99.9.20 

If for some reason the default server is not responding, you can always use the lserver command to change the default server. The lserver command uses the initial default name server to look up the IP address of the new server.


> lserver collie.klg.sea.com 
Default Server:  collie.klg.sea.com 
Address:  16.99.208.10 

Or, if you already know the IP address of the new server, you can use the server command to reset the default server.


>server 16.99.208.10 
 
> server 16.99.99.226 
Default Server:  beagel.zok.sea.com 
Address:  16.99.99.226 

5.9.7 Listing Domain Information

The ls command lists information about a domain. This command is useful for:

Table 5-15 shows options to the ls command.

Table 5-15 Options to the NSLOOKUP ls Command
Option Function
-a Lists aliases of hosts in the domain (CNAME entries)
-d Lists all the entries in the domain
-h Lists CPU and operating system information for the domain (HINFO entries)
-m Lists mail exchangers (MX) entries in the domain
-s Lists well-known services (WKS) in the domain
-t Lists a specified entry type

The following example shows the use of the ls command to obtain address records for all hosts within a zone.


> ls -t a lgk.sea.com 
[condor.lgk.sea.com] 
@                       12H IN A        16.99.208.208 
dhcp-253                12H IN A        16.99.208.253 
ucxv4a                  12H IN A        16.99.208.129 
beavis                  12H IN A        16.99.208.90 
boxmor                  12H IN A        16.99.208.30 
kempo                   12H IN A        16.99.208.47 
pacnet                  12H IN A        16.99.208.84 
kwai                    12H IN A        16.99.208.63 
alxica                  12H IN A        16.99.9.37 
ppponvms                12H IN A        16.99.208.104 
a71kt                   12H IN A        16.99.208.142 
peteathome              12H IN A        16.99.208.101 
larisa                  12H IN A        16.99.208.49 
pigdog                  12H IN A        16.99.208.140 
ntruder                 12H IN A        16.99.208.110 

In the following example, the ls command displays alias records for hosts within the lgk.sea.com domain.


> ls -a lgk.sea.com 
[condor.lgk.sea.com] 
$ORIGIN LGK.SEA.COM. 
celics                  12H IN CNAME    celtics 
news                    12H IN CNAME    nntpd.KLG.SEA.COM. 
tiger                   12H IN CNAME    ntruder 
console                 12H IN CNAME    bblts.KLG.SEA.COM. 
deebug                  12H IN CNAME    dot 
ayla                    12H IN CNAME    ayla.KLG.SEA.COM. 
cscibm                  12H IN CNAME    cscibm.KLG.SEA.COM. 
> 

Using the -m option obtains the MX records for hosts within the lgk.sea.com domain, as shown in the following example.


> ls -m lgk.sea.com 
brigit                  12H IN MX       10 brigit 
                        12H IN MX       100 mail1.digital.com. 
                        12H IN MX       100 mail2.digital.com. 
                        12H IN MX       200 crl.SEA.com. 
piglet                  12H IN MX       10 piglet 
                        12H IN MX       100 mail1.digital.com. 
                        12H IN MX       100 mail2.digital.com. 
                        12H IN MX       200 crl.SEA.com. 
tieta                   12H IN MX       10 tieta 
                        12H IN MX       100 mail1.digital.com. 
                        12H IN MX       100 mail2.digital.com. 
                        12H IN MX       200 crl.SEA.com. 
sherry                  12H IN MX       10 sherry 
                        12H IN MX       100 mail1.digital.com. 
                        12H IN MX       100 mail2.digital.com. 
                        12H IN MX       200 crl.SEA.com. 

In the following example, using the -s option displays the well-known services for a domain.


> ls -s lgk.sea.com 
[condor.lgk.sea.com] 
WKStesthave             12H IN WKS      16.99.208.255 21 ( ) 
WKStesthavenot          12H IN WKS      16.99.208.255 255 ( ) 
WKStestnumbers          12H IN WKS      16.99.208.255 255 ( 21 23 ) 

You can redirect the output from this command to a file. This method is helpful when the domain consists of a large number of hosts. Once the file is created, you can look at its contents with the DCL TYPE command.


> ls -t a klg.sea.com > systems.txt 
[condor.klg.sea.com] 
############# 
Received 932 answers (0 records). 
 
$ TYPE SYSTEMS.TXT 
> ls -t a klg.sea.com 
[condor.klg.sea.com] 
$ORIGIN KLG.SEA.COM. 
@                       12H IN A        16.99.208.208 
dhcp-253                12H IN A        16.99.208.253 
ucxv4a                  12H IN A        16.99.208.129 
beavis                  12H IN A        16.99.208.90 
boxmor                  12H IN A        16.99.208.30 
kempo                   12H IN A        16.99.208.47 
pacnet                  12H IN A        16.99.208.84 
kwai                    12H IN A        16.99.208.63 
alxica                  12H IN A        16.99.9.37 
ppponvms                12H IN A        16.99.208.104 


Chapter 6
Cluster Load Balancing with BIND

DIGITAL TCP/IP Services for OpenVMS provides two methods for cluster load balancing:

This chapter describes how to implement load balancing with round-robin scheduling or by using the load broker. For informaton on configuring and managing the BIND name server and resolver, see Chapter 5.

Terminology Note

This chapter uses the term "cluster" to refer to several A resource records for a single host name.

6.1 Round-Robin Scheduling

Round-robin scheduling is the default method used by the BIND server for load balancing clusters. If multiple resource records satisfy a query, the BIND server returns them each time in a round-robin order. The round-robin scheme is a simple rotation where client requests are passed from one cluster member to the next. The round-robin scheme is also useful for MX records to share mail loads among multiple equivalent gateways.

Unlike traditional load balancing, round-robin does not take into account the current workload on the cluster members and does not know if these hosts are up or down.

The following example demonstrates how round-robin balancing works.

In the example, the cluster alias is defined as ROBIN, and in addition, host ROBIN is a member of the cluster. When the BIND server receives queries for ROBIN, it shuffles the records in a round-robin manner.


; 
; TCP/IP cluster load balancing - Round Robin Approach 
; cluster name:   "robin" 
robin                           IN      A       9.20.208.47 
                                IN      A       9.20.208.30 
                                IN      A       9.20.208.72 
; 

A user enters the TELNET command, specifying the cluster alias ROBIN. The first query to the name server is the result of entering the following command:


$ TELNET ROBIN
%TELNET-I-TRYING, Trying ... 9.20.208.47 
%TELNET-I-SESSION, Session 01, host birdy, port 23 
-TELNET-I-ESCAPE, Escape character is ^] 

The TELNET client connects to host birdy at IP address 9.20.208.47, the first RR in the list.

The second query to the name server is the result of entering the following command:


$ TELNET ROBIN
%TELNET-I-TRYING, Trying ... 9.20.208.30 
%TELNET-I-SESSION, Session 01, host seagull, port 23 
-TELNET-I-ESCAPE, Escape character is ^] 

The TELNET client connects to host seagull at IP address 9.20.208.30, the next RR in the list.

The third query to the name server is the result of entering the following command:


$ TELNET ROBIN
%TELNET-I-TRYING, Trying ... 9.20.208.72 
%TELNET-I-SESSION, Session 01, host owl, port 23 
-TELNET-I-ESCAPE, Escape character is ^] 

TELNET connects to host owl at IP address 9.20.208.72, the next RR in the list.

The fourth query to the name server is the result of entering the following command:


$ TELNET ROBIN
%TELNET-I-TRYING, Trying ... 9.20.208.47 
%TELNET-I-SESSION, Session 01, host birdy, port 23 
-TELNET-I-ESCAPE, Escape character is ^] 

TELNET again connects to host birdy at IP address 9.20.208.47. This is the start of the cycle repeating. The cycle repeats for the subsequent queries.

The SHOW HOST display for this name server illustrates the shuffling effect in greater detail:


TCPIP>  SHOW HOST ROBIN 
     BIND database 
 
Server:   9.20.208.72 owl.ucx.ern.sea.com 
 
Host address    Host name 
 
9.20.208.47 birdy.ucx.ern.sea.com 
9.20.208.30 seagull.ucx.ern.sea.com 
9.20.208.72 owl.ucx.ern.sea.com 
 
TCPIP>   SHOW HOST ROBIN 
     BIND database 
 
Server:   9.20.208.72 owl.ucx.ern.sea.com 
 
Host address    Host name 
 
9.20.208.30 seagull.ucx.ern.sea.com 
9.20.208.72 owl.ucx.ern.sea.com 
9.20.208.47 birdy.ucx.ern.sea.com 
 
TCPIP>   SHOW HOST ROBIN 
     BIND database 
 
Server:   9.20.208.72 owl.ucx.ern.sea.com 
 
Host address    Host name 
 
9.20.208.72 owl.ucx.ern.sea.com 
9.20.208.47 birdy.ucx.ern.sea.com 
9.20.208.30 seagull.ucx.ern.sea.com 
 
TCPIP>   SHOW HOST ROBIN 
     BIND database 
 
Server:   9.20.208.72 owl.ucx.ern.sea.com 
 
Host address    Host name 
 
9.20.208.47 birdy.ucx.ern.sea.com 
9.20.208.30 seagull.ucx.ern.sea.com 
9.20.208.72 owl.ucx.ern.sea.com 

6.2 Load Broker

The TCP/IP Services product provides a configurable, calculated, load-balancing mechanism called the load broker for distributing the load across systems in a cluster.

Unlike round-robin scheduling (the default method used by most name servers), the load broker takes into account the load on all cluster participants. The load broker polls cluster members and updates the DNS namespace accordingly.

To enable cluster load balancing, complete the following tasks:

Review the following guidelines:

6.2.1 How the Load Broker Works

When the load broker starts, it reads its configuration file and starts polling cluster members. The load broker exchanges messages with cluster members that run the metric server. The metric server ( Section 6.2.3) keeps calculating the current rating and reports it when polled by the load broker. Periodically, the load broker sorts the list of addresses based on metric rating reports, drops the systems that are not responding, and takes a subset of the list and compares it to the name server information. To do the comparison, the load broker sends a host lookup request to the specified name server. If the lists are the same, the load broker does not make any change. If the lists are different, the load broker updates the name server data by sending a dynamic update request to the specified name server.

The name server uses round robin scheduling to further balance the load across the members of a cluster. So every consecutive request for translating the cluster name results in a list being returned, rotated by one.

The dns-ttl value governs how long the record is to be cached by other name servers. If some intermediate name server caches the "A" resource records for a given cluster name, it caches it for the period of TTL of the resource record. The TTL of a cluster record is controlled by the dns-ttl parameter. The default value is 45 seconds. If less time is required, you can set this value to a smaller number. To suppress any caching, you can set the dns-ttl to 0.

The dns-refresh time specifies how often the DNS information for a given cluster is refreshed. The default is 30 seconds. If you want to quickly pick up changes in the system load (reported by metric servers), set the dns-refresh to a smaller number.

The masters list specifies what name server to use for dynamic updates. Basically, this needs to point to the master name server. The name server has to allow dynamic updates from the system than runs the load broker.

6.2.2 Configuring the Load Broker

To configure the load broker, edit the file TCPIP$LBROKER_CONF.TEMPLATE located in SYS$SYSDEVICE:[TCPIP$LD_BKR] then rename the file as TCPIP$LBROKER.CONF. The following sample is a configuration of the load broker that will load balance the cluster named WWW.TCPIP.ERN.SEA.COM.


cluster "www.tcpip.ern.sea.com" 
{ 
 dns-ttl   45; 
 dns-refresh  30; 
 masters { 
  9.20.208.53; 
 }; 
 polling-interval 30; 
 max-members   3; 
 members { 
  9.20.208.100;  
  9.20.208.53; 
  9.20.208.54; 
  9.20.208.80; 
  9.20.208.129; 
  9.20.208.130; 
 }; 
 failover 16.20.208.200; 
}; 
 

After making changes to TCPIP$LBROKER.CONF, restart the load broker by running TCPIP$CONFIG and restarting the TCP/IP Services product.

The load broker configuration file contains cluster statements in the following format:


cluster "clustername.domain.com" { 
 
 members {ip_address}; 
 failover {ip_address}; 
 masters {ip_address}; 
 [dns-ttl nn;] 
 [dns-refresh nn;] 
 [polling-interval nn;] 
 [max-members nn;] 
}; 
 

Table 6-1 describes the valid fields.

Table 6-1 Cluster Statement Fields
Field Description
members Specifies the IP address for each cluster member
failover Specifies the address of the host to use if all other members are down.
masters Specifies the IP addresses of authoritative name servers.
dns-ttl Specifies the time-to-live for a given record. The value you provide governs how long the record is to be cached by other name servers. If some intermediate name servers cache "A" resource records for a given cluster name, they cache it for a period of TTL for the resource record. The TTL of a cluster record is controlled by dns-ttl parameter. The default value is 45 seconds.
dns-refresh Specifies how often the DNS information for a given cluster name is refreshed. The default is 30 seconds. This field and polling-interval work together, so their settings should match.
polling-interval Specifies the length of time between polls to cluster members. The default is 30 seconds.
max-members Specifies the maximum number of IP addresses to be returned to this server in each dynamic update. For effective load balancing, this number should be between one-third and one-half of the number of participating cluster members.

To retain your UCX V4.x cluster load balancing configuration:

  1. Enter the CONVERT/CONFIG BIND/CLUSTER command as shown in the following example:


    TCPIP> CONVERT/CONFIG BIND - 
    _TCPIP> /CLUSTER=SYS$SYSDEVICE:[TCPIP$LD_BKR]TCPIP$LBROKER.CONF 
    

    The output from this command is a TCPIP$LBROKER.CONF file containing your basic configuration.

  2. Edit the TCPIP$LBROKER.CONF file to produce a complete configuration file.


Previous Next Contents Index