Manual Chapter : 3-DNS Module for BIG-IP Reference guide, v4.0: Scripts

Applies To:

Show Versions Show Versions

3-DNS Controller versions 1.x - 4.x

  • 4.0 PTF-01, 4.0.0
Manual Chapter


9

Scripts



Working with scripts

The 3-DNS Controller is shipped with several scripts to simplify many configuration and maintenance tasks. This chapter provides information about the functionality of these scripts. If you plan on doing a scripted task from the command line, you should find this section helpful. Many scripts correspond to commands on the 3-DNS Maintenance menu.

Note: Before you edit a script, make a backup copy of the original.

3dns_add script

The 3dns_add script allows you to add a new 3-DNS Controller to an existing sync group in your network. The 3dns_add script copies all configuration information from an existing 3-DNS Controller onto the new controller. For more details on using this script, please refer to Chapter 5, Adding 3-DNS Controllers to the Network, in the 3-DNS Administrator Guide.

3dns_admin_start script

The 3dns_admin_start script corresponds to the Restart 3-DNS Configuration Utility command on the 3-DNS Maintenance menu. This command restarts the 3-DNS web server, which hosts the Configuration utility.

3dns_dump script

The 3dns_dump script saves the current state of the 3dnsd cache to a new /var/3dns/etc/wideip.conf file.

3dns_sync_metrics script

The 3dns_sync_metrics script corresponds to the Synchronize Metrics Data command on the 3-DNS Maintenance menu. You should use this script only when you are configuring a new 3-DNS Controller. This script prompts you to copy metrics data from a remote 3-DNS Controller to the local 3-DNS Controller.

3dns_web_config script

The config_httpd script corresponds to the Reconfigure 3-DNS Configuration Utility command on the 3-DNS Maintenance menu. This script lets you make configuration changes to the 3-DNS web server, which hosts the Configuration utility.

3dns_web_passwd script

The 3dns_web_passwd script corresponds to the Change/Add Users for 3-DNS Configuration Utility command on the 3-DNS Maintenance menu. This script secures the 3-DNS web server using basic authentication. This script lets you provide restricted or administrative access to the 3-DNS web server for selected users only, and assigns passwords for those users. Users with restricted access have access to the statistics area only. Users with administrative access have access to all areas of the 3-DNS web server.

Note: The 3dns_web_passwd script is run by the First-Time Boot utility. You can run this script again any time you need to provide access for another user.

3dnsmaint script

The 3dnsmaint script opens the 3-DNS Maintenance menu.

3dprint script

The 3dprint script corresponds to the Dump 3dnsd Statistics command on the 3-DNS Maintenance Menu. This script lets you view these statistics screens on the command line:

  • 3-DNS
    Displays statistics about each 3-DNS Controller in your network; the statistics include such things as whether the controller is enabled or disabled, the number of packets per second traveling in and out of the 3-DNS Controller during the last sample period, and the name of the sync group to which each 3-DNS Controller belongs.
  • BIG-IP
    Displays statistics about all BIG-IP Controllers known to the 3-DNS Controller; the statistics include such things as the number of virtual servers each BIG-IP Controller manages, and the number of times the 3-DNS Controller resolves requests to those virtual servers.
  • Hosts
    Displays statistics about all hosts known to the 3-DNS Controller; the statistics include such things as the number of times that the 3-DNS Controller resolves requests to the host, and the number of virtual servers that the hosts manage.
  • Virtual Servers
    Displays statistics about BIG-IP Controllers and host virtual servers; the statistics include such things as the server state, and the number of times it has received resolution requests.
  • Paths
    Displays path statistics, such as round trip time, packet completion rate, the remaining time to live (TTL) before a path's metric data needs to be refreshed.
  • Local DNS
    Displays statistics collected for LDNS servers; the statistics include such things as the number of resolution requests received from a given server, and the current protocol used to probe the server.
  • Wide IPs
    Displays statistics about each wide IP defined on the 3-DNS Controller; the statistics include such things as load balancing information, and the remaining time to live (TTL) before the wide IP's metrics data needs to be refreshed.
  • Globals
    Displays statistics about the globals sub-statements; the statistics include such things as the current and default values for each of the globals sub-statements, and whether you have to restart 3dnsd when you make changes to the parameters.
  • Summary
    Displays summary statistics, such as the 3-DNS Controller version, the total number of resolved requests, and the load balancing methods used to resolve requests.
  • Data Centers
    Displays statistics about the data centers, and their servers, in your network. The statistics include such things as the names of the data centers, the name or IP address of the servers in the data center, and whether the data center is enabled or disabled.
  • Sync Groups
    Displays statistics about each sync group in your network. The statistics include such things as the name of the sync group, whether 3dnsd is running on each 3-DNS Controller, whether the big3d agent is running on each 3-DNS Controller, the name and IP address of the 3-DNS Controller, and whether the 3-DNS Controller is a principal or receiver.

