cc/td/doc/product/iaabu/distrdir
hometocprevnextglossaryfeedbacksearchhelp
PDF

Table of Contents

Configuring Advanced Features

Configuring Advanced Features

This chapter describes the following advanced configuration topics:

Parameters That Can be Configured in the Default DNS or in the Director

The following parameters can be configured either in the Director itself using the software command-line interface (CLI) or in the Director's default DNS server using ciscoDD DNS TXT records:

Cisco recommends that when you configure these parameters, you perform all configurations in the same location; either in the Director or in the default DNS server.


Note Configuration information entered via the Director's command-line interface (CLI) overrides any configuration information retrieved from DNS TXT records found in the default DNS server.

Setting Metrics and the Server Connection Parameter

There are many criteria that the Director can use when choosing a server for a client. To collect information, the Director uses one or more of its built-in metrics. There are many different ways to put this information together to determine the "best" server. In addition, the server connection parameter helps the Director determine whether a server is operational. This section covers the following topics:

Types of Weight and Priority Metrics

Following are descriptions of metric options:

You can give each of these metrics a weight value, a priority value, or both. You can use any combination of metrics and omit those you do not want to use.

Using Metrics

The following conditions apply to specifying metrics:


Note IGP metrics returned from different autonomous systems must be obtained from the same IGP and have the same scaling factor to be directly comparable.

See the "Sample Configurations" section for examples that demonstrate these principles.

Setting Weights

There are two ways that you can specify weight values for one or more metrics:

ip director default-weights {[drp-int n] [drp-ext n] [drp-ser n] [random n] [admin n]}
To examine the default weights, use the show ip director default-weights command.
ip director host name weights {[drp-int n] [drp-ext n] [drp-ser n] [random n] [admin n]}
If desired, host-specific weights can instead be configured on the Director's default DNS server. For example, you could configure host-specific weights with the following ciscoDD weights TXT record:
hostname in txt "ciscoDD: weights {[drp-int n] [drp-ext n] [drp-ser n] [random n] [admin n]}"
When the associated metric is referenced in the sorting decision, it will always be multiplied by its metric weight, if specified. In this way, you can specify that some metrics have more influence than others. You can determine the weights you want to use through experimentation. The weights do not need to add to 100.
To examine host-specific metric weights configured in the Director, use the show ip director host [hostname] command
This command does not report host-specific information about hosts which were configured using TXT records. To see host-specific information, use the show hosts command, after the DNS TXT records have been loaded into the Director's cache.

Setting Metric Priority

Metric priority can be configured on the Director with the ip director host priority command:

ip director host name priority {[drp-int n] [drp-ext n] [random n] [admin n]}

If desired, metric priority can instead be configured on the Director's default DNS server using a ciscoDD priority TXT record. The full syntax of this TXT record is:

hostname in txt "ciscoDD: priority {[drp-int n] [drp-ext n] [drp-ser n] [random n] [admin n]}"

Metric priority must be configured explicitly.


Note If a metric uses priority but not a weight, the weight is assumed to be 1. So whenever you want to use priority only, you do not need to specify weights.

For example, you may want all clients to be assigned to the server that is closest to them according to the BGP hop count, and if two or more servers deterined to be "closest" are at the same BGP autonomous system hop distance, the choice should be according to administrative preference. This would be done by specifying the metric priority as follows:

ip director host www.sleet.com priority drp-ext 1 admin 2

or on the default DNS server:

www.sleet.com. in txt "ciscoDD: priority drp-ext 1 admin 2"

With this configuration, the DRP-external metric of all potential servers would first be compared (including the appropriate weights if specified and default weights otherwise). If there are two or more best choices, the administrative preference metrics would next be compared (again multiplying them by the appropriate weights). If, in this example, the administrative metrics once again appeared to be equivalent, the last server whose metric was looked at would be arbitrarily selected.

Setting Administrative Preferences

Administrative preferences are set with the following command on the Director:

ip director server [hostname | host-ip-address] preference [cost]

hostname or host-ip-address is the host name or IP address specification of the server, and cost is the metric value. This command overrides any other value for the administrative metric for this host. Specifying a cost of 0 (zero) removes this server from the list of available servers.

