Applies To:

Show Versions Show Versions

Archived Manual Chapter: 3-DNS Reference Guide version 4.2: Scripts
Manual Chapter
Table of Contents   |   << Previous Chapter   |   Next Chapter >>

This article has been archived, and is no longer maintained.



11

Scripts



Working with scripts

3-DNS ships with several scripts to simplify many configuration and maintenance tasks. This chapter provides information about the functionality of these scripts. If you plan on performing a task from the command line that uses a script, you should find this section helpful. Many scripts correspond to commands on the 3-DNS Maintenance menu, so you may want to also review Chapter 2, 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 to an existing sync group in your network. The 3dns_add script copies all configuration information from an existing 3-DNS onto the new system. For more details on using this script, refer to the 3-DNS Administrator Guide, Chapter 5, Adding a 3-DNS to an Existing Network.

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_web_config script

The 3dns_web_config 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.

3dnsmaint script

The 3dnsmaint script opens the 3-DNS Maintenance menu. See Chapter 2, 3-DNS Maintenance Menu , for more information.

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 in your network; the statistics include such things as whether the system is enabled or disabled, the number of packets per second traveling in and out of the 3-DNS during the last sample period, and the name of the sync group to which each 3-DNS belongs.
  • BIG-IP
    Displays statistics about all BIG-IP systems known to the 3-DNS; the statistics include such things as the number of virtual servers each BIG-IP manages, and the number of times the 3-DNS resolves requests to those virtual servers.
  • Hosts
    Displays statistics about all hosts known to the 3-DNS; the statistics include such things as the number of times that the 3-DNS resolves requests to the host, and the number of virtual servers that the hosts manage.
  • Virtual Servers
    Displays statistics about all BIG-IP, EDGE-FX, 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 local DNS servers; the statistics include such things as the number of resolution requests received from a given LDNS, and the protocol that the 3-DNS is using to probe the LDNS.
  • Wide IPs
    Displays statistics about each wide IP defined on the 3-DNS; the statistics include such things as load balancing information, and the remaining 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 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, whether the big3d agent is running on each 3-DNS, the name and IP address of the 3-DNS, and whether the 3-DNS 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, EDGE-FX Cache, and GLOBAL-SITE that the 3-DNS knows about. This script is useful for 3-DNS updates.

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

  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, EDGE-FX Cache, or GLOBAL-SITE. The matrix file lists the version numbers for all BIG-IP systems, EDGE-FX Caches, and GLOBAL-SITE systems known to the 3-DNS, and the version numbers of the big3d agent running on each BIG-IP, EDGE-FX Cache, and GLOBAL-SITE.
  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, EDGE-FX Cache, and GLOBAL-SITE known to the 3-DNS.

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 systems, EDGE-FX Caches, and GLOBAL-SITE systems known to the 3-DNS, as well as the version numbers of the big3d agent running on those systems.

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 scripts and synchronization require secure communications between systems. Any time you add a new 3-DNS, BIG-IP, EDGE-FX Cache, or GLOBAL-SITE to a network, you can run the config_ssh script, and if no ssh key exists on the system, the script configures ssh access.

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

edit_lock script

The edit_lock script lets you safely edit a specified file that is synchronized between 3-DNS systems 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 systems 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 systems in the 3-DNS 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 systems and (if you have any in your network) BIG-IP systems, EDGE-FX Caches, or GLOBAL-SITE systems. The install_key script creates and distributes the iQuery key to all BIG-IP systems, EDGE-FX Caches, GLOBAL-SITE systems, and other 3-DNS systems in your network.

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

To start the F5makekey program, type the following at the command line, in the /usr/local/bin 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/tmp/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 11.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 11.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, 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 systems and overwrite the existing files on the remote 3-DNS systems.

-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 11.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, 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 systems.

-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 11.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.

Table of Contents   |   << Previous Chapter   |   Next Chapter >>

Was this resource helpful in solving your issue?




NOTE: Please do not provide personal information.



Incorrect answer. Please try again: Please enter the words to the right: Please enter the numbers you hear:

Additional Comments (optional)