3ndc script

The 3ndc script starts the 3ndc utility, which is described in the 3ndc man page.

big3d_install script

The big3d_install script corresponds to the Install and Start big3d command on the 3-DNS Maintenance menu. This script installs and starts the appropriate version of the big3d agent on each BIG-IP Controller, EDGE-FX Cache, and GLOBAL-SITE Controller that the 3-DNS Controller knows about. This script is useful for 3-DNS Controller updates.

The big3d_install script performs the following procedure on each BIG-IP Controller, EDGE-FX Cache, of GLOBAL-SITE Controller:

  1. Stops the running big3d agent process.
  2. Uses a matrix file to determine which version of the big3d agent to copy to the BIG-IP Controller, EDGE-FX Cache, or GLOBAL-SITE Controller. The matrix file is a file that lists version numbers for all BIG-IP Controllers, EDGE-FX Caches, and GLOBAL-SITE Controllers known to the 3-DNS Controller and the version numbers of the big3d agent running on each BIG-IP Controller, EDGE-FX Cache, and GLOBAL-SITE Controller.
  3. Adds the following to the end of the /etc/rc.conf file:

    big3d_enabled="yes"

  4. Starts /usr/sbin/big3d.

    For configuration options, see the big3d man page.

big3d_restart script

The big3d_restart script corresponds to the Restart big3d command on the 3-DNS Maintenance menu. This script stops and restarts the big3d agent on each BIG-IP Controller, EDGE-FX Cache, and GLOBAL-SITE Controller known to the 3-DNS Controller.

big3d_version script

The big3d_version script corresponds to the Check remote versions of big3d command on the 3-DNS Maintenance menu. This script displays the version numbers for all BIG-IP Controllers, EDGE-FX Caches, and GLOBAL-SITE Controllers known to the 3-DNS Controller, as well as the version numbers of the big3d agent running on those devices.

config_ssh script

The config_ssh script corresponds to the Configure SSH communication with remote devices command on the 3-DNS Maintenance menu. All 3-DNS Controller scripts, and synchronization, require secure communications between controllers. Any time you add a new 3-DNS Controller, BIG-IP Controller, EDGE-FX Cache, or GLOBAL-SITE Controller to a network, you can run the config_ssh script, and if no ssh key exists on the controller, the script configures ssh access.

Note: This script is not available in the non-crypto version of the 3-DNS Controller.

edit_lock script

The edit_lock script lets you safely edit a specified file that is synchronized between 3-DNS Controllers in a sync group. This script creates a temporary version of the original file, and this temporary file replaces the original file when you are finished editing it. If you do not use this script to edit a file, there is the danger that a partial file might be synchronized to other 3-DNS Controllers in the sync group.

To use this script, type the following, at the command line:

edit_lock <file name>

edit_wideip script

The edit_wideip script corresponds to the Edit 3-DNS Configuration command on the 3-DNS Maintenance menu. This script opens the wideip.conf file for editing, copies it to all other 3-DNS Controllers in the local 3-DNS Controller's sync group, and restarts the 3dnsd utility.

install_key script

The install_key script corresponds to the Generate and Copy iQuery Encryption Key command on the 3-DNS Maintenance menu. This script starts the F5makekey program, and generates a seed key for encrypting communications between the 3-DNS Controllers and (if you have any in your network) BIG-IP Controllers, EDGE-FX Caches, or GLOBAL-SITE Controllers. The install_key script creates and distributes the iQuery key to all BIG-IP Controllers, EDGE-FX Caches, GLOBAL-SITE Controllers, and other 3-DNS Controllers in your network.

Note: This script is not available on the non-crypto version of 3-DNS Controller.

To start the F5makekey program, type the following at the command line, in the /usr/sbin directory:

f5makekey