Specifying the Server Connection Parameter

The server connection parameter lets the Director empirically verify that a server is available and thus prevents the Director from redirecting clients to servers that cannot respond. To configure this parameter, specify the port number for making connections, and the minute interval for checking availability. When configured with this information, the Director establishes a connection to the server port once every configured minute interval. If the server is down, the Director cannot connect to it and will not direct clients to this server.

You can configure this parameter in three ways:

subdomain-name. in txt "ciscoDD: drp-assoc distr-server-addr DRP-agent-addr port [connection-interval]"
For example, this records tells the Director to try to connect to port 80 every 5 minutes:
www.sleet.com. in txt "ciscoDD: drp-assoc 11.0.0.2 11.0.0.3 80 5"
subdomain-name. in txt "ciscoDD: server distr-server-addr port# connection-interval"
For example:
www.sleet.com. in txt "ciscoDD: server 11.0.0.2 80 5"

How the Director Uses the Server Connection Parameter

The Director will establish a TCP connection to the server and after being successful will end the connection, having determined the server is up. This metric may be used with or without DRP metrics. When this parameter is configured, the Director will attempt to create a TCP connection to each of the distributed servers on a configured port (for example, port 80 for HTTP servers) over a configurable time interval. Servers that yield unsuccessful TCP connection attempts will be marked as unavailable. Following a failed TCP connection, the Director will use a linear-backoff algorithm to create subsequent TCP connections to the server to determine when it is again available. This algorithm is used to smoothly handle changes in server or network availability.

What the algorithm does when the server connection is first unsuccessful

The initial connection trial to a server labeled "up" is done three times in rapid succession. If no connection is successful, the percentage confidence that the server is down is set to 10 percent. The retry interval is calculated as the configured interval multiplied by the confidence percentage with a minimum of 1 minute. Each successive connection attempt is done once, and each time the attempt is unsuccessful the confidence percentage is incremented by 10 percent until it reaches 100 percent.

For example, if you have configured the Director to create a TCP connection to port 80 on a certain server every 10 minutes to check server availability, and the TCP connection fails, the following scenario occurs:

This procedure will continue until either 10 failures occur or the server yields a successful TCP connection. Either way, the Director will resume using the original configured time interval (the 100 percent confidence percentage scaling factor, which is 10 minutes in this example) when attempting TCP connections to a server. This algorithm is designed to quickly determine server availability following a failed TCP connection.


Note Although TCP connection state information may take up to 4 minutes to be cleared, TCP connection timeouts usually occur within about 30 seconds. As a result, the minimum configurable TCP connection time interval on the Director is 1 minute. The minimum retry interval in the Director's linear-backoff algorithm is also 1 minute.

Sample Configurations

This section contains simple and advanced examples of Director metrics configurations. For each example, specific criteria for metric configuration are stated, followed by the appropriate Director configuration command(s) and the ciscoDD DNS TXT record entries. Metrics should be configured either all in the Director using CLI commands, or all in the Director's default DNS server using ciscoDD DNS TXT records. Do not configure metrics in both locations.

DRP External Metrics Example

Metric Criteria


Command(s) in the Director

DNS TXT record in the Director's default DNS server

DD(config)# ip director default-weights drp-ext 1

The weight value of 1 is arbitrary because there is just one metric.

www.sleet.com. in txt "ciscoDD: weights drp-ext 1"

If all servers return the same DRP external metric value, the last server whose metric was examined would be arbitrarily selected.

DRP External and Internal Metrics Example

Metric Criteria on Distributed HTTP Servers


Command(s) in the Director

DNS TXT record in the Director's default DNS server

DD(config)# ip director default-weights drp-ext 80 drp-int 10

The proper weights would need to be determined, perhaps through experimentation.

www.sleet.com. in txt "ciscoDD: weights drp-ext 80 drp-int 10"
The TCP connection parameter can be configured on the Director using the following command: DD(config)# ip director host www.sleet.com connect 80 5 Alternatively, you could configure this in the Director's default DNS server with the following ciscoDD drp-assoc TXT record: www.sleet.com. in txt "ciscoDD: drp-assoc A.B.C.D W.X.Y.Z 80 5"

