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

Table of Contents

About the Nrcmd Program

About the Nrcmd Program

You can use either Network Registrar's graphical user interface (GUI), ntwkreg, or command line interface (CLI), nrcmd, to configure and manage your DNS and DHCP servers. This chapter describes how to use the nrcmd program and provides the following information:

Invoking the Nrcmd Program

You can use the nrcmd program in batch mode by executing scripts that use the commands, or by using the interactive mode in which you enter commands at the nrcmd program prompt. The nrcmd program is located in \Program Files\Network Registrar\bin on NT and in /opt/nwreg2/usrbin on Solaris.

The command syntax is as follows:

nrcmd general-options command specific-options

The general options are:

-C clustername 
-N username
-P password
 

These general options are not required. If you supply them, you must precede them with -C, -N, or -P. If you do not supply them, Network Registrar gets them from the registry (on NT), or environment variables (on Solaris and NT). If Network Registrar cannot find values for these parameters, it prompts you for them.

The NT registry and Solaris or NT environment variables are AIC_NAME for the name, AIC_PASSWORD for the password, and AIC_CLUSTER for the cluster name. The 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 that you can create, delete, or list. Each of these objects in turn has properties that you can set or get, and features that you can enable, disable, or test. These objects can also have methods that 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:

Using Commands

How you specify a series of arguments depends on the type of command you are using. The following sections describe the difference between 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 scope name create addr mask [prop=value], which 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
 

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.

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
 

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

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.

To enable incremental transfer processing for the DNS server, type:

nrcmd> dns enable ixfr-enable
 

Then 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. First enable the feature, and then on the next command line, set the associated properties.

Saving Your Changes

The CLI saves your changes to the database after one of the following events occurs:

Nrcmd Commands List

This section contains the complete list of nrcmd commands, grouped alphabetically. You can use them on the command line or insert them into scripts.


Table 2-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

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 program

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 program 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-selection-tag

Creates scope selection tags

server

Affects server behavior

session

Configures session parameters

zone

Specifies the DNS zones' properties


hometocprevnextglossaryfeedbacksearchhelp
Posted: Thu Jul 13 11:32:44 PDT 2000
Copyright 1989-2000©Cisco Systems Inc.