cc/td/doc/product/rtrmgmt/ciscoasu/nr/nr30t
hometocprevnextglossaryfeedbacksearchhelp
PDF

Table of Contents

About the Nrcmd Program

About the Nrcmd Program

You 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

You can use the nrcmd command in batch mode by executing scripts that use the commands, or by using the interactive mode in which you enter commands at the nrcmd command prompt.


Note The
nrcmd command is located in \Program Files\Network Registrar\bin on Windows NT and in /opt/nwreg2/usrbin on Solaris.

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, type:

nrcmd [-C cluster] [-N user] [-P password]
 

Typing this command displays the interactive prompt nrcmd> to which you type:

nrcmd>command  [optional parameters ]
 

To specify a series of items, use commas between the items. Do not add a space after the comma.

To terminate an interactive session, type exit.

To view the online help, type help.

Command Organization

The 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 Usage

How 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 Command

When 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, type:

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 Command

You 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 line---just 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, type:

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, type:

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, type:

nrcmd>client 1,6,02:02:02:02:02:02 set
client-class-name=internal
domain-name=QuickExample.com

Enable Command

You 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, type:

nrcmd>dns enable ixfr-enable
 

To change the incremental transfer expiration interval, type:

nrcmd>dns set ixfr-expire-interval=10d

Note You cannot add set commands to an enable command line. You need to first enable the feature, and then on the next command line, set the associated properties.

Saving Your Changes

The CLI waits for one of the following events before saving your changes to the database:

Nrcmd Commands

Table 1-1 lists the nrcmd commands, alphabetically. You can use these commands on the command line or insert them into scripts.
Table 1-1: Nrcmd Commands
Command Description

admin

Creates administrators and assigns them passwords

client

Creates clients and assigns them to client-classes

client-class

Creates client-classes

client-class policy

Sets embedded client-class policies

client-policy

Sets embedded client policies

custom-option

Creates a custom DHCP option

dhcp

Specifies the DHCP server's properties

dhcp-interface

Specifies the IP address of the DHCP server's hardware card

dns

Specifies the DNS server's properties

exit

Quits the nrcmd command

export

Writes the state of the lease or a zone to a file

extension

Integrates user-written DHCP extensions into the Network Registrar DHCP server

force-lock

Obtains an exclusive lock for the nrcmd command session

help

Provides online help

import

Loads configuration information from a file

ldap

Specifies the LDAP remote server's properties

lease

Specifies DHCP leases' properties

lease-notification

Notifies you when you run out of available leases in a scope

license

Views and updates license information

listaddr

Reports IP address utilization

policy

Specifies the policy information

remote-dns

Specifies information about remote DNS servers

report

Creates a summary of the dynamic and static IP address utilization for one or more clusters

save

Saves the current configuration changes

scope

Specifies the scopes' properties

scope-policy

Sets embedded scopes properties

scope-selection-tag

Creates scope selection tags

server

Affects server behavior

session

Configures session parameters

tftp

Specifies the TFTP server's properties

zone

Specifies the DNS zones' properties


hometocprevnextglossaryfeedbacksearchhelp
Posted: Thu Nov 18 13:30:44 PST 1999
Copyright 1989-1999©Cisco Systems Inc.