Note The TCP connection parameter port number and connection-interval information should be configured on each ciscoDD drp-assoc TXT record.

One other configuration option for this example is to configure metrics in the server DNS TXT record separately, using an entry similar to the following:

www.sleet.com. in txt "ciscoDD: server A.B.C.D 80 5"

This record causes the Director to attempt a TCP connection to port 80 at IP addresses A.B.C.D every 5 minutes.

If you configure the TCP connect parameter, any server marked as "down" is removed from the list of valid servers, and is also removed from the Director per-client DRP cache, if it is there.

If all servers return the same composite metric, the last server whose metric was looked at is arbitrarily selected.

Multiple Priority Metrics Example

Metric Criteria

Command(s) in the Director

DNS TXT record in the Director's default DNS server

DD(config)# ip director host www.sleet.com priority drp-ext 1 drp-int 2 random 3 www.sleet.com. in txt "ciscoDD: priority drp-ext 1 drp-int 2 random 3"

This tells the Director to use the DRP external metric value to make the decision. If multiple servers have the same DRP external value, use the DRP internal metric value to make the decision. If multiple servers have the same DRP internal value, use the random metric value to make the decision. In this case, the Director picks a random number for each server and chooses the server with the lowest random metric as the "best" server. In the unlikely event that the random metric is the same for all servers, the last server whose metric was looked at would be arbitrarily be selected.

Remember that if a metric has a priority value but no weight value, the weight is set to 1. So in this example, you really do not need to specify weights at all.

To guarantee that each server is operational, you need to configure the TCP connect parameter as described previously for the other examples.

Note that in this example if the random metric had not been explicitly configured, the behavior would have been different. In that case, if there were ties for both the DRP external and internal metrics (which means that all servers are equal candidates), the Director would have returned the IP address of the server whose metric was last examined, instead of picking a random server.

Combined Weighted and Priority Metrics Example

Metric Criteria Using Default Weights

This example requires weighting and priority, but is different than the last example because it uses a composite metric (a linear combination of several metrics) instead of a single metric for each decision point.

Command(s) in the Director

DNS TXT record in the Director's default DNS server

To set the default weights: DD(config)# ip director default-weights drp-ext 80 drp-int 10 random 1

To set the metric priority:

DD(config)# ip director host www.sleet.com priority drp-ext 1 drp-int 1 random 2
To set the default weights: www.sleet.com. in txt "ciscoDD: weights drp-ext 80 drp-int 10 random 1"

To set the metric priority:

www.sleet.com. in txt "ciscoDD: priority drp-ext 1 drp-int 1 random 2"

Notice the "1"s for both the DRP external and DRP internal metrics. This means that the primary factor for choosing the server is to take the linear combination of these metrics, which is (drp-ext * 80) + (drp-int * 10). If all servers have the same value, they are equally suitable. In this case, the priority record specifies that the random metric is the next factor to consider. The Director will randomly choose the best server. Again, you need to configure the TCP connect parameter to ensure that each server is operational.

Specifying a Time-to-Live Value on DNS Resource Records Returned by the Director

To specify a time-to-live (TTL) value, in seconds, to be placed on all DNS resource records issued by the Director, use the following command:

ip director ttl seconds

This command tells the end-user clients how long to keep DNS records received from the Director. In most situations, the default value of 0 seconds is appropriate in order to prevent local DNS caching.

Enabling and Disabling the Director's Per-Client DRP Metric Cache

The Director caches the sorting decision made and the requester's IP address each time it processes a query. This way, if a client repeats a request for a specific address within a specified caching time period, the Director can respond from the cache. This interval is configurable. The default Director caching interval is 1 minute, and is recommended for most environments.

The caching mechanism increases performance by reducing the amount of DRP querying to DRP server agents when answering client requests. With the caching functionality, the Director can answer a request from its own local memory instead of asking the DRP server agents for this information.

Use a long per-client caching value if you can assume that the state of the network is relatively static (for example, you do not expect it to change within the caching time interval).

To enable the Director cache (which is the default), use this command:

ip director cache

To disable the Director cache, use the no form of this command:

