Cisco GSS CLI-Based Global Server Load-Balancing Configuration Guide (Software Version 4.1(0))
reating and Playing GSLB Configuration Files

Table Of Contents

Creating and Playing GSLB Configuration Files

GSLB Configuration File Overview

Creating a GSLB Configuration File

Securely Copying GSLB Configuration Files

Modifying a GSLB Configuration File

File Modification Guidelines

File Modification Workflow

Playing a GSLB Configuration File

Where to Go Next


Creating and Playing GSLB Configuration Files


This chapter describes how to create, modify, and play (execute) GSLB configuration files. GSLB configuration files define all global server load-balancing configuration parameters for a GSS network, including the parameters that define resources, domains, source addresses, answers, keepalives, DNS rules, sticky, and proximity properties.

Using the CLI, you can quickly create a GSLB configuration file from an existing GSS network that has been configured for global server load balancing. If desired, you can modify the GSLB configuration file using a text editor. Playing the GSLB configuration file on a new or previously configured GSS network automatically updates its global server load-balancing configuration.

This chapter contains the following major sections:

GSLB Configuration File Overview

Creating a GSLB Configuration File

Securely Copying GSLB Configuration Files

Modifying a GSLB Configuration File

Playing a GSLB Configuration File

Where to Go Next

GSLB Configuration File Overview

The ability to create and play global server load-balancing configuration files is particularly useful in the following situations:

You have an existing GSS network that is successfully configured for global server load balancing and you need to develop a new, second GSS network. In most cases, creating a GSLB configuration file on the existing network and playing it on the new network will be significantly more efficient than developing a new global server load-balancing configuration.

You need to transfer the domain and source address lists from one GSS network to another. Rather than manually entering multiple domains and source addresses, you can quickly copy them from the GSLB configuration file of a source GSS network to the GSLB configuration file of a target GSS network, and then play the updated file to load the new data onto the target network.

You have two GSS networks, for example, GSS1 and GSS2. You would like to use much of the global server load-balancing development that has occurred for the GSS1 network on your GSS2 network. You realize that playing the GSLB configuration file from the GSS1 network on the GSS2 network will likely generate errors (due to conflicting data), but the ability to edit and replay the configuration file to address the errors provides the easiest path to update the GSS2 network.

Creating a GSLB Configuration File

You can create a GSLB configuration file that you can modify and import to a new or previously configured GSS network by using the copy gslb-config command in privileged EXEC mode. Use this file to automatically update its global server load-balancing configuration.

The syntax of this command is as follows:

copy gslb-config disk filename

The filename argument is the name of the output file that contains the GSLB configuration. Enter the filename only. Do not include the path information with the filename. The file is copied to the root directory on the primary GSSM.

To create a GSLB configuration file named GSLB_CONFIG_1.txt, enter:

gssm1.example.com# copy gslb-config disk GSLB_CONFIG_1.TXT
gssm1.example.com#

To verify that the file is copied to disk on the GSSM by using the dir, ls, or lls, commands in privileged EXEC mode, enter:

gssm1.example.com# ls
...
GSLB_CONFIG_1.TXT
...
gssm1.example.com#

See the "Displaying Files in a Directory" section in Chapter 2, Managing the GSS from the CLI, in the Cisco Global Site Selector Administration Guide for more information on the dir, ls, and lls commands.


Note You can also use the show gslb-config>filename command to redirect the current GSLB configuration to a file (specified by the filename variable). The file is copied to the root directory of the primary GSSM. See the "Controlling Command Output" section in Chapter 1, Command-Line Interface Command Summary, in the Cisco Global Site Selector Administration Guide for details about using the redirect (>) character.


You can view the contents of the current global server load-balancing configuration used by the GSS network by entering the show gslb-config command. This command displays information on all GSLB parameters, including resources, domains and domain lists, source addresses and source address lists, answers and answer groups, keepalives, DNS rules, sticky and proximity properties.

Securely Copying GSLB Configuration Files

You can copy a GSLB configuration file from one primary GSSM to another by using the scp command in privileged EXEC mode.


Note The GSS supports one-way communication only in SCP. You can copy GSS files from the GSS where you are logged in to an external device. You can also copy files from an external device to the GSS. However, from an external device, you cannot execute the scp command and get files from the GSS. You can only use scp from the GSS.


To securely copy files from the GSSM where you are currently logged in to another GSSM, use the scp command.

The command syntax is as follows:

scp {source_path [source_filename] user@target_host:target_path}

To securely copy files from another GSSM to the GSSM where you are currently logged in, use the scp command.

The syntax of this command is as follows:

scp {user@source_host:/source_path[source_filename] target_path}

To copy the GSLB configuration file named GSLB_CONFIG_1.txt on the primary GSSM where you are currently logged in to another primary GSSM, enter:

gssm1.example.com# scp GSLB_CONFIG_1.TXT myusername@192.168.2.3:/home
gssm1.example.com# 

For more information on the scp command, see the "Securely Copying Files" section in Chapter 2, Managing the GSS from the CLI, in the Cisco Global Site Selector Administration Guide.

Modifying a GSLB Configuration File

After you create a GSLB configuration file, you can use a text editor to modify it as needed before playing the file on a GSS network. You should review the following topics before modifying a GSLB configuration file:

