![]() |
Cisco CNS Network Registrar CLI Reference Guide, 5.0
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
About the Nrcmd Program
![]() |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Table of ContentsAbout the Nrcmd ProgramAbout the Nrcmd ProgramYou can use either Network Registrar's graphical user interface (GUI) or nrcmd command line interface (CLI) to configure and manage your DNS and DHCP servers. This chapter describes how to use the nrcmd command line interface. It specifically describes:
Invoking the Nrcmd Command
The command syntax is as follows: nrcmd <general options> <command> <specific options> The general options are:
These general options are not required. If you supply them, you must proceed them with -C, -N, or -P. If you do not supply them, Network Registrar gets them from the registry (on Windows NT), or environment variables (on Solaris and Windows NT). If Network Registrar cannot find values for these parameters, it prompts you for them. The Windows NT registry and Solaris or Windows NT environment variables are AIC_NAME for the name, AIC_PASSWORD for the password, and AIC_CLUSTER for the cluster name. The Windows NT registry path is Software\American Internet\Registrar\2.0 and the registry hive is HKEY_CURRENT_USER. To execute the command line interface in interactive mode, enter: nrcmd [-C cluster] [-N user] [-P password] Typing this command displays the interactive prompt nrcmd> to which you enter: nrcmd>command [optional parameters ] To specify a series of items, use commas between the items. Do not add a space after the comma. For example: nrcmd>zone example.com. set dynupdate-set=192.168.1.1,127.0.0.1 To terminate an interactive session, enter the exit command. To view the online help, enter the help command. Command OrganizationThe nrcmd commands specify a class of object which you can create, delete, or list. Each of these objects in turn has properties which you can set or get, and features which you can enable, disable, or test. These objects may also have methods, which are specific to the type of object, and that let you perform operations on groups of properties. When you use the nrcmd commands to configure Network Registrar, you manipulate the following:
Command UsageHow you specify a series of arguments depends on the type of command you are using. The following shows the differences when using the create, set, and enable commands. Create CommandWhen you use the create command and there are required arguments, you must supply them. You can also supply additional arguments. You must supply the required arguments in the specified order; however, you can specify the optional arguments in any order with the syntax prop=value. For example, the syntax for creating a scope is as follows: scope name create addr mask [prop=value] This means that you must supply an IP address and mask when you create a scope, and you can optionally specify other properties of the scope. The following example creates the scope testScope with the IP address of 128.103.1.1 and a mask of 255.255.255.0: nrcmd>scope testScope create 128.103.1.1 255.255.255.0 For example, if you want to create a scope and also specify the name of the DNS zone to which a DHCP client's host name should be added, enter: nrcmd>scope testScope create 128.103.1.1 255.255.255.0 dns-zone-name=QuickExample.com After the create command creates and assigns all specified parameters to the object, it checks that all the required properties have values (either defaults or user-specified). If you neglect to supply the required arguments, Network Registrar reports an error. Set CommandYou use the set command to set the value of a property. If you want to set a list of things, such as DNS servers, or IP addresses, you can separate them with commas. You can also use the set command to set several properties on a single linejust specify the property and its value followed by a space and the next property and value pair. For example, to specify the name of the DNS zone to which a DHCP client's host name should be added, enter: nrcmd>scope testScope set dns-zone-name=QuickExample.com For example, to specify the list of IP addresses that you will allow to perform zone transfers, enter: nrcmd>zone QuickExample.com set auth-servers=196.68.1.10,196.68.1.20 For example, to set the client's client-class and domain-name, enter: nrcmd>client 1,6,02:02:02:02:02:02 set client-class-name=internal domain-name=QuickExample.com Additionally, you can set a feature to its enabled state (set feature=enabled). The unset command places a property or feature in the undefined state. Enable CommandYou use the enable command to enable a feature. After you enable a feature you often need to set its associated properties. For example, to enable incremental transfer processing for the DNS server, enter: nrcmd>dns enable ixfr-enable To change the incremental transfer expiration interval, enter: nrcmd>dns set ixfr-expire-interval=10d
Saving Your ChangesThe CLI waits for one of the following events to occur before it saves your changes to the database:
Command Line Navigation KeysTable 1-1 lists keyboard navigation key combinations that are useful when entering nrcmd commands. Table 1-1: Nrcmd Navigation Key Combinations
Nrcmd CommandsTable 1-2 lists the nrcmd commands, alphabetically. You can use these commands on the command line or insert them into scripts. Table 1-2: Nrcmd Commands
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|