The seed value is located in /etc/F5key.dat and contains a random length (12-52) of random content (1-255), created by the F5makekey program. This array of values is used by MD-160, a one-way hash function, to generate a key (7 characters in length) for the Blowfish encryption algorithm.

syncd_checkpoint script

The syncd_checkpoint script creates a checkpoint file. A checkpoint file is a compressed tar file that contains an archive of the files that are synchronized.

You can run this script with or without arguments. If you run syncd_checkpoint without specifying arguments, the script creates the following default checkpoint file:

/var/3dns/staging/checkpoint/default.tar.gz

Note: All checkpoint file names have a .tar.gz suffix.

The syncd_checkpoint script can take the following optional arguments:

syncd_checkpoint [-c <name>] [ -i]

The options for syncd_checkpoint are defined in Table 9.1 .

Optional arguments for the syncd_checkpoint script
Option Description
-c <name> Creates a checkpoint file with the specified file name. You can also specify a non-default path for the file, unless the path starts with a slash (/). The default path for checkpoint files is /var/3dns/staging/checkpoint/. The syncd_checkpoint script automatically appends a .tar.gz extension to the end of the file name.
-i Runs the script in an interactive session, which means that you are prompted for a file name.

syncd_rollback script

The syncd_rollback script decompresses a checkpoint file, which contains an archive of all synchronized files. This has the effect of replacing the current files with the files archived in the checkpoint file.

The syncd_rollback script can take the following optional arguments:

syncd_rollback [-c] [-c <name>] [-r] [-u] [ -i]

Note: When you run this script from the command line, you must use the
-r, -u, or -i option.

The options for syncd_rollback are defined in Table 9.2 .

Optional arguments for the syncd_rollback script
Option Description

-c

Unrolls the most recently created checkpoint file, whether it is in the default location or elsewhere.

-c <name>

Unrolls the specified checkpoint file, whether it is in the default location or elsewhere. It is not necessary to end the name with .tar.gz, as this suffix is assumed.

-r

Restores archived files with their old timestamps. This means that if any of the synchronized files were updated on a remote 3-DNS Controller, the updated files will overwrite any older files contained in the checkpoint file.

-u

Restores archived files with updated timestamps with the current time. This means that the files in the checkpoint are synchronized to the remote 3-DNS Controllers and overwrite the existing files on the remote 3-DNS Controllers.

-i

Runs the script in an interactive session, which means that you are prompted for option information.

syncd_start script

The syncd_start script corresponds to the Restart syncd command on the 3-DNS Maintenance menu. This script restarts the syncd daemon if it is already running, or starts it if it is not. You can run this script with or without arguments. If you run syncd_start without specifying arguments, the script starts or restarts syncd. The syncd_start script can take the following optional arguments:

syncd_start [-c] [-c <name>] [-r] [-u] [-i]

Note: When you use the -c option, you must also use either the -r or -u option.

The options for syncd_start are defined in Table 9.3 .

Optional arguments for the syncd_restart script
Option Description

-c

Before restarting syncd, unrolls the most recently created checkpoint file, whether it is in the default location or elsewhere.

-c <name>

Before restarting syncd, unrolls the specified checkpoint file, whether it is in the default location or elsewhere. It is not necessary to end the name with .tar.gz, as this suffix is assumed.

-r

Restores the archived files with their old timestamps. This means that if any of the synchronized files were updated on a remote 3-DNS Controller, the updated files overwrite the rolled back files.

-u

Restores the archived files with updated timestamps to the current time. This means that the files in the checkpoint file overwrite any updated files on remote 3-DNS Controllers.

-i

Runs the script in an interactive session, which means that you are prompted for option information.

syncd_stop script

The syncd_stop script corresponds to the Stop syncd command on the 3-DNS Maintenance menu. This script stops the syncd daemon if it is running. You can run this script with or without arguments. If you run syncd_stop without specifying arguments, the script simply stops syncd. The syncd_stop script can take the following optional arguments:

syncd_stop [-c] [-c <name>] [ -i]

The options for syncd_stop are defined In Table 9.4 .

Optional arguments for the syncd_stop script
Option Description

-c

Creates a checkpoint file in the default location before stopping syncd.

-c <name>

Creates a checkpoint file with the specified name and path before stopping syncd.

-i

Runs the script in an interactive session, which means that you are prompted for option information.