Applies To:
Show Versions3-DNS Controller versions 1.x - 4.x
- 3.0 PTF-02, 3.0 PTF-01, 3.0.0
9
Scripts
This chapter provides information about how each script that is shipped with the 3-DNS Controller works. If you plan on doing a scripted task manually, 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_admin_start
The 3dns_admin_start script corresponds to the Restart 3-DNS Web Administration command on the 3-DNS Maintenance menu. This command restarts the 3-DNS web server.
3dns_auth
The 3dns_auth script corresponds to the Generate RSA Authentication command on the 3-DNS Maintenance menu. All 3-DNS Controller scripts are easier to use when you generate password authentication. Any time you add a new 3-DNS Controller or BIG-IP Controller to a network, you can run the 3dns_auth script, and if no ssh key exists on the controller, the script will configure ssh access.
Note: This script is not available in the non-crypto version of the 3-DNS Controller.
3dns_dump
The 3dns_dump script saves the current state of the named cache to a new /var/3nds/etc/wideip.conf file.
3dns_sync_metrics
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
The 3dns_web_config script corresponds to the Reconfigure 3-DNS Web Administration command on the 3-DNS Maintenance menu. This script lets you make configuration changes to the 3-DNS web server.
3dns_web_passwd
The 3dns_web_passwd script corresponds to the Change/Add Users for 3-DNS Web Administration 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
The 3dnsmaint script opens the 3-DNS Maintenance menu.
3dprint
The 3dprint script corresponds to the Dump and List named Database 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 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, 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 named 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 named 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
The 3ndc script starts the 3ndc utility, which is described in the 3ndc man page. Note that ndc is an alias for 3ndc.
big3d_check
The big3d_check script corresponds to the Check big3d command on the 3-DNS Maintenance menu. This script checks that each BIG-IP Controller listed in the bigips.txt file is running the big3d agent.
big3d_install
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 and EDGE-FX Cache that the 3-DNS Controller knows about. This script is useful for 3-DNS Controller updates.
big3d_install performs the following procedure on each BIG-IP Controller or EDGE-FX Cache:
- Stops the running big3d agent process.
- Uses a matrix file to determine which version of the big3d agent to copy to the BIG-IP Controller or EDGE-FX Cache. The matrix file is a file that lists version numbers for all BIG-IP Controllers and EDGE-FX Caches known to the 3-DNS Controller and the version numbers of the big3d agent and named utility running on each BIG-IP Controller and EDGE-FX Cache.
- Adds the following to the end of the /etc/rc.conf file:
big3d_enabled="yes"
- Starts /usr/sbin/big3d.
For configuration options, see the big3d man page.
big3d_restart
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.
big3d_version
The big3d_version script corresponds to the Check versions of named, BIG-IP kernel and needed big3d command on the 3-DNS Maintenance menu. This script displays version numbers for all BIG-IP Controllers known to the 3-DNS Controller, as well as the version numbers of the big3d agent and named utility running on each BIG-IP Controller.
edit_lock
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:
edit_lock <file name>
edit_wideip
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 named.
install_key and F5makekey
The install_key script corresponds to the Generate and Copy F5 iQuery Encryption Key command on the 3-DNS Maintenance menu. This script starts the F5makekey script and generates a seed key for encrypting communications between the 3-DNS Controllers and (if you have any in your network) BIG-IP Controllers. The install_key script creates and distributes the iQuery key to all BIG-IP Controllers and other 3-DNS Controllers on your network.
Note: This script is not available in the non-crypto version of 3-DNS Controller.
To start the F5makekey script, type the following from /usr/contrib/bin:
f5makekey
The seed value is located in /etc/F5key.dat and contains a random length (12-52) of random content (1-255), created by F5makekey. 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
The syncd_checkpoint script corresponds to the Checkpoint synced files command on the 3-DNS Maintenance menu. This 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 as follows:
-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
The syncd_rollback script corresponds to the Rollback checkpoint command on the 3-DNS Maintenance menu. This script unrolls 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]
The options for syncd_rollback are defined as follows:
-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.
Note: When you run this script from the command line, you must use the
-r, -u, or -i option.
syncd_start
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]
The options for syncd_start are defined as follows:
-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.
Note: When you use the -c option, you must also use either the -r or -u option.
syncd_stop
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 as follows:
-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.