no ip director cache

To configure the Director's per-client DRP caching interval, use the following command:

ip director cache-time [seconds]

Setting Up Multiple Subdomains and Host Names

Multiple subdomains and host names can be configured on the Director in one of three possible scenarios:

For example, if you wanted to set up a distributed FTP server called ftp.sleet.com and a distributed web (HTTP) server called www.sleet.com, you could configure the Director using the first or last methods listed. You cannot configure all host names in HTTP session redirector mode, because the distributed FTP server application requires the Director to be configured in DNS caching name server mode.

For ease of configuration management, we recommend that multiple subdomains be configured either in the Director or in the primary DNS server. For example, the configurations specifying weights, priorities, and so on for www.sleet.com and ftp.sleet.com should both be placed in either the Director or in the primary DNS server.


Note Remember that for DNS caching name server mode, ftp.sleet.com is treated as a subdomain name; for HTTP session redirector mode, www.sleet.com is treated as a host name. For simplicity, in some parts of this section a host name may be referred to as a subdomain name.

The sections that follow show how to configure these names:

Configuring more than two subdomains and host names is simply an extension of the tasks given.

Configuring Two Subdomains in DNS Caching Name Server Mode

Configuring multiple subdomains in DNS caching name server mode involves setting up the Director as a name server that is authoritative for multiple subdomains.

Configuring the Director

Step 1 Configure the Ethernet interface, as described in the chapter "Configuring the Director Software Interfaces."