File Modification Guidelines

File Modification Workflow

File Modification Guidelines

Follow these guidelines when modifying a GSLB configuration file:

When modifying a GSLB configuration file from one network for play on another network, and you have specified sticky mesh peer names, you must modify the favored-peer GSS device names for use on the new network (where the two networks use different hostnames). See the "Configuring DNS Sticky" section of Chapter 9 "Configuring DNS Sticky" for details about the favored-peer command.

Each line in the configuration file must contain a single command followed by a carriage return.

Extra spaces are ignored when the file is played.

Commands that create objects must appear before commands that refer to those objects.

Lower-level commands (for example, the favored-peer command in the sticky properties configuration mode) must follow their respective higher level command (for example, the sticky-properties command in GSLB configuration mode).

Do not use the config and gslb commands to enter the global configuration and gslb configuration modes. These actions are implied and automatically executed by the script play-config command.

Do not use the exit command at the end of the file. Exiting is implied and is automatically executed.

The use of the "?" wildcard for entering hosted domain names is allowed in GSLB configuration files. However, the "?" wildcard is not allowed when using the domain command to enter hosted domain names. See the "Configuring Domain Lists" section in Chapter 4, Configuring Domain Lists for more information about entering domain names.

File Modification Workflow

To copy all source address lists and associated addresses and all domain lists and associated domain names from a GSLB configuration file from the GSS1 network to the GSS2 network, perform the following steps:

1. Execute a backup at the primary GSSM for both GSS1 and GSS2 networks.

2. At the primary GSSM of both GSS1 and GSS2 networks, enter the copy gslb-config disk command to create separate, uniquely named GSLB configuration files. See the "Creating a GSLB Configuration File" section for details about the copy gslb-config disk command.

3. At the primary GSSM for the GSS2 network, enter the scp command to copy the GSLB configuration file created on the GSS1 network to the primary GSSM on the GSS2 network. See the "Securely Copying GSLB Configuration Files" section for details about using the scp command.

4. Open both GSLB configuration files in a text editor.

5. Copy the domain lists and associated domain names and source address lists and associated addresses from the configuration file created for the GSS1 network, and then paste them into the configuration file created for the GSS2 network.

6. Save the modified GSLB configuration file for the GSS2 network.

7. At the primary GSSM for the GSS2 network, enter the script play-config command in global server load-balancing configuration mode to play the modified file and import the new domain and source address data. See the "Playing a GSLB Configuration File" section for more information about using the script play-config command.

Playing a GSLB Configuration File

You can play a GSLB configuration file by using the script play-config command in global server load-balancing configuration mode.


Note If the size of the static proximity group configuration is very large, we recommend that you use the proximity play-config command instead since it plays the proximity commands more efficiently.


The syntax of this command is as follows:

script play-config filename

The filename argument is the name of a previously created GSLB configuration file that resides on the root directory of the primary GSSM. The GSLB configuration file could be a file that was created on the primary GSSM on which it resides, or it could be a file that was created on the primary GSSM on another GSS network, and then copied to this primary GSSM.


Note Executing the script play-config command overwrites existing duplicate GSLB commands on the primary GSSM.


To play the GSLB configuration file named GSLB_CONFIG_1.txt, enter:

gssm1.example.com(config-gslb)# script play-config GSLB_CONFIG_1.TXT

If any errors are encountered with a command line, they are displayed and the file continues to play to completion. Any additional command line errors that are encountered are also displayed as follows:

gssm1.example.com(config-gslb)# script play-config GSLB_CONFIG_1.TXT
ERROR:Unable To Perform Source-Address-List Operation.Please Configure Owner Prior To 
Source-Address-List
ip address 192.168.10.1 255.255.255.0
% Invalid input detected at '^' marker.
ip address 192.168.10.6 255.255.255.255
^
% Invalid input detected at '^' marker.
gssm1.example.com(config-gslb)# 

In this example, the specified owner for the two listed IP addresses that are assigned to a source address list was not configured on the target GSS network. You can correct this problem in one of two ways:

Change the name of the owner in the GSLB configuration file to reflect a configured owner name, and then replay the file using the script play-config command.

If appropriate, add the owner name to the configuration using the owner command, and then replay the file using the script play-config command.

To view additional information for errors encountered during a play, use the show gslb-errors command in privileged EXEC mode.

For example, enter:

gssm1.example.com# show gslb-errors
GSLB-CLI-PLAY-CONFIG [Thu Dec 8 17:09:54 2005]:STARTING PLAY-CONFIG MESSAGE LOGGING
GSLB-CLI-PLAY-CONFIG [Thu Dec 8 17:09:57 2005]:ERROR: Could Not Perform 
Source-Address-List Operation.Object /source-address-list/owner:OWNER1 Not Configured.
GSLB-CLI-PLAY-CONFIG [Thu Dec 8 17:10:01 2005]:STOPPING PLAY-CONFIG MESSAGE LOGGING
 
gssm1.example.com# 

Where to Go Next

Chapter 13, Displaying Global Server Load-Balancing Configuration Information, describes the show gslb-config commands that allow you to display GSS resource, domain, keepalive, answer, dns rule, sticky, and proximity information.