Step 2 Specify the primary DNS server to which the Director should send requests using the ip name-server DNS-server-IP-address global configuration command. DNS-server-IP-address is the IP address of the default DNS server (usually the primary domain's primary server).

Step 3 In the Director, add a Start of Authority (SOA) record that gives the Director authority for the subdomain:

ip dns primary domain soa primary contact [refresh retry expire minimum]


For example, the following command makes the primary DNS server authoritative for the www.sleet.com subdomain:


The command shown tells the Director that it is the primary DNS server authoritative for the www.sleet.com domain, the DNS host name of the Director is dd.sleet.com, and the administrative contact for this zone is sysadmin@sleet.com. The refresh-interval (the time interval that must elapse between each poll of the primary by the secondary name server) is 6 hours, a retry-interval (the time interval used between successive connection attempts by the secondary to reach the primary name server in case the first attempt failed) is 15 minutes, the expire-ttl (the time interval after which the secondary expires its data if it cannot reach the primary name server) is 90 days, and a minimum-ttl (the minimum TTL value, which specifies how long other servers should cache data from the name server) is 1 day.


The values listed are suggested default values. You can configure the Director with the listed default values by simply using the ip dns primary domain soa primary contact command.


In our example, you would use:



Note Although the Director can be configured as an authoritative DNS name server, it does not support zone transfers.

Step 4 Use the following commands to define the virtual host names to be used for the sets of distributed servers:

ip host name [tcp-port-number] address1 [address2 ...address8]


ip director host name


Step 5 Repeat Step 3 and Step 4 for the ftp.sleet.com domain name.

Configuring the sleet.com Primary DNS Server

Instead of placing one name server (NS) record on the sleet.com primary DNS server, you would use two. These NS records pass DNS authority for both subdomains to the Director. The single A record defines the IP address of the Director.

Here is an example of the configuration you would use for the sleet.com primary DNS server:

ftp.sleet.com. in ns dd.sleet.com.
www.sleet.com. in ns dd.sleet.com.
dd.sleet.com. in a 10.0.0.1

The first two records tell the sleet.com servers that the Director is the name server to which queries about the www.sleet.com and ftp.sleet.com subdomains must be directed. The third record says that the interface IP address for the Director is 10.0.0.1.


Note Be careful to include the period (.) at the end of each subdomain name located at the beginning of each resource record. It keeps named from trying to append the default subdomain name. The default subdomain is the subdomain associated with the database file in the named.boot file. Without the trailing period, the resolver would be confused by the expansion of the subdomain name to www.sleet.com.sleet.com.

Metric weights, priorities, DRP associations, and the server connection parameter are all configured as previously described, either in the Director or in the primary DNS.

Configuring Two Host Names in HTTP Session Redirector Mode

Configuring multiple host names in HTTP mode involves configuring the Director to listen to multiple IP addresses, with each address corresponding to a particular host name. The Director then redirects the client web browser to the appropriate real web server.

The descriptions that follow configure two web server host names (www1.sleet.com and www2.sleet.com) in HTTP session redirector mode.

Configuring the Director

Perform these steps to configure the Director.

Step 1 Configure the sleet.com primary DNS server as the default name server for the Director with this command:

ip name-server DNS-server-IP-address


The interface IP address of the Director is configured as described in the chapter "Configuring the Director Software Interfaces." For this example, the address is 10.0.0.1.


Step 2 Set up the Director to accept queries to the virtual HTTP server IP addresses for the host names. In this example, the following commands specify 10.0.0.4 and 10.0.0.5 as virtual addresses:

ip director ip-address 10.0.0.4
ip director ip-address 10.0.0.5


These IP addresses must be unused and on the same subnet as the interface IP address, 10.0.0.1 in this example.


The primary DNS server has pointer records (PTRs) that map virtual IP addresses to host names. The Director will identify any DNS requests received on IP addresses 10.0.0.4 and 10.0.0.5 as requests for the www1.sleet.com and www2.sleet.com host names, respectively.


Configuring the sleet.com Primary DNS Server

Recall that we wish to configure two web server host names, www1.sleet.com and www2.sleet.com. To do this, four resource records must begin the configuration of the sleet.com primary DNS server:

www1.sleet.com. in a 10.0.0.4
www2.sleet.com. in a 10.0.0.5
4.0.0.10.in-addr.arpa. in ptr www1.sleet.com. 
5.0.0.10.in-addr.arpa. in ptr www2.sleet.com. 

These records tell the Internet the IP addresses associated with the host names www1.sleet.com and www2.sleet.com. This information can also be configured in the Director itself using the ip host command. Remember that reverse-mapping PTR records are required by the Director.

In addition, the sleet.com primary DNS server has the following resource records:

www1-servers.sleet.com. in a 20.0.0.2
	in a 21.0.0.2
	in a 22.0.0.3
www2-servers.sleet.com. in a 10.0.0.2
	in a 11.0.0.2
	in a 12.0.0.2

Another way to configure the primary DNS server is to bind the distributed server IP addresses to the virtual host name in the Director itself using the ip host command:

ip host new-virtual-hostname address1 [address2...address8]

For example:

ip host www1-servers.sleet.com 20.0.0.2 21.0.0.2 22.0.0.2
ip host www2-servers.sleet.com 10.0.0.2 11.0.0.2 12.0.0.2

In HTTP session redirector mode, the Director appends the string "-servers" to the first part of the host name, creating a new host name for querying the primary DNS server. In this example, this results in the creation of the host names www1-servers.sleet.com and www2-servers.sleet.com.

The distributed web servers in the www1.sleet.com host name have the IP addresses 20.0.0.2, 21.0.0.2, and 22.0.0.2. The Director will return one of these IP addresses as a result of an A query to the www1.sleet.com host name.

The distributed web servers in the www2.sleet.com host name have the IP addresses 10.0.0.2, 11.0.0.2, and 12.0.0.2. The Director will return one of these IP addresses as a result of a DNS "A" query to the www1.sleet.com host name.

Metric weights, priorities, DRP associations, and the server connection parameter are all configured as previously described, either in the Director or in the primary DNS.

How the Configuration Works

Following are the steps that show how the Director works with two host names in HTTP session redirector mode.

For the www1.sleet.com host name:

  1. The client web browser tries to retrieve URL http://www1.sleet.com.

  2. The Internet DNS system maps this name to 10.0.0.4 (the Director HTTP session redirector system).

  3. The Director listens for connections to port 80 (the HTTP port) at IP address 10.0.0.4 (an IP address on the Director subnet that has been assigned for use by the HTTP session redirector system).

  4. The Director sends a DNS PTR query for the host name associated with 10.0.0.4, then finds and caches the host name www1.sleet.com. This query is sent only when the host name information cannot be found in the Director local cache.

  5. The Director now formulates a new host name by searching from the left-hand side of the returned host name for a period. When it finds the period, it places the text "-servers" just before it. The host name www1.sleet.com becomes www1-servers.sleet.com.

  6. The Director then sends a DNS query for the IP addresses associated with the new host name www1-servers.sleet.com. This results in the normal Director sorting of addresses using all of the metrics configured for this host name. The Director selects the best server IP address for the client that requested the initial connection.

  7. The Director then makes up the new URL that points to the real web server (for example, http://20.0.0.2) and sends the web client the code "302 Temporary Relocation," which specifies the new URL location.

  8. The client web browser receives the temporary relocation code and retrieves the web page.
For the www2.sleet.com host name:

  1. The client web browser tries to retrieve URL http://www2.sleet.com.

  2. The Internet DNS system maps this name to 10.0.0.5 (the Director HTTP session redirector system).

  3. The Director listens for connections to port 80 (the HTTP port) at IP address 10.0.0.5 (an IP address on the Director subnet that has been assigned for use by the HTTP session redirector system).

  4. The Director sends a DNS PTR query for the host name associated with 10.0.0.5 and finds the host name www2.sleet.com. This query is sent only when the host name information cannot be found in the Director local cache.

  5. The Director now formulates a new host name by searching from the left-hand side of the returned host name for a period. When it finds the period, it places the text "-servers" just before it. So the host name www2.sleet.com becomes www2-servers.sleet.com.

  6. The Director then sends a DNS query for the IP addresses associated with the new host name www2-servers.sleet.com. This results in the normal Director sorting of addresses using all of the metrics configured for this host name. The Director selects the best server IP address to use for the client that requested the initial connection.

  7. The Director constructs a new URL that points to the real web server (for example, http://10.0.0.2) and sends the web client the code "302 Temporary Relocation," which specifies the new URL location.

  8. The client web browser receives the temporary relocation code and retrieves the real web page.

Configuring a Combination of Modes

In this example, the ftp.cisco.com subdomain is configured in DNS caching name server mode and the www.sleet.com host name in HTTP session redirector mode.

Configuring one subdomain in DNS caching name server mode and one host name in HTTP session redirector mode involves separately configuring them as described in the previous sections "Configuring Two Subdomains in DNS Caching Name Server Mode" and "Configuring Two Host Names in HTTP Session Redirector Mode."

Configuring the Director

Configure the Director as the authoritative name server using the ip dns primary command for the ftp.sleet.com domain as previously described in this chapter. Configure weights, priorities, DRP associations, and the server connection parameter either in the Director or in the primary DNS server (with TXT records) as previously described in this chapter.

Configure the virtual IP address for the www.sleet.com domain using the ip director ip-address command. Configure weights, priorities, DRP associations, and the server connection parameter either in the Director or in the primary DNS server (with TXT records).

Configuring the sleet.com Primary DNS Server

For the ftp.sleet.com domain (which will be serviced in DNS mode), add the following NS records to the sleet.com primary DNS server:

ftp.sleet.com. in ns dd.sleet.com.
dd.sleet.com. in ns w.x.y.z

where w.x.y.z is the IP address of the Director's network interface. These records indicate that the Director is the authoritative name server for the ftp.sleet.com domain.

For the www.sleet.com domain (which will be serviced in HTTP redirect mode), add the following A and PTR records to the sleet.com primary DNS server:

www.sleet.com. in a a.b.c.d
d.c.b.a.in-addr.arpa. in ptr www.sleet.com.
www-servers.sleet.com. in a p1.q1.r1.s1
www-servers.sleet.com. in a p2.q2.r2.s2
www-servers.sleet.com. in a p3.q3.r3.s3

The first A record defines the virtual IP address (a.b.c.d) to be used for all HTTP requests for the www.sleet.com domain name. This IP address must be on the same subnet as that of the Director's network interface.

The second resource record provides a means for the Director to translate the virtual IP address to the requested domain name.

The remaining A records are used to define the IP addresses of the distributed web servers for which Director processing is required.

hometocprevnextglossaryfeedbacksearchhelp
Copyright 1989-1997 © Cisco Systems Inc.