Cisco CNS Network Registrar CLI Reference Guide, 5.0
Using the Nrcmd Commands

Table of Contents

Using the Nrcmd Commands

Admin
Client
Client-Class
Client-Class-Policy
Client-Policy
Custom-Option
Dhcp
Dhcp-interface
Dns
Exit
Export
Extension
Force-Lock
Help
Import
Ldap
Lease
Lease-notification
License
Option-datatype
Policy
Remote-dns
Report
Save
Scope
Scope-Policy
Scope-selection-tag
Server
Session
Tftp
Trap
Vendor-option
Zone

Using the Nrcmd Commands

The Network Registrar nrcmd program is a command-line based configuration tool. It allows you to set all Network Registrar configurable options as well as to start and stop the servers.

This chapter contains an alphabetic listing of all the commands and their properties.

Admin

The admin command allows you to configure administrators for the cluster. You can choose any string for the name. Network Registrar uses the password to authenticate the name. If you create an administrator without a password, Network Registrar cannot authenticate the name, and thus will deny that user access to the cluster.

Because the password is sensitive information, Network Registrar prints its value as'********'.

The syntax is:

admin name create [prop=value]

admin name delete

admin name show

admin list

admin listnames

Examples

To create the administrator bob with the password xyz, enter:

nrcmd> adminbob create password=xyz

 

To delete the administrator bob, enter:

nrcmd> adminbob delete

Admin Properties

Use the set, get, and show commands to assign and retrieve values from the admin's properties.

The syntax is:

admin name set prop=value

admin name unset prop

admin name get prop

admin name enterPassword [password]

To enter a password and not have Network Registrar display the password on your screen, create an administrator and do not supply a password. Then use the enterPassword command to enter a password and prevent Network Registrar from echoing it on the screen. Network Registrar prompts you to verify the password before it accepts it.

Client

The client and client-class commands let you create and manipulate clients and groups of clients for the purpose of determining what type of IP address and/or policy to assign to requesting hosts.

Using the client command you can assign properties to a specific client entry, based on the client's MAC address or the literal string default, which matches any client that does not have a specific client configuration. The properties you can assign include such things as a class of client, a policy, an action, and the inclusion or exclusion of scope selection tags. The DHCP server looks up these properties to determine how it should process the host's request for an IP address.

You can configure common client properties, such as selection criteria, in one client-class configuration, and can have multiple client configurations use it.

The DHCP server reads the client configuration information each time it receives a request for an IP address, so you do not have to reload the server after modifying these client configurations. If you modify the default client configuration however, you must reload the server for the change to take effect.

The way that you specify the client is to use the MAC address in the format of hardware-type,hardware-length,hardware address or the word default. Note that the commas are required.

A sample Ethernet MAC address might be 1,6,06:44:40:26:f5:0f.

  • Hardware type—usually either 1 or 6 (1 indicates Ethernet and 6 token ring), but it could be any number between 1 and 255.

  • Hardware length—a number between 1 and 16 that represents the length of the MAC address in octets.

  • Hardware address—a number of two-character hex values: one for each octet of the hardware address. Note that although case is not significant, each octet must have exactly two characters and be separated by colons.


Note   Network Registrar stores the client name in lowercase regardless of the case you use to specify the client.

The syntax is:

client macaddress create [prop=value]

client macaddress delete

client macaddress show

client list

client listnames

Examples

To create a client that is a member of the external client-class, enter:

nrcmd> client 1,6,02:02:02:02:02:02 create client-class-name=external

 

To delete client 1,6,02:02:02:02:02:02:, enter:

nrcmd> client 1,6,02:02:02:02:02:02 delete

 

To list all the clients, enter:

nrcmd> client list

Client Properties

The property list contains the name and values in the following format: prop=value{,value}.

For the host-name and domain-name strings to have any effect, you must have enabled dynamic DNS update in the scope from which the IP address was allocated.

Use the set and get commands to set and display their values.

The syntax is:

client macaddress set prop=value

client macaddress unset prop

client macaddress get prop

Table 2-1 lists the client command properties.


Table 2-1: Client Command Properties
Property Description

action

The action to take for this client. You can specify either exclude, ignore, or one-shot. Optional. There is no default. For more information about these actions, see the "Action Strings" section.

authenticate-until

Specifies whether to limit the authentication time to the duration you have specified. For more information about how to specify the time, see the "Authenticate-Until" section.

client-class-name

The client-class to which the client belongs. Note that the client-class-name property may only appear in the client entry. It is an error to specify a client-class-name property in a client-class object. If the client is not a member of a client-class, then the DHCP server uses the default client-class properties. Optional. There is no default.

domain-name

The domain name to use when performing DNS updates. Places the client's A record in this DNS domain. Optional. There is no default.

host-name

The host name. Use this string to replace any host-name DHCP option sent by the DHCP client. Optional. There is no default. For more information about host names, see the "Host Name Strings" section.

policy-name

The policy to add to the Network Registrar DHCP policy search list for this client. Optional. There is no default.

selection-criteria

The scope selection tags to build the scope inclusion list. Optional. There is no default.

selection-criteria-excluded

The scope selection tags to build the scope exclusion list. Optional. There is no default.

unauthenticated-client-class-
name

The name of the client-class to use if this client is no longer authenticated. Optional. There is no default.

user-defined

A user-defined string that can be set and queried. For example, a cross-reference in a separate authorization database. This property has no effect on the operation of the DHCP server. Optional. There is no default.



Action Strings

The action string is made up of one or more comma-delimited tokens. Valid tokens are the following:

One-Shot Action

Use the one-shot action to allocate provisional addresses, which are useful when you want an unknown client to have an address for only a short period of time.

To use the one-shot action in this way, configure it as the action for the default client (or in the client-class specified by the default client). This configuration causes the server to give a lease to an unknown client, but when the lease expires, the server will not respond to that client for the duration of the grace period. After the grace period expires, the server will not respond to that client until the now available lease is re-allocated to another client. This final period may be short or long, depending on the number of leases in the scope, and the number of clients using them. Newly available leases go on the end of a queue, and are allocated from the beginning of a queue, so that it might be quite some time before this lease is re-allocated to another client.

It is possible to allow the client a relatively short lease time, such as one day, and then specify a long grace period, such as two weeks. In this manner, you can offer an incentive to the client to register with some authority and become a known client, while preventing the lease from being reallocated to another client.

After the lease expires, the client is unable to get another address for the extent of the two-week grace period. Note that you can configure the lease and grace period differently for each scope, so that the non-provisional leases can have different lease and grace periods.

After the lease is reallocated to another client, all record of the first client's use is lost, and the first client could get another lease as an unknown client and have another opportunity to register.

Using provisional addresses would be less restrictive if you use multiple DHCP servers, because each one operates its one-shot capabilities independently. Thus, with the above approach and two DHCP servers, an unregistered client could get two days of provisional address use every two weeks.

Authenticate-Until

The authenticate-until property provides a mechanism for limiting the authentication of a client entry. By default, client entries are authenticated forever, but by using the authenticate-until property it is possible to specify an expiration time for the authentication.

When the authentication for a client entry is no longer authenticated, the DHCP server uses the value of the unauthenticated-client-class property for the name of the client-class entry to use in answering this DHCP request. If the unauthenticated-client-class property is not set or if there is no client-class entry in the unauthenticated-client-class property, the DHCP server ignores the DHCP request; that is, the server will not provide the client an IP address.

The following are valid authentication values:

  • +num unit—Expire the authentication num unit of time in the future. The num is a decimal number, and unit is one of s, m, h, d, w, in which s is seconds, m is minutes, h is hours, d is days and w is weeks. For example +3w for three weeks.

  • date—Specify the date as month, day, hour (24 hour) year (4 or last 2 digits). For example, Jun 30 20:00:00 1998.

If you specify 98 or 99, Network Registrar assumes 1998 or 1999. If you specify a lower number, such as 05 or 10, Network Registrar assumes 2005 or 2010.
  • forever—Do not expire the authentication for this client.


Note   Wherever you specify a date using the nrcmd command, you should enter the time that is local to the nrcmd process. This means that if the server is running in another time zone than your nrcmd process, you should disregard the time zone where the server is running and use local time instead.

Host Name Strings

The value you specify in the host-name property can be one of two general forms.

The first form is a string that does not start with a "@." This form of host-name value is used to override the DHCP client-request host name. When you enter a valid name, you cause the DHCP server to ignore any host name specified by this client, and instead use this client-entry property. The actual value of the host-name option in the client's DHCP packet is ignored.

  • hostname—Causes the server to use this host name to override the DHCP client request host name. This name can be any valid DNS name. Note you cannot use underscores.

The second form is a string that starts with the special token "@." Network Registrar uses this form of host-name value to signal the following special handling.

  • @host-name-option—Causes the server to use whatever host-name option the client sent. This is the default behavior if there is no entry for host-name in either the client or client-class.

  • @no-host-name-option—Causes the server to drop the host-name option that the client sent, and not replace it. If you have disabled DNS name synthesis, then the client will have no name placed into DNS.

  • @use-macaddress—Causes the server to synthesize a host name for the client that is derived from its MAC address, and is thus unique. This token is used to ensure that a client has a valid, unique, and predictable name in DNS.

Client-Class

The client-class command allows you to apply a set of properties to a group or class of clients.

Client-Class Creation and Deletion

The syntax is:

client-class name create [prop=value]

client-class name delete

client-class name show

client-class list

client-class listnames

Examples

To create the client-class internal, enter:

nrcmd> client-class internal create

 

To delete the client-class internal, enter:

nrcmd> client-class internal delete

 

To list all the client-classes, enter:

nrcmd> client-class list


Note   Client-class names are case sensitive. When referencing a client-class, you need to enter the name just as it was created.

Client-Class Properties

The client-class command allows you to configure and display common properties for DHCP client configurations using the set, unset, get and show commands.


Note   You can use the same properties as the client command, except for the following two properties: client-class-name and unauthenticated-client-class-name. These two properties provide names of client-class configurations that the DHCP server can use to initialize property values for a specific client configuration.

Unlike most client configurations, the DHCP server reads the client-class configurations at server start-up time, and thus you must reload the server for changes to take affect.

The syntax is:

client-class name set prop=value [prop=value]

client-class name unset prop

client-class name get prop

For descriptions of the properties, see the "Client Properties" section.

Client and Client-Class Hierarchy

The server processes client and client-class property values in the following way:

  • Network Registrar looks for the scope selection tag in the client-entry. If the tag appears in the client-entry, then Network Registrar uses it. If the tag is blank, then Network Registrar looks for the tag in the client-class. If the tag is specified as none in the client, Network Registrar does not look in the client-class.

  • The policy property is processed a bit differently. If you specify a policy in the client, it is placed first on the search list of policies. A policy specified in the client-class is placed next. The policy specified in the scope is placed next, and the system-default policy is placed last. When looking for information from a policy (frequently a DHCP option) to return to a DHCP client, the policies in the list are searched in order. Network Registrar uses the first information it finds.


Note   If you delete the dhcp-lease-time option from client or client-class policies, Network Registrar uses the system-default policy whose dhcp-lease-time option cannot be deleted.

Client-Class-Policy

The client-class-policy command allows you to configure DHCP embedded policies for client classes. A client-class-policy is a policy object embedded within (and limited to) a client-class object. Each client-class may contain option data within its embedded policy, and may refer to a named policy with more option data, such as a router IP address.

Embedded client-class-policies are implicitly created and deleted when you create or delete the corresponding client-classes. You manipulate the client-class-policy using the name of the client-class to which the embedded policy is attached.

Client-Class-Policy Features

You can enable, disable, unset, and show client-class-policy features. The syntax is:

client-class-policy client-class-name enable feature

client-class-policy client-class-name disable feature

client-class-policy client-class-name unset feature

client-class-policy client-class-name delete

client-class-policy client-class-name show

The delete command re-initializes all properties and features of the client class policy.

Table 2-2 lists and describes the client-class-policy command features. For more information about lease time, see "Lease Times" section.


Table 2-2: Client-Class Policy Command Features
Feature Description

allow-lease-time-override

Optional. The default is enabled. Clients may request a specific lease time. The server does not honor those requested lease times if this attribute is false. The server does not honor a client's lease time if the time is longer than the server's normal lease time.

allow-dual-zone-dns-update

Causes the DHCP server to return the client FQDN option so that the client can perform an A record update itself. In addition, the server performs an A record update on the client's behalf. This is required to support certain DHCP deployments that represent their clients in two DNS zones. If both the allow-client-a-record-update feature and the allow-dual-dns-update feature are enabled, the allow-dual-dns-update feature takes precedence.

permanent-leases

Optional. The default is disabled. Specifies that leases for this client-class policy should be permanently granted to requesting clients.

split-lease-times

Optional. The default is disabled. Controls whether the server uses the value of the server-lease-time property to determine the length of a lease, rather than using the lease time returned to the client.



Client-Class-Policy Properties

Use the set and get commands to assign and retrieve values from the client-class-policy command properties.

The syntax is:

client-class-policy client-class-name get prop

client-class-policy client-class-name set prop=value

client-class-policy client-class-name unset prop

Table 2-3 lists and describes the client-class-policy properties.


Table 2-3: Client-Class-Policy Command Properties
Property Description

bootp-reply-options

Optional. There is no default. A list of the names of options that should be returned in any replies to BOOTP clients. The options themselves do not have to have been configured in the same client-class-policy as the reply-options list. The server searches the hierarchy of policies for each option named in the list. For more information about this property, see the "Client-Class-Policy Reply Options" section.

boot-file

Optional. There is no default. Supplies the name of the executable file from which to boot or obtain configuration data. This property can also contain the following variable substitution values:

  • %@docsis-vers%. If you specify the %@docsis-vers% value, it is substituted with the DOCSIS version presented in the DHCP request packet's vendor-class-identifier option. This version can be either "docsis1.0" or "docsis1.1". If the vendor-class-id option is missing or does not contain a DOCSIS version string, the server substitutes the docsis-version-id-missing string. For more information about this string, see Table 2-13.

  • %@mac-addr%. If you specify the %@mac-addr% value, %@mac-addr% is substituted with the source MAC address, presented in the DHCP request packet.

dhcp-reply-options

Optional. There is no default. A list of the names of options that should be returned in any replies to DHCP clients. The options themselves do not have to have been configured in the same policy as the reply-options list. The server searches the hierarchy of policies for each option named in the list. For more information about this property, see the "Client-Class-Policy Reply Options" section.

grace-period

The length of time between the expiration of a lease and the time it is made available for re-assignment. Optional. The default is 5 minutes.

offer-timeout

If the server offers a lease to a client, but the offer is not accepted, the server waits the specified number of minutes before making the lease available again.Optional. The default is 2 minutes.

packet-file-name

Optional. There is no default. The name of a boot file to be used in a client's boot process. The server returns this file name in the file field of its replies. The value of packet-file-name cannot be longer than 128 characters.

This property can also contain the following variable substitution values:

  • %@docsis-vers%. If you specify the %@docsis-vers% value, it is substituted with the DOCSIS version presented in the DHCP request packet's vendor-class-identifier option. This version can be either "docsis1.0" or "docsis1.1". If the vendor-class-id option is missing or does not contain a DOCSIS version string, the server substitutes the docsis-version-id-missing string. For more information about this string, see Table 2-13.

  • %@mac-addr%. If you specify the %@mac-addr% value, %@mac-addr% is substituted with the source MAC address, presented in the DHCP request packet.

packet-server-name

Optional. There is no default. The host name of a server to use in a client's boot process. The server returns this file name in the sname field of its replies. The packet-server-name field cannot be longer than 64 characters.

packet-siaddr

Optional. There is no default. The IP address of the next server in a client's boot process. For example, this might be the address of a TFTP server used by BOOTP clients. The server returns this address in the siaddr field of its reply.

server-lease-time

Optional. There is no default. The time that the server believes the lease is valid. It may be useful to have the server consider leases leased for a longer period than the client in order to get more frequent client communication along with the stability of long lease times.

vendor-class-identifier

Optional. There is no default. This property is used by clients and servers to exchange vendor-specific information. The information is an opaque object of n octets, presumably interpreted by vendor-specific code on the clients and servers. The vendor is indicated in the vendor-class-identifier option.



Example

To set the grace period to three days for client-class-policy 168.1-net, enter:

nrcmd> client-class-policy 168.1-net set grace-period=3d

Client-Class-Policy Reply Options

When the server is getting ready to return option data to a client, it examines up to seven policies: the client's embedded policy, the client's policy, the client's client-class's embedded policy, the client's client-class's policy, the client's lease's scope's embedded policy, the client's lease's scope's policy, and the system default policy, in that order. The server looks through these policies for option data that the client has asked for.

Then the server looks through the policies for a reply-options list. It looks for bootp- or dhcp-reply-options depending on the client. The server uses the first list it finds. For each option in the list, the server looks through all of the policies, in order, and returns the data from the first policy that has a matching option. There is no requirement that the data that the server returns must come from the same policy that the reply-options list came from. If the server finds a reply-options list, it looks for each option in the list individually, and searches all of the related policies if necessary.

There is also no requirement that the options mentioned in a reply-options list be present in the client-class-policy that contains the list. The nrcmd program allows you to enter a string, and that string can name any option. The Network Registrar GUI, however, presents a special dialog box for adding a reply-options property to a client-class-policy that restricts you to the options already configured in the client-class-policy. This is a GUI-only restriction; the server does not impose this restriction.

Client-Class-Policy Option Method Commands

You can set individual option values with the setOption command, unset option values with the unsetOption command, and view option values with the getOption and listOptions commands. When you set an option value, the DHCP server replaces any existing value or creates a new one, as needed, for the given option name.


Note   For a list of all the DHCP options that you can configure, enter the nrcmd program help dhcp-option command or refer to Appendix D "DHCP Extension Dictionary Entries."

The syntax is:

client-class-policy client-class-name listOptions

client-class-policy client-class-name setOption option-name value

client-class-policy client-class-name getOption option-name

client-class-policy client-class-name unsetOption option-name

client-class-policy client-class-name setVendorOption vendor-option-name suboption-namesuboption-index field-name value

client-class-policy client-class-name unsetVendorOption vendor-option-name suboption-namesuboption-index field-name

Table 2-4 lists and describes the client-class-policy command options.


Table 2-4: Client-Class-Policy Option Methods
Property Description

listOptions

Lists the options in the named client-class-policy.

setOption

Sets the option name and value to the specified client-class-policy. The format is optname value. For example, dhcp-lease-time 3600.

getOption

Gets the value of the named option.

unsetOption

Removes the named option from the specified client-class-policy.

setVendorOption

Associates a vendor-supplied DHCP option with the specified policy and assigns a value to a specified suboption field. A suboption within a vendor-supplied DHCP option could be an array. Therefore, the suboption-index property is necessary, even though in most cases it will be set to 0. Similarly, a field in a suboption could have an array of data items. The values for such array items in a field should be specified in comma separated format. For more information about vendor options and suboptions, refer to the "Vendor-option" section.

unsetVendorOption

Deletes the association between a vendor-supplied DHCP option and the specified policy.



Table 2-5 describes the properties of the client-class-policy option method commands.


Table 2-5: Client-Class-Policy Option Method Properties
Property Description

option-name

Name of the standard DHCP option.

vendor-option-name

Name of the vendor-supplied DHCP option. This must have been created using the option-datatype and vendor-option commands.

suboption-name

Name of the suboption of the vendor-supplied DHCP option that is to be set or unset to the policy.

suboption-index

If the suboption is an array, then this is the index into the array. Otherwise, this defaults to 0. Note that there is no space between suboption-name and suboption-index.

field-name

Name of the field in the suboption that is to be set or unset. If the field is being set and contains an array of items, then the items must be specified in comma-separated format.



Examples

To specify the lease time in a client-class-policy, enter:

nrcmd> client-class-policy 168.1-net setOption dhcp-lease-time 608400

 

To list the options in a client-class-policy, enter:

nrcmd> client-class-policy 168.1-net listOptions

Client-Class-Policy Lease Time Method Commands

The setLeaseTime command allows you to set the values of lease times and the getLeaseTime command to display the value of a lease time.

The syntax is:

client-class-policy client-class-name setLeaseTime value

client-class-policy client-class-name getLeaseTime

The lease time is the value of the dhcp-lease-time DHCP option. You should specify the time in seconds.

Lease Times

A client-class-policy contains two lease times: the client lease time and the server lease time.

  • You set the client-class-policy lease time through the setLeaseTime method. This lease time determines how long the client-class-policy believes its lease is valid.

  • You set the server lease time through the server-lease-time property. This lease time determines how long the server considers the lease valid. Note that the server lease time is independent of the lease's grace period; that is, the server will not allocate the lease to another client until after the server's lease period has expired and the grace period has expired.

You might want to establish these two different lease times if you want to retain information about clients' DNS names and yet have them renew their leases frequently. When you use a single lease time and it expires, the server no longer keeps that client's DNS name. If, however, you use a short client lease time and a longer server lease time, the client information is retained even after the client's lease has expired.


Caution Although Network Registrar supports the use of two lease times for special situations, it is generally recommended that you not use the server-lease-time property.

Client-Policy

The client-policy command allows you to configure DHCP embedded policies for clients. A client-policy is a policy object embedded within (and limited to) a client object. Each client may contain option data within its embedded policy, and may refer to a named policy with more option data, such as a router IP address.

Embedded client-policies are implicitly created and deleted when you create or delete the corresponding client. You manipulate the client-policy using the name (which, in this case, is the MAC address) of the client to which the embedded policy is attached.

Client-Policy Features

You can enable, disable, unset, and show the client-policy features. The syntax is:

client-policy client-name enable feature

client-policy client-name disable feature

client-policy client-name unset feature

client-policy client-name delete

client-policy client-name show

The value of client-name must be either the MAC address of a client that has already been defined or else the literal string "default."

The delete command re-initializes all features and properties of the client policy.

Table 2-6 lists and describes the client-policy command features. For more information about lease time, see "Lease Times" section.


Table 2-6: Client-Policy Command Features
Feature Description

allow-lease-time-override

Clients may request a specific lease time. Optional. The default is enabled. The server does not honor those requested lease times if this attribute is false. The server does not honor a client's lease time if the time is longer than the server's normal lease time.

allow-dual-zone-dns-update

Causes the DHCP server to return the client FQDN option so that the client can perform an A record update itself. In addition, the server performs an A record update on the client's behalf. This is required to support certain DHCP deployments that represent their clients in two DNS zones. If both the allow-client-a-record-update feature and the allow-dual-dns-update feature are enabled, the allow-dual-dns-update feature takes precedence.

permanent-leases

Specifies that leases for this client-policy should be permanently granted to requesting clients. Optional. The default is disabled.

split-lease-times

Controls whether the server uses the value of the server-lease-time property to determine the length of a lease, rather than using the lease time returned to the client. Optional. The default is disabled.



Client-Policy Properties

Use the set and get commands to assign and retrieve values from the client-policy's properties.

The syntax is:

client-policy client-name get prop

client-policy client-name set prop=value

client-policy client-name unset prop

Table 2-7 lists and describes the client-policy command properties.


Table 2-7: Client-Policy Command Properties
Property Description

bootp-reply-options

Optional. There is no default. A list of the names of options that should be returned in any replies to BOOTP clients. The options themselves do not have to have been configured in the same client-policy as the reply-options list. The server searches the hierarchy of client-policies for each option named in the list. For more information about this property, see the "Client-Policy Reply Options" section.

boot-file

Optional. There is no default. Supplies the name of the executable file from which to boot or obtain configuration data. This property can also contain the following variable substitution values:

  • %@docsis-vers%. If you specify the %@docsis-vers% value, it is substituted with the DOCSIS version presented in the DHCP request packet's vendor-class-identifier option. This version can be either "docsis1.0" or "docsis1.1". If the vendor-class-id option is missing or does not contain a DOCSIS version string, the server substitutes the docsis-version-id-missing string. For more information about this string, see Table 2-13.

  • %@mac-addr%. If you specify the %@mac-addr% value, %@mac-addr% is substituted with the source MAC address, presented in the DHCP request packet.

dhcp-reply-options

Optional. There is no default. A list of the names of options that should be returned in any replies to DHCP clients. The options themselves do not have to have been configured in the same client-policy as the reply-options list; the server searches the hierarchy of client-policies for each option named in the list. For more information about this property, see the "Client-Policy Reply Options" section.

grace-period

The length of time between the expiration of a lease and the time it is made available for re-assignment. Optional. The default is 5 minutes.

offer-timeout

If the server offers a lease to a client and the offer is not accepted, the server waits the specified number of minutes before making the lease available again. Optional. The default is 2 minutes.

packet-file-name

Optional. There is no default. The name of a boot file to be used in a client's boot process. The server returns this file name in the file field of its replies. The packet-file-name cannot be longer than
128 characters.

This property can also contain the following variable substitution values:

  • %@docsis-vers%. If you specify the %@docsis-vers% value, it is substituted with the DOCSIS version presented in the DHCP request packet's vendor-class-identifier option. This version can be either "docsis1.0" or "docsis1.1". If the vendor-class-id option is missing or does not contain a DOCSIS version string, the server substitutes the docsis-version-id-missing string. For more information about this string, see Table 2-13.

  • %@mac-addr%. If you specify the %@mac-addr% value, %@mac-addr% is substituted with the source MAC address, presented in the DHCP request packet.

packet-server-name

Optional. There is no default. The host name of a server to use in a client's boot process. The server returns this file name in the sname field of its replies. The packet-server-name field cannot be longer than
64 characters.

packet-siaddr

Optional. There is no default. The IP address of the next server in a client's boot process. For example, this might be the address of a TFTP server used by BOOTP clients. The server returns this address in the siaddr field of its reply.

server-lease-time

Optional. There is no default. The time that the server believes the lease is valid. It may be useful to have the server consider leases leased for a longer period than the client to get more frequent client communication and the stability of long lease times.

vendor-class-identifier

Optional. There is no default. This property is used by clients and servers to exchange vendor-specific information. The information is an opaque object of n octets, presumably interpreted by vendor-specific code on the clients and servers.The vendor is indicated in the vendor-class-identifier option.



Example

To set the grace period to three days for client-policy 1,6,02:02:02:02:02:02, enter:

nrcmd> client-policy 1,6,02:02:02:02:02:02 set grace-period=3d

Client-Policy Reply Options

When the server is getting ready to return option data to a client, it examines up to seven policies: the client's embedded policy, the client's policy, the client's client-class's embedded policy, the client's client-class's policy, the client's lease's scope's embedded policy, the client's lease's scope's policy, and the system default policy, in that order.

Then the server looks through the policies for a reply-options list. It looks for bootp- or dhcp-reply-options depending on the client. The server uses the first list it finds. For each option in the list, the server looks through all of the policies, in order, and returns the data from the first policy that has a matching option. There is no requirement that the data that the server returns must come from the same policy that the reply-options list came from. If the server finds a reply-options list, it looks for each option in the list individually, and searches all of the related policies if necessary.

There is also no requirement that the options mentioned in a reply-options list be present in the client-policy that contains the list. The nrcmd program allows you to type in a string and that string can name any option. The Network Registrar GUI, however, presents a special dialog box for adding a reply-options property to a client-policy. This dialog box restricts you to the options already configured in the client-policy. This is a GUI-only restriction; the server does not impose this restriction.

Client-Policy Option Method Commands

You can set individual option values with the setOption command, unset option values with the unsetOption command, and view option values with the getOption and listOptions commands. When you set an option value the DHCP server replaces any existing value or creates a new one, as needed, for the given option name.


Note   For a list of all the DHCP options that you can configure, type the nrcmd program help dhcp-option command.

The syntax is:

client-policy client-name listOptions

client-policy client-name setOption option-name value

client-policy client-name getOption option-name

client-policy client-name unsetOption option-name

client-policy client-name setVendorOption vendor-option-name suboption-namesuboption-index field-name value

client-policy client-name unsetVendorOption vendor-option-name suboption-namesuboption-index field-name

Table 2-8 lists and describes the client-policy command option methods.


Table 2-8: Client-Policy Option Methods
Property Description

listOptions

Lists the options in the named client-policy.

setOption

Sets the option name and value to the specified client-policy. The format is optname value. For example, dhcp-lease-time 3600.

getOption

Gets the value of the named option.

unsetOption

Removes the named option from the specified client-policy.

setVendorOption

Associates a vendor-supplied DHCP option with the specified policy and assigns a value to a specified suboption field. A suboption within a vendor-supplied DHCP option could be an array. Therefore, the suboption-index property is necessary, even though in most cases it will be set to 0. Similarly, a field in a suboption could have an array of data items. The values for such array items in a field should be specified in comma separated format. For more information about vendor options and suboptions, refer to the "Vendor-option" section.

unsetVendorOption

Deletes the association between a vendor-supplied DHCP option and the specified policy.



Table 2-9 describes the properties of the client-policy option method properties.


Table 2-9: Client-Policy Option Method Properties
Property Description

option-name

Name of the standard DHCP option.

vendor-option-name

Name of the vendor-supplied DHCP option. This must have been created using the option-datatype and vendor-option commands.

suboption-name

Name of the suboption of the vendor-supplied DHCP option that is to be set or unset to the policy.

suboption-index

If the suboption is an array, then this is the index into the array. Otherwise, this defaults to 0. Note that there is no space between suboption-name and suboption-index.

field-name

Name of the field in the suboption that is to be set or unset. If the field is being set and contains an array of items, then the items must be specified in comma-separated format.



Examples

To specify the lease time for a client, enter:

nrcmd> client-policy 168.1-net setOption dhcp-lease-time 608400

 

To list the options in a client-policy, enter:

nrcmd> client-policy 168.1-net listOptions

Client-Policy Lease Time Method Commands

The setLeaseTime command allows you to set the values of lease times and the getLeaseTime command to display the value of a lease time.

The syntax is:

client-policy client-name setLeaseTime value

client-policy client-name getLeaseTime

The lease time is the value of the dhcp-lease-time DHCP option. You should specify the time in seconds.

Lease Times

A client policy contains two lease times: the client lease time and the server lease time.

  • You set the client policy lease time through the setLeaseTime method. This lease time determines how long the client policy believes its lease is valid.

  • You set the server lease time through server-lease-time property. This lease time determines how long the server considers the lease valid. Note that the server lease time is independent of the lease's grace period; that is, the server will not allocate the lease to another client until after the server's lease period has expired and the grace period has expired.

You might want to establish these two different lease times if you want to retain information about clients' DNS names and yet have them renew their leases frequently. When you use a single lease time and it expires, the server no longer keeps that client's DNS name. If, however, you use a short client lease time and a longer server lease time, the client information is retained even after the client's lease has expired.

Custom-Option

The custom-option command allows you to create, list, or delete a custom DHCP option.

You can also use the custom-option command to redefine any predefined DHCP options. The newly defined option's definition will override the original option. If you delete this option, its definition returns to its original value.

The syntax is:

custom-option name create number type [prop=value]

custom-option name delete

custom-option name show

custom-option list

custom-option listnames

custom-option name get prop

custom-option name set prop=value

Table 2-10 lists and describes the custom-option command properties.


Table 2-10: Custom-Option Command Properties
Property Description

number

Specifies the option number. Read-only. Optional. There is no default.

type

Specifies the data type of the option. It can be BOOL, BYTE, WORD, INT, UINT, STRING, IPADDR, BYTE_ARRAY, WORD_ARRAY, INT_ARRAY, UINT_ARRAY, or IPADDR_ARRAY. Optional. There is no default. For more information about types, see the "Option Data Types" section.

desc

Use this property for a description. Optional. There is no default.



Option Data Types

Table 2-11 lists the option data types supported by the nrcmd program.


Table 2-11: Option Data Types
Option Data Type Type Definition

boolean

BOOL

TRUE or FALSE

byte

BYTE

8-bit unsigned integer

word

WORD

16-bit unsigned integer

signed integer

INT

32-bit signed integer

unsigned integer

UINT

32-bit unsigned integer

string

STRING

ASCII text string

IP address

IPADDR

IP address in the form of a.b.c.d

byte array

BYTE_ARRAY

A sequence of bytes represented in the form xx[:xx] in which x is a hex character 0-9 or a-f. For example, to enter a series of four bytes containing the values 192, 168, 73 and 144, you would enter their hex values as "c0:a8:49:90." The ASCII string "ABCijk123" should be entered as "41:42:43:69:6a:6b:31:32:33."

word array

WORD_ARRAY

Array of 16-bit unsigned integers

signed array

INT_ARRAY

Array of 32-bit signed integers

unsigned array

UINT_ARRAY

Array of 32-bit unsigned integers

IP address array

IPADDR_ARRAY

Array of IP addresses



Examples

To create a custom option called red, mapped to number 100, of type IPADDR, enter:

nrcmd> custom-option red create 100 IPADDR

 

To create a custom option called blue, mapped to number 101, that is an array of bytes, enter:

nrcmd> custom-option blue create 101 BYTE_ARRAY

 

To give custom-option blue a description, enter:

nrcmd> custom-option blue set desc="this is another option called blue." 
 

To create a custom-option that overlays pre-defined option 2 (time-offset), enter:

nrcmd> custom-option green create 2 INT desc="Option green overlays time-offset." 

 

Note   We recommend that you do not create case-sensitive option names; for example, if you create a custom-option named BLUE, then reference it as blue in another command, the option will not work. It is better to name your options consistently with lowercase letters.

To list the custom-options you have created, enter:

nrcmd> custom-option list 

 

To cause option 2 to revert to its original definition, enter:

nrcmd> custom-option green delete 
 

To redefine the time-offset option to change its name, enter:

nrcmd> custom-option TimeOffset create 2 INT 

 

To display the option's new definition, enter:

nrcmd> custom-option TimeOffset show 

 

Do not map numbers to custom options that are already used by DHCP or BOOTP options. For a complete list of pre-assigned numbers, see the "Import Leases" section in this guide.

Dhcp

The dhcp command allows you to configure the DHCP server in the cluster. Because there is only one DHCP server per cluster, you do not need to reference the server by name.

The syntax is:

dhcp disable feature

dhcp enable feature

dhcp unset feature

dhcp get feature

dhcp show

Table 2-12 lists and describes the dhcp features.


Table 2-12: Dhcp Command Features
Feature Description

client-class

Controls whether or not the DHCP server uses the client and client-class configuration objects to affect request processing. Optional. The default is disabled.

defer-lease-extensions

Controls whether or not the DHCP server extends leases that are less than half expired. Optional. The default is enabled, which means that the DHCP server will always extend leases (except in the first 30 seconds) to accommodate protocol retries. For more information about this feature, see the "Defer-lease-extensions" section.

discover-interfaces

Causes the DHCP server to find all the interface cards on the host and process DHCP requests that it receives from any of them. It will, however, only offer addresses to requests from subnets in which you have defined a valid scope with available addresses. If you do not enable this feature, the DHCP server uses only its list of configured interfaces. Optional. The default is enabled. See the "Dhcp-interface" section.

drop-packet-on-extension-
failure

Causes the server to drop a packet (if possible) when it encounters a failure in an extension. Optional. The default is enabled.

failover

Controls whether all scopes configured to use the server's failover configuration will be able to engage in failover. If disabled, only those scopes with failover explicitly enabled will do so. Optional. The default is disabled. For more information, see the "Scope" section.

force-dns-updates

Forces the DHCP server to attempt a DNS update for each client that obtains or renews a lease, whether or not the DHCP server's state has recorded a successful update. This feature is useful when you need to restore a DNS server's database from a backup and have lost dynamic DNS records. The default is disabled.

Note that this command causes increased dynamic update load, which can adversely affect performance. If only a few DHCP clients' DNS names need to be refreshed, we recommend that you do not use force-dns-updates. Instead, request that DHCP clients individually release and renew their leases.

hardware-unicast

Controls whether the DHCP server sends unicast rather than broadcast responses when a client indicates that it can accept a unicast. Optional. The default is enabled. This feature may not be available on all platforms.

ignore-icmp-errors

If you enable this feature and you have configured the DHCP server to send ICMP ECHO (ping before offer) requests before offering addresses, the server will make unavailable any address for which it receives an ECHO reply within its configured timeout period. If you disable this feature, the DHCP server will also treat ICMP DEST_UNREACHABLE and TTL_EXPIRED error messages which it receives after sending ICMP ECHO requests as grounds for making an address unavailable. Optional. The default is enabled.

import-mode

Causes the DHCP server to recognize only packets generated from the nrcmd program's import leases command and ignore all others. You can use this property if you want to update your DHCP server and prevent clients from receiving addresses during this period. Optional. The default is disabled. For more about import mode, see the "Import-mode" section.

mac-address-only

Causes the DHCP server to use the client's MAC address as the only client identifier. The standard behavior, as specified in RFC 2132, is to use the client ID option (if it is present) as the unique client identifier. If you specify the mac-address-only argument, the DHCP server ignores the client's ID and uses its MAC address instead. You can use this argument to have a single, consistent way of identifying all clients that use your DHCP server. Optional. The default is disabled.

one-lease-per-client

Causes the DHCP server to release any other leases the client may have had on this server. Because the default behavior for the Network Registrar DHCP server is to store all the leases a client obtains, this command ensures that only one lease is stored. A client might obtain a number of leases if a user with a laptop traveled throughout the building and requested leases at different locations on the network. Optional. The default is disabled.

update-dns-for-bootp

If the server is replying to a BOOTP request, and is offering a lease from a scope that is configured for DNS updates, the DHCP server checks this property before beginning the update. Optional. The default is enabled. You can use this feature to prevent DNS updates for BOOTP clients, while allowing updates for DHCP clients.

use-ldap-client-data

Controls whether the DHCP server attempts to read client-entry data through LDAP; that is, using the configuration supplied by the ldap command. Optional. The default is disabled. For more information about the ldap command, see the "Ldap Features" section.

save-relay-agent-data

Controls whether the DHCP server saves the relay agent data for a particular IP address in the DHCP server's state when it writes the lease data for that IP address. Enable this feature if you expect the DHCP server to respond to leasequery messages. Optional. There is no default.



Defer-lease-extensions

You might want to use the defer-lease-extensions feature to reduce the number of writes to the Network Registrar database. These writes can occur because the Network Registrar DHCP server commits fresh information to the database any time it changes the duration of a client's lease. Because the DHCP server renews leases for the full lease interval every time the client contacts the server, these database writes may have a performance impact if the server is on a busy network.

Some database writes can be eliminated if the data being written is redundant, that is, the same as the old data. Instead of granting the full lease duration, the server can re-grant the lease with a new duration equal to the remaining time on the old lease. Because the absolute expiration time does not change, no database write is needed.

There are three cases of lease extensions to consider:

  • Extensions due to client retries—When the server gets behind, it is possible for a client to retransmit requests. The DHCP server does not maintain enough information to recognize these as retransmissions, and processes each to completion, regranting a full lease duration and updating the database. When the server is already behind, doing extra work just makes the situation worse. To prevent this, the DHCP server will not extend leases that are less than 30 seconds old, regardless of the state of the defer-lease-extensions feature.

  • Extensions due to client reboots—The effective renew time for a client's lease is really the minimum of the configured renew time and the time between client reboots. In many installations this may mean that clients are getting fresh leases one (in a typical enterprise) or two (in a typical cable network) times per day, even if the renew time is set for many days. Setting the defer-lease-extensions feature can prevent these early renews from causing database traffic.
  • Extensions due to artificially short renewal times—Because there is no way for a DHCP server to proactively contact a DHCP client with regard to a lease, you might configure fairly short client renewals to provide a means of doing network renumbering, address re-allocation, or network reconfiguration (for example, a change in DNS server address) in a timely fashion. The goal is to allow you to do this without incurring unacceptable database update overhead.

As a complication, the server also keeps track of the time at which it last heard from the client. Known as "last-transaction-time," this information is sometimes used by sites as a debugging aid (for example, "How long has it been since we've heard from Beth's PC?"). Maintaining this time robustly requires a write to the database on every client interaction. For more information about this property, see the "last-transaction-time-granularity" section.

Because the last-transaction-time is not integral to the protocol, it does not have to be updated synchronously. Also, because it is used primarily as a debugging aid, it does not have to be entirely accurate. Furthermore, because the in-memory copy is always accurate, you can use the export leases -server command to display the current information even if the data is not up-to-date in the database. For more information about the export leases command, see the "Export Leases" section.

Import-mode

You can put the DHCP server into import mode by enabling the import-mode feature and then restarting the server. You take the server out of import mode by disabling the feature and restarting the server. You can use import-mode to exclude all DHCP lease requests except for the specially tagged ones that come from the nrcmd program during lease import. For more information about the import command, see the "Import Leases" section.

Examples

To enable the client-class facility for this DHCP server, enter:

nrcmd> dhcp enable client-class

 

To disable import mode, enter:

nrcmd> dhcp disable import-mode

 

To display whether discover-interface is enabled or disabled, enter:

nrcmd> dhcp get discover-interfaces

Dhcp Properties

Use the set, get, unset, and show commands to assign and retrieve values from the DHCP's name-value properties.

The syntax is:

dhcp get prop

dhcp set prop=value [prop=value]

dhcp unset prop

dhcp show

Table 2-13 lists and describes the dhcp command properties.


Table 2-13: Dhcp Command Properties
Property Description

activity-summary-interval

If the log setting flag activity-summary is set, then activity-summary-interval specifies the time between activity summary log messages. The default is 5 minutes.

append-user-class-id-to-
selection-tag

Meaningful only if the value of map-user-class-id is 1. When true, this property causes the user class-id to be appended to existing selection tags. When it is false, the user class-id replaces any existing selection tags. The default is true.

collect-performance-stats

Controls whether the DHCP server collects statistics for performance monitoring. The default is disabled.

dns-timeout

Controls the number of milliseconds the DHCP server will wait for a response before retrying a dynamic DNS request. Required. The default is 60000.

docsis-version-id-missing

Specifies a string that gets substituted with the %@docsis-vers% variable in the policy command's boot-file property. This substitution occurs if the DHCP request packet either does not contain a vendor-class-id option or if the option does not contain a DOCSIS version id. Optional. There is no default. The string can contain 255 characters.

drop-old-packets

Specifies the number of seconds a packet can age and still be processed. If the server is very busy, the processing of packets in the UDP input queue can be delayed. The DHCP protocol allows clients to retry packets that have not been processed within a few seconds. Therefore, allowing the server to process packets that are older than a small number of seconds could increase the congestion.

If the age of a packet is greater than the value of drop-old-packets when the server processes it, the server drops the packet. The default value is 8 seconds.

extension-trace-level

Is the default value of the extension trace level for every request object. You can override this value by setting the extension-trace-level in a user-written extension. Setting the level to zero causes very little tracing. Setting the level to three causes considerable tracing. Optional. The default is 0. For more information about DHCP extension creation, see the "Extension Properties" section.

failover-backup-percentage

The percentage of currently available (unreserved) addresses that the main server should send to the backup server to be used for allocations to new DHCP clients when the main server is down. The value is only meaningful in the main server. If it is defined in a backup server, it is ignored (to enable copying of configurations). Optional. The default 10 percent.

failover-backup-server

If failover is enabled server-wide, this is the DNS name of the backup server associated with all scopes that do not have an explicit failover-backup-server value configured. If this DNS name resolves to the IP address of the current server, then this server operates as the backup server for all of these scopes. It is an error if both the main and backup server names resolve to IP addresses that reside on the same server. Optional. There is no default.

failover-bulking

Controls whether multiple lease state updates are contained on one failover BNDUPD. Affects only the lease state updates generated by DHCP client activity.

failover-dynamic-bootp-backup-
percentage

The percentage of currently available (unreserved) addresses that the main server should send to the backup server for scopes on which dynamic BOOTP has been enabled. Optional. There is no default. For more information, see the "Failover-backup-percentage" section.

failover-lease-period-factor

Is the multiple of the desired lease period used to update the backup server when the main server informs it of a new DHCP client lease period. The default is 1.50. For more information, see the "Failover-lease-period-factor" section.

failover-main-server

If failover is enabled server-wide, this is the DNS name of the main server associated with all scopes that do not have an explicit failover-main-server value configured. If this DNS name resolves to the IP address of the current server, then this server operates as the main server for all of these scopes. It is an error if both the main and backup server names resolve to IP addresses that reside on the same server. Optional. There is no default.

failover-maximum-client-lead-time

The maximum client lead time, in seconds. Optional. The default is 3600 seconds (one hour). The maximum client lead time controls how much ahead of the backup server the client's lease expiration can be. You must define it in the main server. If you define it in the backup server, it is ignored (to enable copying of configurations).

failover-poll-interval

Failover partners will poll one another at this interval (in seconds) in order to confirm network connectivity. Optional. The default is 15 seconds.

failover-poll-timeout

The interval (in seconds) after which failover partners, who cannot communicate, will know that they have lost network connectivity. Optional. The default is 60 seconds.

failover-recover time

Controls whether the server performs initialization and then goes into RECOVER state. If server A is running, server B issues this command to ask for the state of server A. This property takes a time argument. You enter the time as month (name or its first three letters), day, hour (24 hour) year (fully specified year or last two digits), all enclosed in double quotes. For example, "Jun 30 20:00:00 2000."

failover-safe-period

This is the safe period, in seconds. It does not have to be the same on both main and backup servers. It only has meaning if you have enabled the failover-use-safe-period property. You must define it in the main server. Optional. The default is 24 hours. For more information, see the Network Registrar User's Guide.

failover-use-safe-period

If you have specified a failover-safe-period, you have to enable the failover-use-safe-period property to cause Network Registrar to go into the PARTNER-DOWN state automatically. If you do not enable failover-use-safe-period, Network Registrar will never go into the PARTNER-DOWN state automatically. You must use the server dhcp setPartnerDown command. Optional. The default is disabled. For more information, see the "setPartnerDown" section.

get-subnet-mask-from-policy

Causes the DHCP server to search all relevant policies for a subnet mask option, when constructing a response to send to a client. Normally, the DHCP server retains the subnet mask configured in the scope containing the base being granted to the DHCP client. Optional. The default is false. For more information, see the "Examples" section and the Network Registrar User's Guide.

ignore-requests-for-other-servers

Prevents the normal DHCP server response to requests for other servers. Normally, if the DHCP server sees a client requesting a lease from another server for an IP address that this server is configured to control, it sets the lease to UNAVAILABLE. However, some clients may send request packets with bad server ID options (rather than packets actually directed to other servers). This could cause IP addresses to be erroneously considered unavailable.

You can set the ignore-requests-for-other-servers property to prevent the server from changing leases to UNAVAILABLE when they are requested of another server (or have bad server ID options).

inhibit-busy-optimization

Prevents the server from using optimization to recover from periods of congestion. By default, the DHCP server determines that it is heavily loaded when the number of request packets reaches two-thirds of the total allocated. It logs a message and attempts to recover from the congestion by performing several optimizations. For example, it relaxes the requirement to keep the client's last transaction time updated to the granularity specified by last-transaction-time-granularity.

When the number of request packets drops to one-third of the total allocated, the server logs a message and returns to normal operation.

If the inhibit-busy-optimization property is set, the server does not use the optimizations or log the messages when it gets congested.

ldap-mode

Determines the preference for using LDAP servers if more than one LDAP server is configured. The servers can operate in two modes: round-robin and failover. If you set the mode to round-robin, the DHCP server ignores the servers' preferences. That is, it treats all LDAP servers—those configured to handle client queries and those configured to accept lease-state updates—equally.

If you set the mode to failover, the DHCP server uses the active LDAP server with the lowest preference. If the preferred server loses its connection or fails, the DHCP server uses the next LDAP server in preference order. The DHCP server uses servers with equal preference in round-robin order. Optional. There is no default.

last-transaction-time-granularity

Specifies the number of seconds Network Registrar guarantees that the last transaction time is accurate. Optional. The default is 30 seconds. Do not set it lower than 30 seconds. For optimal performance, set it to a value that is greater than half of your lease interval. For more about this property, see the "Defer-lease-extensions" section.

log-settings

Determines which events are logged in the log files. Logging additional detail about events can be helpful when you are analyzing a problem. But leaving detailed logging enabled for a long period can cause the log files to fill up. Refer to the "Log Settings" section for information about how to control what type of events are logged. The default flags are default, incoming-packets, and missing options.

map-user-class-id

Determines the handling of user class-id. This property is global and is set for all DISCOVER packets. The values are:

0 = ignore the user class-id option. (default)
1 = map the user class-id option to selection-tag.
2 = map the user class-id option to client-class.

max-dhcp-requests

Controls the number of buffers the DHCP server allocates for receiving packets from DHCP clients and failover partners. At least 100 buffers should be allocated and perhaps as many as several thousand would be reasonable in some installations. Required. The default is 500.

max-dhcp-responses

Controls the number of buffers the DHCP server allocates for responding to DHCP clients and communicating with failover partners. The number of buffers allocated should be at least two times the number allocated for max-dhcp-requests. Perhaps as many as several thousand would be reasonable in some installations. Required. The default is 1000. The server will configure additional responses if failover is configured.

max-dns-packets

Controls the size of buffers DHCP allocates for communication with DNS servers. You can reduce the DHCP server's memory requirement by reducing the number of DNS packets, at the risk of missing updates. Required. The default is 100.

max-dns-renaming-retries

Controls the number of times the DHCP server can try to add a host into DNS even if it detects that the host's name is already present in DNS. This field controls the number of times the DHCP server will attempt to modify a host's name to resolve a conflict. Required. The default is 2.

max-dns-retries

Controls the number of times the DHCP server attempts to add a host to the DNS server even if it detects that the host's name is already present. Required. The default is 3.

max-dns-ttl

Sets the Time To Live (TTL) ceiling, in seconds, for DNS records added through dynamic DNS. When the DHCP server adds a DNS record, it sets the TTL to less than one-third of the lease time, or this ceiling value. Note that the DNS record's effective TTL may be determined by the DNS zone's minimum TTL. Required. The default is 86400.

max-ping-packets

Sets the number of buffers that the server will allocate for sending and receiving ICMP ping messages. Optional. There is no default. For more information about the scope's ping-client's feature, see the "Scope Features" section.

max-waiting-packets

Sets the number (n) of packets that are allowed to wait for processing for a particular IP address. Only the most recently received n packets (of an IP address) are queued for processing. If an additional packet associated with that IP address arrives and n are already queued, the oldest packet is dropped and the new one is queued. Duplicate packets are also dropped. (A duplicate packet is any packet whose XID, client-id, and MAC address are equivalent to one already queued.) If you accept the default of 0, all packets are processed. Optional.


Note   The log setting `dropped-waiting-packets' will control whether a message is logged when these packets are dropped. For more information about this log setting, see "Log Settings" section.

mcd-blobs-per-bulk-read

The number of blob objects to be read by a bulk read. This parameter is used to tune DHCP start and reload times. Generally, a higher value results in faster server start and reload times, at the cost of using more memory. Values can be any number between 1 and 2500.

return-client-fqdn-if-asked

Controls whether the system returns the client-FQDN (Fully Qualified Domain Name) option to the client in the outgoing packet if the client requests it in the parameter request list. (For example, the client may want to know the status of the DNS activity.) Optional. The default is true.


Note   The system always sets the flags in the option to 0x3 and the RCODE1 and RCODE2 to 255. It also sends back whatever string was sent in, even if the use-client-fqdn property is turned off and no matter what the actual name is in DNS (or may ultimately be in DNS).

save-lease-renewal-time

Specifies whether the server saves the lease renewal time. If you set it to true, the server saves the lease renewal time (that is, the minimum time in which the client is expected to issue a lease renewal) as part of the lease in persistent memory. The default is false. (no saving of the lease renewal time).

save-vendor-class-id

Specifies whether the server saves the vendor-class-identifier. If you set it to true, the server saves the vendor-class-identifier as offered in the DHCP request's vendor-class-identifier option as part of the lease in persistent memory. This affects what can be stored in an LDAP directory. Optional.The default is false (Do not save the vendor-class-identifier.).

skip-client-lookup

If true, this property causes the DHCP server to skip looking up the client entry for client class processing. When you set this property to false, the DHCP server looks up the client entry first. The default is false.

scope-selection-tags

The list of scope selection tags associated with this server property. In this context, the term tags refers to a named entity that is used to control matching client and client-class entries with candidate scopes. There is no default.

sms-lease-interval

Used to set the time interval, in milliseconds, between sending addresses to SMS. After you install a future release of Microsoft BackOffice Resource Kit (which will contain an enhanced version of smsrsgen.dll), reduce this interval or set it to 0. Optional. The default is 1100.

sms-library-path

Overrides the internal default value for the name of the SMS dll. The default is the empty string. If you specify an empty string, the system defaults to the internal server default of smsrsgen.dll.

sms-network-discovery

Causes the DHCP server to generate SMS (System Management Server) network discovery records. To enable this property, set it to 1; to disable it, set it to 0. Use this property in conjunction with the server DHCP updateSms command. The default is 0. For more information, see the "Server" section.

sms-site-code

Specifies the site code of the SMS server that receives discovery records when you issue the updateSms command. Optional. There is no default. This property has to be initialized to the appropriate SMS site code for the updateSms command to operate.

use-client-fqdn

Specifies that the system is to examine the client-FQDN (Fully Qualified Domain Name) option for the hostname. If there are any characters after the first dot in an FQDN option, they are ignored because the domain is determined from the scope. Set this property to false if you do not want the server to determine a hostname from this option, possibly because the client is sending unexpected characters. Optional. The default is true.

use-client-fqdn-first

Specifies that the system is to examine the client-FQDN option on incoming packets first, before the host-name option, when determining a hostname for a client. If there is a client-FQDN option with a hostname specified, the system uses that hostname.

If the system finds no client-FQDN option in the incoming packet, the system uses the host-name option.

If the use-client-fqdn-first parameter is set to false, the system examines the host-name option first and use any name found in that option. If that option does not appear, it then examines the client-FQDN option for a host name. Optional. The default is true.

use-host-name

Specifies that the system examines the host-name option for the hostname. Set this property to false if you do not want the server to determine a hostname from this option, possibly because the client is sending unexpected or "junk" characters. Optional. The default is true.



Examples

To set the value of the get-subnet-mask-from-policy property, enter:

nrcmd> dhcp set get-subnet-mask-from-policy=true

 

To enable SMS network discovery and specify the site code of the SMS server as aic, enter these commands:

nrcmd> dhcp set sms-network-discovery 1

nrcmd> dhcp set sms-site-code aic

nrcmd> server DHCP reload

nrcmd> server DHCP updateSms

Configuring the sms-library-path Property

When you install the Microsoft BackOffice Resource Kit, the system path is not updated to reflect the location of the SMS dll. Use one of the following methods to configure this property: setting the property to the relative path or setting it to the absolute path.

Setting the Property to the Relative Path

To set the property to relative path, follow these steps:


Step 1   Add the following line to the system path on the machine that has DHCP server:

<sms installation directory name>\diagnose
 

Step 2   Set this property to the name of the dll.

nrcmd> dhcp set sms-library-path "smsrsgen.dll"

 

or just accept the system default:

nrcmd> dhcp unset sms-library-path


Setting the Property to the Absolute Path

If you do not want to change the system path, enter the following command to set this property to the absolute path of the dll location:

nrcmd> dhcp set sms-library-path "\\Program Files\\Resource 
Kit\\sms\\diagnose\\smsrsgen.dll"

Failover-backup-percentage

For all servers or scopes for which you have enabled failover, you must set the failover-backup-percentage. This is the number of currently available (not reserved) leases that the backup server can use for allocations to new DHCP clients when the main server is down. You can use the default, which is 10 percent, or specify another value.

For scopes on which you have enabled dynamic BOOTP, you need to use the failover-dynamic-bootp-backup-percentage property rather than the failover-backup-percentage property. The failover-dynamic-bootp-backup-percentage is the percentage of available addresses that the main server should send to the backup server for use with BOOTP clients.


Note   You must define this percentage on the main server. If you define it on the backup server, Network Registrar ignores it (to enable duplicating configuration through scripts). If you do not define it, Network Registrar uses the default or specified failover-backup-percentage.

The failover-dynamic-bootp-backup-percentage is distinct from the failover-backup-percentage property, because if dynamic BOOTP is enabled on a scope, a server will never, even in PARTNER-DOWN state, grant leases on addresses that are available to the other server. Network Registrar will not grant leases because they may be given out by the partner using dynamic BOOTP, and can never safely be assumed to be available again.

To properly support dynamic BOOTP while using the failover protocol, do the following on every LAN segment in which you want BOOTP support:

  • Create one scope to be used for dynamic BOOTP

  • Enable BOOTP and dynamic BOOTP

  • Disable DHCP for that scope

For more information, see the Network Registrar User's Guide.

Failover-lease-period-factor

The client and the backup server can have different information about a lease expiration. The failover-lease-period-factor controls how much ahead of the client the backup server's lease expiration information can be. Whereas, the failover-maximum-client-lead-time controls how much ahead of the backup server the client's lease expiration information can be.

The larger the value, the more independent the main server is of the operation of the backup and the less performance impact the failover protocol has on the main server. However, the larger the value, the longer the backup will have to wait to time-out an expired lease and re-use it for a different client in the event that the main fails and the backup takes over DHCP functions.

  • If you specify a value of 1.00, it would be the same as the lease period that the main would give the DHCP client. If you do this, the main server will never be able to offer any client a lease time or lease extension of more than the maximum client lead time.

  • If you specify a value of 2.0, it would be twice the lease period the main would give the client.

You must define this property for the scope in the main server. If it is defined in a backup server, it is ignored (to enable duplicating the configurations through scripts). The default is 1.5 which is a good value for most sites.

The lease period interacts with the lease renewal period. If you increase the lease renewal period to a value greater than 50 percent, you must also increase the lease factor. There should be a ratio of 2:1 between the renewal and lease factor. For example if you increase the renewal time to 80 percent the lease factor should be 1.8.

Log Settings

Table 2-14 describes the flags that can be set with the log-settings property.


Table 2-14: Log Flags
Flag Description

activity-summary

Causes Network Registrar to output a summary message every 5 minutes. This is useful when many of the no-xxx log settings are enabled, because it provides some indication of the activity in the server without imposing the load required for a log message corresponding to each DHCP message. The time period for these messages can be configured with the DHCP server activity-summary-interval property. The default is 5 minutes.

client-criteria-processing

Causes Network Registrar to output a log message whenever it examines a scope to find an available lease or whenever it examines a scope to determine if a lease is still acceptable for a client who already has one. This setting can be very useful when configuring or debugging client-class scope criteria processing. It causes a moderate amount of information to be logged so you should not leave it enabled as a matter of course.

dropped-waiting-packets

Setting this flag causes Network Registrar to log a message if the system drops packets due to the setting of the max-waiting-packets DHCP property.

Packets may be dropped if the queue length for any IP address exceeds the value of max-waiting-packets. If dropped-waiting-packets is set, the server logs a message whenever it drops a waiting packet from the queue for an IP address.

client-detail

Causes Network Registrar to log a single line at the conclusion of every client-class client lookup operation. This line shows all the data found for the client as well as the data that was found in the client's client-class. This setting is useful when setting up a client-class configuration and for debugging problems in client-class processing.

dns-update-detail

Causes Network Registrar to display additional log messages for all DNS operations. This flag can be helpful in diagnosing problems in dynamic DNS operations.

default

Provides a low level of logging in several parts of the DHCP server. This flag is on by default. If you reconfigure the default, even this logging will not appear.

failover-detail

Causes Network Registrar to display additional log messages concerning failover protocol operations and state transitions. This does not place a significant load on the server and may be left enabled.

incoming-packets

Causes Network Registrar to log a single line message for every incoming packet. This setting is especially useful when you are initially configuring a DHCP server or a BOOTP relay, in that an immediate positive indication exists that the DHCP server is receiving packets. This flag is on by default.

incoming-packet-detail

Causes Network Registrar to display and log the contents of every DHCP packet received by the DHCP server in human readable form. This setting enables the built-in DHCP packet sniffer for input packets. The log files will fill up (and turn over) very rapidly when you have enabled this setting. This setting also causes a significant performance impact on the DHCP server so you should not leave it enabled as a matter of course.

ldap-create-detail

Causes Network Registrar to log messages whenever the DHCP server initiates a lease state entry create to an LDAP server, receives a response from an LDAP server, or retrieves a result or error message from an LDAP server.

ldap-query-detail

Causes Network Registrar to log messages whenever the DHCP server initiates a query to an LDAP server, receives a response from an LDAP server, or retrieves a query result or an error message from an LDAP server.

ldap-update-detail

Causes Network Registrar to log messages whenever the DHCP server initiates an update lease state to an LDAP server, receives a response from an LDAP server, or a retrieves a result or error message from an LDAP server.

leasequery

Causes Network Registrar to log a message when leasequery packets are processed without internal errors and result in an ACK or NAK message.

minimal-config-info

Reduces the number of configuration messages that Network Registrar logs when the server starts or reloads. In particular, the server does not log a message for every scope when this flag is set.

missing-options

Causes Network Registrar to log a message whenever an option requested by a DHCP client has not been configured in a policy and therefore cannot be supplied by the DHCP server. This flag is on by default.

no-dropped-bootp-packets

Prevents Network Registrar from logging the single line message that it normally logs for every BOOTP packet that is dropped.

no-dropped-dhcp-packets

Prevents Network Registrar from logging the single line message that it normally logs for every DHCP packet that is dropped due to DHCP configuration. (See the no-invalid-packets flag for messages associated with packets dropped because they are invalid.)

no-failover-activity

Prevents Network Registrar from logging normal activity messages and some warning messages logged for failover. Serious error log messages continue to appear independent of this log setting.

no-failover-conflict

Prevents Network Registrar from logging warnings about potential conflicts between failover partners. It still logs errors. Setting this log setting can greatly reduce the amount of logging produced by a failover without losing the errors.

no-invalid-packets

Prevents Network Registrar from logging the single line message that it normally logs for every DHCP packet that is dropped because of being invalid. (See the no-dropped-dhcp-packets flag for messages associated with packets dropped because of the DHCP server configuration.)

no-reduce-logging-when-
busy

Causes Network Registrar to continue specified logging activity even when it is very busy.

Normally, the DHCP server reduces logging when it becomes very busy, i.e., when it has used over two-thirds of the available receive buffers (which is itself a configurable value). To do this, it sets the no-success-messages, no-dropped-dhcp-packet, no-dropped-bootp-packets, no-failover-activity, and no-invalid-packet flags and clears everything else except activity-summary. When it is no longer very busy, i.e., when only one-third of the available receive buffers are in use, it restores the previous settings.

Setting the no-reduce-logging-activity flag prevents Network Registrar from taking these actions.

no-success-messages

Prevents Network Registrar from logging the single line message that it normally logs for every successful outgoing DHCP response packet. This affects logging for only successful outgoing DHCP response packets. Setting this log setting can greatly increase server performance.

no-timeouts

Prevents Network Registrar from logging messages associated with the timeout of leases or offers.

outgoing-packet-detail

Causes Network Registrar to display and log the contents of every DHCP packet transmitted by the DHCP server in a human readable form. This setting enables the built-in DHCP packet sniffer for output packets. The log files will fill up (and turn over) very rapidly when this setting is enabled. This setting also causes a significant performance impact on the DHCP server so you should not leave it enabled as a matter of course.

unknown-criteria

Causes Network Registrar to display a single-line log message whenever the DHCP server finds a client entry that specifies a selection-criteria or selection-criteria-excluded that is not found in any scope appropriate for that client's current network location.



Examples

To suppress warning messages for unconfigured or missing options, enter:

nrcmd> dhcp set log-settings=default,incoming-packets

nrcmd> server dhcp reload

 

To turn on client and client-class debugging for the DHCP server, enter:

nrcmd> dhcp set log-settings=client-detail

nrcmd> server dhcp reload

 

To turn off debugging for the DHCP server, enter:

nrcmd> dhcp set log-settings=default

nrcmd> server dhcp reload

DHCP Extension Methods

Use the method commands attachExtension, detachExtension, and listExtensions to configure extensions to run at the supported extensions points for the DHCP server. (See Table 2-15.) You can configure one or more extensions to be run at each extension point. If multiple extensions are configured for a given extension point, the order in which they execute can be controlled by specifying a sequence number when attaching each extension. For more information about extensions, see the "Extension" section.

  • The attachExtension method sets the specified extension point to call the named extension. If the extension point is already configured to call an extension, use the sequence property to specify the order in which extensions are executed (1, 2, 3,...). If you do not specify a sequence number for the extension you are adding, Network Registrar overwrites the existing extension with the new value.

  • The detachExtension method removes extensions from the specified extension point. If you do not include a sequence number when specifying the extension point, Network Registrar removes the extension at sequence number 1. Otherwise, it removes the extension at the specified sequence number.

  • The listExtensions method shows the currently configured extensions and their sequence numbers (if multiple extensions are configured) at each extension point.

The syntax is:

dhcp attachExtension extension-point extension-name [sequence-number]

dhcp detachExtension extension-point [sequence-number]

dhcp listExtensions


Note   It is recommended that you run listExtensions for an extension point before attaching a new extension. Check the result to ensure that the new extension has a different sequence number than any existing extensions.

Extension Points

Table 2-15 summarizes the extension points available to the DHCP server.


Table 2-15: Dhcp Command Extension Points
Extension Point Purpose

post-packet-decode

This is the first extension point encountered when a request arrives. It immediately follows the decoding of the input packet, and precedes any processing on the data in the packet. The primary activity for an extension at this point is to read information from an input packet and act upon it, for example, to rewrite the input packet.

pre-client-lookup

The extension point runs only if you have enabled client-class processing for the server. This extension point allows an extension to perform any or all of the following:

  • Modify the client that is looked up during client-class processing.

  • Specify individual data items to override any data items found from the client entry or the client class it specifies.

  • Instruct the server to skip the client lookup altogether. In this case, the only client data that will be used is that which is specified.

  • Drop the packet.

post-client-lookup

This extension point examines the results of the entire client class processing operation and acts based on those results, such as rewriting the results or dropping the packet. You can use this extension point to place data items in the environment dictionary to affect the processing of an extension running at the pre-packet-encode extension point. Note that you cannot change the client class at this point, but you can override certain values determined by the client or client class already examined.

check-lease-acceptable

This extension point is reached immediately after the server has determined that the current lease is acceptable for this client. The extension can examine the results of that operation and can cause the routine to return different results. Use this extension point with extreme care, as incorrect usage could create an infinite loop in the server.

pre-packet-encode

The extension point rewrites information in the response packet that the DHCP server sends to the user. This extension point comes after the response packet is ready to be encoded into a packet to be sent to the DHCP client. Typically, options could be added at this extension point to the packet. The packet can also be dropped at this point, but the DHCP server will already have recorded its values in its internal database.

post-send-packet

This extension points allows you to update an external process or database with information about a request or response.

pre-dns-add-forward

This extension point allows you to choose the name and affect the number of DNS retries during update operations. Network Registrar may call this extension point multiple times for a single DNS update operation.



Extension points are discussed in more detail in Chapter 4 and Appendix D of this guide.

Examples

After you have defined an extension, use the attachExtension command to add the test extension at the extension point post-packet-decode by entering:

nrcmd> dhcpattachExtension post-packet-decode test 1

 

To remove the extension test from the extension point post-packet-decode, enter:

nrcmd> dhcp detachExtension post-packet-decode

 

To list all the extensions points and any extensions associated with them, enter:

nrcmd> dhcp listExtensions

DHCP Forwarding

You can forward DHCP traffic from one DHCP server to another under the control of a Network Registrar extension. The DHCP forwarding feature is important in situations where the other server is not one that you manage. This is most likely to occur in environments where multiple vendors supply DHCP services for clients on the same virtual LAN.

The DHCP forwarding feature works in the following way:

1. When DHCP is initialized, the server opens a UDP socket, which it uses to send forwarded packets. To support servers with multiple IP addresses, the socket address pair consists of INADDR_ANY and any port number. This enables clients to use any one of the server's IP addresses.

2. When the DHCP server receives a request from a client, it processes these extension point scripts:

  • post-packet-decode

  • pre-client-lookup

  • post-client-lookup

As the DHCP server processes these scripts, it checks the environment dictionary for this string:
    cnr-forward-dhcp-request

3. If it finds that string and the string has the value true, the server calls its forwarding code.

4. The forwarding code checks the environment dictionary for a string with the following key:

    cnr-request-forward-address-list
It expects a list of comma-separated IP addresses with an optional colon-delimited port number, as in the following example:
    192.168.168.15:1025,192.168.169.20:1027
By default, the server forwards to Port 67. It sends a copy of the entire client request to each IP address and port in turn. If any element in the list is invalid, the server stops trying to parse the list.

5. After the forwarding code returns, the server stops processing the request. In the post-client-lookup extension point script, however, an optional log message with client-entry details might be created.

For more information about extension points, see the"Extension" section.

Other dhcp Commands

Other commands affecting the DHCP server, such as

dhcp updateSMS [all]

dhcp setPartnerDown partner-server-name [date]

dhcp getRelatedServers column-separator=string

are described in "Server Commands" section.

Troubleshooting MAC Addresses

As an additional aid to troubleshooting your configuration, you can use the example extension, dextrace, distributed on the Network Registrar CD-ROM. It looks for a particular MAC address in every input packet. When it finds that MAC address, it enables packet sniffing for just that input and any corresponding output packet. You can configure this extension using the CLI, and the configuration commands are in the example source file for dexextension.c. This extension places only a very small load on the server and is suitable for long-term use when trying to diagnose a DHCP problem in which a troublesome MAC address is known, but it is not possible (or perhaps not convenient) to manually stimulate that DHCP client directly to find the problem.

Dhcp-interface

The dhcp-interface command allows you to add, remove, and list the IP addresses of your server's hardware card (such as Ethernet or Token Ring), also called the Interface card. Interfaces are named with the IP address and net mask for the physical device.

Network Registrar uses the distinguished interface named default to provide configurable default values for interfaces that the DHCP server discovers automatically. If you delete the default interface, the DHCP server uses hard-coded default values for port numbers and socket buffer sizes for the interfaces that it auto-discovers.

You can list the interfaces to provide either an explicit list of interfaces that the DHCP server should listen on, or an explicit list of interfaces that the DHCP server should not listen on.

  • If you enable discover-interfaces, the DHCP server uses the OS platform support to enumerate all of the active interfaces on the machine, and (unless there is an interface configuration with the ignore feature enabled) attempts to listen on each of these.

  • If you disable discover-interfaces, the DHCP server consults the interface list for all interfaces that do not have the ignore feature enabled, and attempts to listen on each of these.

The dhcp-interface command provides more functionality than is provided through the GUI, and provides it in a different form:

  • The GUI allows you to specify the address and netmask of only one address to use, and it does not allow you to modify any of the interface properties.

  • The GUI displays the address and net mask of the first non-default interface that has been configured, and allows you to change the address and netmask for this interface.

The syntax is:

dhcp-interface ipaddr / maskbits create [prop=value...]

dhcp-interface ipaddr / maskbits delete

dhcp-interface list

dhcp-interface listnames

dhcp-interface ipaddr / maskbits show

dhcp-interface ipaddr / maskbits get prop

dhcp-interface ipaddr / maskbits set prop=value [prop=value]

dhcp-interface ipaddr / maskbits unset prop

The maskbits parameter defined for scopes can be specified as 24 (for a 24-bit network, such as a 255.255.255.0 netmask) or 16 (for a 16-bit network, such as a 255.255.0.0 netmask).

Table 2-16 lists and describes the dhcp-interface command properties.


Table 2-16: Dhcp-interface Command Properties
Property Description

addr

The IP address of the interface. Optional. There is no default.

ignore

Indicates that the server should ignore this interface, which might be the case if you had several interfaces. Use this property to temporarily disable a specific interface in a list of interfaces. Optional. There is no default.

mask

The subnet mask. Optional. There is no default.



Examples

To create two different interface configurations, enter:

nrcmd> dhcp-interface 192.168.1.12/24 create 

nrcmd> dhcp-interface 10.1.2.3/24 create

 

To cause Network Registrar not to look at one interface, enter the following. Note that you must have created the interface specification before you can set it to be ignored.

nrcmd> dhcp-interface 10.1.2.3/24 set ignore=true

 

To delete the interface specification 10.1.2.3/24, enter:

nrcmd> dhcp-interface 10.1.2.3/24 delete

 

To list all the specified interfaces, enter:

nrcmd> dhcp-interface list

Dns

The dns command allows you to enable or disable DNS server features. Note that in Network Registrar there is only one DNS server per cluster, hence you do not need to reference the server by name.

The syntax is:

dns enable feature

dns disable feature

dns unset feature

dns get feature

dns show

Table 2-17 lists and describes the dns command features.


Table 2-17: Dns Command Features
Feature Description

hide-subzones

Required. The default is disabled. Configures the server to hide information about the subzone hierarchy for all zones delegated from this server. This feature collapses a portion of the domain name space into one virtual zone.

ixfr-enable

Required. The default is enabled. Controls the incremental transfer behavior for zones for which you have not configured a specific behavior. For more information about incremental transfer, see the "Incremental Transfer" section.

lame-deleg-notify

Required. The default is disabled. Controls whether you want Network Registrar to notice and log when a DNS server listed in a parent-zone's delegation of subzones does not know that it is authoritative for the zone.

relax-ixfr-query-validation

Optional. For compatibility with BIND 8.2.2p5, enabling this field allows IXFR responses with either an IXFR or AXFR in the Question field. The default is disabled.

no-fetch-glue

Required. The default is disabled. Controls whether you want the DNS server, when composing a response to a query, to fetch missing glue records. Glue records are DNS A records that specify the address of a domain's authoritative name server. Normal DNS responses include NS records and their A records related to the name being queried.

no-recurse

Required. The default is disabled. Controls whether you want to disable forwarding client queries to other name servers when your DNS server is not authoritative for data being queried. If you disable recursive queries, you make your name server a noncaching server.

notify

Required. The default is enabled. Controls NOTIFY sending notification for zones for which you have not configured a specific behavior. For more information about NOTIFY, see the "Notify" section.

round-robin

Required. The default is enabled. Controls whether you want round-robin cycling of equivalent records in responses to queries. Equivalent records are records of the same name and type. Because clients often only look at the first record of a set, enabling this feature can help balance loads and keep clients from forever trying to talk to an out-of-service host.

slave-mode

Required. The default is disabled. Controls whether you want this server to be a slave server, which is a server that relies entirely on forwarders for data that is not in its cache. This command has no effect unless you also specify the corresponding forwarders. Note that you can override slave-mode for specific domains with the DNS exception method. For more information about the exception method, see the "Exception Method" section.

subnet-sorting

Required. The default is disabled, as implemented in BIND 4.9.7. Specifies whether you want the address records in responses to queries to be reordered based on the subnet of the client. Because clients often only look at the first record of a set, enabling this feature can help localize network traffic onto a subnet. This feature only applies to answers to queries from clients located on the same subnet as the DNS server.

update-relax-
zone-name

Required. The default is disabled. Enables relaxation of the RFC 2136 restriction on the zone name record in dynamic updates. This feature allows updates to specify a zone name, which is any name within an authoritative zone, rather than the exact name of the zone.



Incremental Transfer

The incremental transfer feature (ixfr-enable) allows you to control how your DNS server handles incremental transfer. If you enable incremental transfer, you need to set or accept the default value of the ixfr-expire-interval property.

Table 2-18 describes the ixfr-expire-interval property of the incremental transfer feature (ixfr-enable).


Table 2-18: Incremental Transfer Property
Property Description

ixfr-expire-interval

Required. The default 604800 seconds (7 days). Indicates the longest interval to allow a secondary zone to be maintained solely with incremental transfers. After this period, the server requests a full zone transfer.



AXFR Workaround

When BIND 8.2.2p5 responds to an IXFR query, it erroneously returns the value AXFR (full zone transfer) in the Question field of the response packet. By default, Network Registrar adheres to RFC 1995, so it expects the value IXFR in that field and, therefore, rejects the BIND 8.2.2p5 response of AXFR. You can relax the IXFR query validation check by entering the following:

nrcmd>dns enable relax-ixfr-query-validation

 

Network Registrar then allows IXFR responses with either an IXFR or AXFR in the Question field.

Examples

To enable incremental transfer for all your zones, enter:

nrcmd> dns enable ixfr-enable

 

To disable incremental transfer for the single secondary zone example.com, enter:

nrcmd> zone example.com disable ixfr

 

To disable incremental transfer for the single remote-dns server (or subnet) 128.103.1.1, enter:

nrcmd> remote-dns create 128.103.1.1 ixfr=false

 

For more information about setting incremental transfer on specific zones or remote DNS servers, see the "Zone" section or the "Remote-dns" section.

Notify

The notify feature enables a Network Registrar DNS master server to inform its slave servers that changes have been made to its zone. The changes are not communicated in the NOTIFY packet. Instead, the slave servers initiate a zone transfer in response.

Because a master server for a zone does not know specifically which slave servers transfer from it, Network Registrar notifies all registered name servers for the zone (name servers listed in the NS Resource Records) when the zone changes. The sole exception to this policy is that Network Registrar does not notify the server named in the SOA mname field (the primary master). For more information about NOTIFY, see RFC 1996.

If you enable the notify feature, you must set or accept the defaults for the properties listed in Table 2-19.


Table 2-19: DNS Command Properties Associated with the Notify Feature
Property Description

notify-defer-cnt

Required. The default is 100. The maximum number of changes you want to accumulate during the notify-wait period. If this number is exceeded, Network Registrar sends notification before the notify-wait period has passed.

notify-min-interval

Required. The default is 2 seconds. The minimum interval required before sending notification of consecutive changes on the same zone to a particular server.

notify-rcv-interval

Required. The default is 5 seconds. For secondary zones, the minimum amount of time between the completion of processing of one notification (serial number testing and/or zone transfer), and the start of processing of another notification.

notify-send-stagger

Required. The default is 5 seconds. The interval to stagger notification of multiple servers of a particular change.

notify-wait

Required. The default is 5 seconds. The period of time to delay, after an initial zone change, before sending change notification to other name servers. This property allows you to accumulate multiple changes, and thus limit the number of times the serial number advances.



Examples

To disable NOTIFY for all the zones, enter:

nrcmd> dns disable notify

 

You can use IXFR and NOTIFY together, but you do not have to. You might want to disable NOTIFY for a quickly changing zone for which immediate updates on all secondaries does not warrant the constant NOTIFY traffic. Such a zone might benefit from having a short refresh time and a disabled NOTIFY.

nrcmd> zone example.com set refresh=30m

nrcmd> zone example.com disable notify

 

For more information about setting zone properties, see the "Zone" section.

Dns Properties

Use the set, get, and unset commands to assign and retrieve values from the DNS server's name-value properties.

The syntax is:

dns get prop

dns set prop=value [prop=value]

dns unset prop

Table 2-20 lists and describes the dns command properties.


Table 2-20: Dns Command Properties
Property Description

local-port-num

Required. The default is 53. Specifies the UDP and TCP port number on which the DNS server listens for queries.

max-cache-ttl

Required. The default is 604800 seconds (7 days). Indicates the maximum amount of time that you want Network Registrar to retain cached information.

mem-cache-size

Required. The default is 200 KB. Indicates the size of the in-memory record cache, in kilobytes.

neg-cache-ttl

Required. The default is 10 minutes. Indicates how long information learned from other name servers about non-existent names or data should be cached.

remote-port-num

Required. Specifies the UDP and TCP port to which the DNS server sends queries to other servers. The default is 53.

notify-

The properties associated with the notify feature are listed in Table 2-19. These are applicable only when notify is enabled.



Default TTL Responses

Network Register responds to authoritative queries with an explicit TTL value, if one exists. If none exists, the default behavior is to use the value of defttl, which is the default TTL for the zone. Databases originating from earlier versions of Network Registrar do not have this zone attribute. Therefore, they use the minimum TTL, as defined in the SOA of the zone, for the default TTL when there is no explicit TTL.

Enabling the enforce-min-ttl property causes Network Registrar to use the minimum TTL instead of the default TTL. In this configuration, Network Registrar uses minttl, the minimum SOA TTL, as the default for resource records with no TTL values. Additionally, it uses minttl as a floor value. That is, resource records that have explicit TTL values that are smaller than the minimum SOA TTL assume the value of the minimum SOA TTL.

When the enforce-min-ttl property is disabled, Network Registrar assumes the default TTL when responding with a zone transfer with resource records that do not have explicit TTL values. If the default TTL value for the zone is administratively altered, then Network Registrar automatically forces a full zone transfer to any secondary requesting a zone transfer.

TTL in BIND Zone Exports and Imports

When Network Registrar receives a BIND zone export request, it records the default TTL for the zone in a BIND directive ($TTL). The value of the directive is determined by the rules described in the "Default TTL Responses" section.

Network Registrar also recognizes $TTL directives for BIND imports. The first $TTL directive it encounters serves as the default TTL for the zone. This value is assigned to defttl for future use. Subsequent $TTL directives do not override the first directive; that is, they do not change the default TTL for the zone. Instead, they provide the TTL for subsequent resource records that have no explicit TTL values. Subsequent resource records that have no TTL assume the TTL stated in the most recently encountered $TTL directive. For example, the BIND zone file shown here:

$ORIGIN c.
@ IN SOA ns joe 10 10800 3600 604800 7200
$TTL 3600
z IN A 1.2.3.4
$TTL 7200
y IN A 1.2.3.5
x 1800 IN A 1.2.3.6
$TTL 9800
w IN A 1.2.3.7
t 13400 IN A 1.2.3.8

is imported as:

default TTL: 3600
c. IN SOA ns joe 10 10800 3600 604800 7200
z IN A 1.2.3.4
y 7200 IN 1.2.3.5
x 1800 IN A 1.2.3.6
w 9800 IN 1.2.3.7
t 13400 IN A 1.2.3.8

Notice that z does not have an explicit TTL value. Instead, it assumes the default TTL (3600). Also notice that Network Registrar assigns both y and w explicit TTL values based on the last encountered $TTL directives.

If the BIND zone file contains no $TTL directives, Network Registrar assumes the SOA minimum TTL value as the default TTL. For example, the zone file that follows is missing a $TTL directive:

$ORIGIN c.
@ IN SOA ns joe 10 10800 3600 604800 7200
z IN A 1.2.3.4
y IN A 1.2.3.5
x 1800 IN A 1.2.3.6
w IN A 1.2.3.7
t 13400 IN A 1.2.3.8

Network Registrar imports this file as:

default TTL: 7200
c. IN SOA ns joe 10 10800 3600 604800 7200
z IN A 1.2.3.4
y IN 1.2.3.5
x 1800 IN A 1.2.3.6
w IN 1.2.3.7
t 13400 IN A 1.2.3.8

Dns Methods

The dns method commands let you add, list, or remove specific servers for dealing with root-hint servers, exception servers, forwarding servers, and flushing the cache.

RootHint Method

The root hint method allows you to specify the names and addresses of the root servers. After you specify these servers, Network Registrar queries them for their root-name server records, which in turn are used to resolve other names. As such, these values need not be exact, but they need to be accurate enough for the Network Registrar DNS server to retrieve the correct information.

The syntax is:

dns addRootHint name ip-address [ip-address]

dns
removeRootHint name

dns
listRootHints

Examples

To add the root name server a.root-servers.net, enter:

nrcmd> dns addRootHint a.root-servers.net 198.41.0.4

 

To remove the root name server a.root-servers.net, enter:

nrcmd> dns removeRootHint a.root-servers.net

 

To list the root name servers, enter:

nrcmd> dns listRootHints 

Exception Method

Use the exception method only if you do not want your DNS server to use the standard name resolution for querying root name servers for names outside the domain. The exception method allows you to specify the resolution exception domains and the associated servers' IP addresses.

The syntax is:

dns addException name ip-address [ip-address]

dns
removeException name

dns
listExceptions

The resolution exception covers subzone delegations. If the global forwarding is set and a subzone is in the resolution exception list, the query for that subzone goes to the name server that appears in the exception list and not to the forwarder.


Note   In early versions of Network Registrar, when the global forwarding option is set, any query for the subzone delegation goes to the forwarder, not to the server that is authoritative for that subzone.

Examples

For example, the sample company, QuickExample, has four subsidiaries: red, blue, yellow, and green. Each of them has its own domain under the .com domain. But when users at red.com. want to use resources at blue.com, their DNS server knows that it is not authoritative for blue.com., and thus attempts to locate blue.com. by asking the root name servers.

To use exception handling, the administrator at red.com. lists all the domains that users might want to access, and at least one corresponding name server. In this case, the administrator would list the three other domains for the QuickExample company.

To add the exception server blue.com., enter:

nrcmd> dns addException blue.com. 192.168.1.4

 

To remove the name server blue.com., enter:

nrcmd> dns removeException blue.com.

 

To list the name servers, enter:

nrcmd> dns listExceptions 

 

Forwarder Method

The forwarder method allows you to specify the addresses of any name servers that you want your Network Registrar DNS server to use as forwarders. Network Registrar forwards recursive queries to these servers before forwarding queries to the Internet-at-large. Note that you can use the exception method to override forwarding for specific domains.

The syntax is:

dns addForwarder ip-address [ip-address]

dns
removeForwarder ip-address

dns
listForwarders

Examples

To add the forwarder server 192.168.1.4, enter:

nrcmd> dns addForwarder 192.168.1.4

 

To remove the name server 192.168.1.4, enter:

nrcmd> dns removeForwarder 192.168.1.4

 

To list the forwarder servers, enter:

nrcmd> dns listForwarders 

Flushing the Cache

Use the dns flushCache command to stop the disk cache file from growing, but the actual behavior depends on whether your DNS server is running or stopped.

  • If the DNS server is running, Network Registrar clears all expendable entries from the cache database file. Flushing the cache does not cause the file to shrink in size, due to the nature of the database, but does create free space within it. Because the memory cache is unaffected by this operation, recently in-use cache entries are not lost and performance is not significantly affected.

  • If the DNS server is stopped, Network Registrar interprets the request to flush all entries and thus removes the cache database file. Network Registrar reinitializes the database when you restart the server.

To clear a cache that has grown too large, stop the server, enter the command, then restart the server.

The syntax is:

dns flushCache

Rebuilding Resource Records Indexes

Use the dns rebuildRR-Indexes command if you need to rebuild your resource records indexes. You might need to rebuild your resource records indexes if you observe resource or host list data that appears inconsistent or if data appears to be missing. Rebuilding your resource records should correct any inconsistencies.


Note   The dns rebuildRR-Indexes command removes any duplicate resource records it finds in the database. A subsequent reload of the DNS server may produce the following diagnostic message:

nrcmd> host_namenrcmd> zone_namenrcmd>
This warning is to be expected in this case and you can safely ignore it.

The syntax is:

dns rebuildRR-Indexes

Exit

The exit command allows you to exit the current nrcmd program session. Network Registrar writes all your unsaved changes to the database. If Network Registrar is unable to save your changes, it displays the same error code as if you had used the save command.

The syntax is:

exit

Example

To quit the Network Registrar command line interface when you are in interactive mode, enter:

nrcmd> exit

Export

The export command allows you to export Network Registrar DHCP and DNS server information.

  • export addresses writes all IP addresses to a database or text file.

  • export leases writes current and/or expired leases to a file

  • export zone writes the specified DNS zone into a file in BIND format.

  • export zonenames writes the names of the DNS server's forward and/or reverse zones to a file.

  • export hostfile creates a hostfile in UNIX host file format.

The syntax is:

export addresses {file=CSV text file | database=data source name user=db user name password=db user password [config=config file] [table=table name} [mask-bits=integer] [dhcp-only] [time-ascii | time-numeric]

export leases -client | -server [-time-ascii | -time-numeric] filename

export zone zone name [static | dynamic | both] file

export zonenames [forward | reverse | both] file

export hostfile [file]

Export Addresses

The export addresses command allows you to export all active IP addresses into a specified database or CSV (comma-separated value) text file.

The syntax is:

export addresses [file=<CSV text file> | {database=<data source name> user=<db user name> password=<db user password> [table=<table name>]}] [dhcp-only]
[time-ascii | time-numeric]


To specify the clusters that you want the export command to query, use the .nrconfig configuration file. This is the same configuration file that the report command uses. If there is an [export-addresses] section in the configuration file, the export command uses the clusters specified in that section instead of the default cluster.

When you run the export addresses command, its output depends on what you specify:

  • Specify file= to create a CSV text file.

  • Specify database= to create a new database table in the specified database.

  • Specify the table=option to use that table name; otherwise it uses the default table name of "ip_addresses."

If the table already exists in the specified database when you run the export command, it is cleared (and the columns reset) before the new data is written. Network Registrar does not provide a warning or confirmation if it clears an existing table.
  • If you specify no option, it writes the output in CSV format to the standard output.


Note   You cannot specify both file= and database= in the same command.

The time-ascii and time-numeric options specify how date/time fields are output to a CSV text file or when the timestamp data type is not supported by the target database. The default is time-ascii.

Specifying the Config File

If you do not specify a config file, the export addresses command looks for a default .nrconfig file in your current directory, then in your home directory, and finally in the AIC_INSTALL_PATH/conf directory. Network Registrar uses the first file it encounters.

Each line of the file must begin with the character # (comment), a section header enclosed in square brackets, or a parameter=value pair or its continuation.

[export addresses]
clusters=machine1 username password, machine2 username password [...]
 

Network Registrar strips leading white space from each line and ignores blank lines.

Specifying Clusters

You can specify cluster in a variety of ways and Network Registrar follows a precedence order. Any of the specific cluster specifications can override the default specification or previous specification.

#Cluster information for export addresses

[export addresses] 

#clusters=<clustername> <username> <password>,...

clusters=host1 admin, host2, host3 admin3 passwd3

 

Separate cluster specifications with commas. Within each cluster specification, separate the three arguments with spaces. For long lines you can use continuation lines. You can embed carriage returns; you do not need to use continuation escape indicators.

You can optionally specify a user name and password for the cluster. If you do not provide a user name or password for a particular cluster, Network Registrar uses the last user name or password listed. If you do not provide user names or passwords, Network Registrar uses the information from the command line -N and -P arguments, and then the NT Registry or environment variables AIC_NAME and AIC_PASSWORD.

If Network Registrar cannot find a user name or password or the supplied user name and password are incorrect, the lease-notification command issues a warning for that cluster.

Reported Errors

The export addresses command attempts to establish communication with the clusters you have specified. It reports an error in the following cases:

  • If the export addresses command cannot establish communication with any of the selected clusters, it issues messages on each cluster it could not reach and exits with the "101 OK, with warnings."

  • If the export addresses command cannot connect to the database or manipulate the table, it reports "326 Database access error:" followed by the text reported by ODBC.

  • If ODBC is not installed on the system, it reports "340 ODBC 3.x or higher required. ODBC not installed." If there is an incompatible version of ODBC preset, it issues the message, "340 ODBC 3.x or higher required. ODBC.y installed."


Note   If successful, the export addresses command prints "100 OK" both before and after Network Registrar lists the addresses. The first "100 OK" means that the command is being processed (without rejection because of existing locks, licensing problems, or command syntax errors). The second "100 OK" indicates that the command successfully completed its processing.

Data Format

The export addresses command writes the database output to the ip_addresses table or to the specified table name. Table 2-21 shows the columns in the ip_addresses table.


Table 2-21: Export Addresses Database Output
Column Data Type May Be Null? Description

ip_address

unsigned integer

no

32-bit IP address

ip_text

varchar(15)

no

IP address in dotted decimal notation

type

varchar(20)

no

STATIC, DYNAMIC, or RESERVED

state

varchar(20)

no

Available, Assigned, Unavailable, Leased, Expired, Deactivated, Released,
Other Available, Pending Available

cluster_name

varchar(256)

no

Cluster name from which the information came

scope_pool_name

varchar(256)

yes

Scope name address (DHCP) from which the address was allocated

failover-role

varchar(64)

yes

Failover role, if any, of leases

subnet_bits

integer

yes

Number of bits in subnet mask for the scope

dns_name

varchar(256)

yes

Fully qualified DNS name for assigned addresses

requested_name

varchar(64)

yes

UNIX or WINS host name (DHCP)

mac_address

varchar(256)

yes

MAC address as text

client_id

varchar(256)

yes

Client ID for the lease (DHCP)

client_class

varchar(256)

yes

Client-class name (DHCP)

lease_state_change_time

timestamp

yes

Date/time when the lease last changed state (DHCP)

lease_expiration_time

timestamp

yes

Date/time when the lease expires (DHCP)

lease_transaction_time

timestamp

yes

Date/time of the last transaction (DHCP)



The fields listed as "May be NULL" are null if the specified information is not available:

  • dns_name is NULL for a DHCP lease that is not bound to a DNS name

  • requested_name, mac_address, client_id, client_class, lease_state_change_time, lease_expiration_time, and lease_transaction_time are NULL except for DHCP addresses

The mac_address field is a text field of the form type,length,hex:hex:hex..., such as "1,6,06:44:40:26:f5:0f". The type and length are both in decimal whereas the data is in hexadecimal.

Field data types that are not supported by the target database are replaced with text (varchar) fields with the form listed in Table 2-22:


Table 2-22: Field Data Types
Field Data Type Text Replacement

ip_address

varchar(10) in hexadecimal, such as "0x1234abcd"

other integers

varchar(11) in decimal, such as "28"

timestamp

varchar(26) as either a string of the form "Wed Jan 02 02:03:55 1980" if time-ascii is specified or an unsigned integer string of seconds since midnight GMT Jan 01 00:00:00 1970 if time-numeric is specified. Times are always in UTC.

NULL

varchar(1) ""



Column names that exceed the target database's supported maximum name width are truncated to the allowable width.

CSV Text File

If you specify writing the output to a CSV text file, the export addresses command writes each line in the file as one row in the database. The export addresses command outputs each field to the text file in the order listed in Table 2-21. Each field is terminated by a comma, except for the last. The first line in the file is not a table row, but instead contains a "#" followed by the text of each of the column names separated by commas. All fields that require text substitution are handled as described in the previous section.


Note   The output is in no guaranteed order. The order can depend on the data in the system. Therefore, if order is important to you, use a tool to sort the data.

Addresses Reported

The export addresses command reports every address configured in every server that is specified in the config file. This includes addresses specified in DHCP scope ranges, DNS static addresses, and explicitly reserved addresses both for DNS and DHCP servers. Addresses in DHCP scope ranges that are not in use (allocated or reserved) however, do not appear in the table.

The report displays multiple entries for an address if the address is served by more than one server, in more than one scope, or has multiple DNS names. Thus, you cannot use a unique column as a key, but you can generate a unique key from a set of columns such as ip_address, type, cluster_name, scope_pool_name, or dns_name.

Export Leases

The export leases command writes the state of the leases to a file. It has two modes: client-side and server-side.

When you use the export leases -client command, Network Registrar reads the database. If the servers are running, system performance may be affected.
When you use the export leases -server command, Network Registrar does not read the database, so it is significantly faster. You also can only run the command if the server is running. Because the server is doing some extra work while it is building the export file, it may be slowed somewhat, but the time involved is usually so short that the performance impact is not noticeable.

Note   Network Registrar exports the time values as day, month, date, time, year, for example, Mon Apr 13 16:35:48 1998. For more information about the file formats, see the "Import and Export File Formats" section in this guide.

The syntax is:

export leases -client | -server [-time-ascii | -time-numeric] filename

The filename is the name of output file or "-" for standard out for client-side exports. You cannot use the dash with the -server option. In addition, the server-side export does not permit filenames with any non-alphanumeric character, such as "." for example.

The time-ascii and time-numeric options control which date/time format the export command uses. The default is time-ascii.

Examples

To export the client leases to the output file leaseOut, enter:

nrcmd> export leases -client leaseOut 

 

The export leases -client command writes out the lease time as a string, which is the day, month, date, time, year format, such as Apr 13 16:35:48 1998.

To export all the currently held and expired leases to the output file leaseOut, enter:

nrcmd> export leases -server leaseOut

 

The export leases -server command writes out the lease times as integers, which are the number of seconds since midnight GMT Jan 1, 1970. For example, 903968580.

Export Zone

The export zone command writes the specified DNS zone into a file in the BIND format.

The syntax is:

export zone zone-name arguments output-file

  • Arguments can be either "static" or "dynamic."

  • output-file is the name of the file to create for the DNS zone data.

  • domain-name is the name of the domain whose data you want to write to a file.

For example, to write the contents of the Example domain, enter:

nrcmd> export zone example.com static hosts.local 

Export Zonenames

The export zonenames command exports the names of the zones in the server. You can specify forward, reverse, or both to cause the command to export the forward zones, reverse zones, or all the zones, respectively.

The syntax is:

export zonenames {forward|reverse|both} output-file

Export Hostfile

The export hostfile command creates a hostfile, in UNIX hostfile format, from all the zones in the server. It ignores reverse zones. It creates hostfile records from A records, CNAME records, and HINFO records. The hostfile record consists of the IP Address, the FQDN, aliases created from the A records and CNAME records, and comments created from HINFO records.

The syntax is:

export hostfile output-file

Extension

The extension command allows you to configure and integrate user-written DHCP extensions into the DHCP server.

To extend the DHCP server with an extension, do the following:


Step 1   Write the extension in Tcl, C or C++ and install it in the server extensions directory.

UNIX:
For Tcl this is /opt/nwreg2/extensions/DHCP/tcl.
For C or C++ this is /opt/nwreg2/extensions/DHCP/dex
Windows NT:
For Tcl this is \program files\network registrar\extensions\dhcp\tcl
For C or C++ this is \program files\network registrar\extensions\dhcp\dex
It is best to place these extensions in the appropriate directory for TCL or C/C++ extensions. Then, when configuring the filename, just enter the filename itself (with no "/" or "\").
If you want to place extensions in subdirectories, you must enter the filename with a path separator. These are different depending on the operating system on which your DHCP server is running.

Note   When entering a filename that contains a "\" character on Windows NT, you must enter it with a "\" (because "\" is an escape character for the CLI). For example, to enter the filename "debug\myextension.tcl" enter debug\\myextension.tcl.

Step 2   Configure the DHCP server to recognize this extension, using the extension command.

Step 3   Attach the configured extension to one or more DHCP extension points using the dhcp attachExtension command. For more information about the command, see the "DHCP Extension Methods" section. For more information about choosing extensions points and writing extensions, see "Using Extension Points" in this guide.

Step 4   Reload the server.



Note   The DHCP server reads extensions only when you reload the server. So if you change an extension, you must reload the DHCP server.

The syntax is:

extension name create lang file entry [prop=value]

extension name delete

extension list

extension listnames

Example

To configure a Tcl extension, enter:

nrcmd> extension mytclext create Tcl mytclfile.tcl mytclentry

 

The contents of mytclfile.tcl might be:

proc mytclentry{request response environ}{
	$environ log LOG_INFO "helloworld"
}

Extension Properties

Use the set, get, and unset commands to assign and retrieve values from the extension's properties.

The syntax is:

extension name get prop

extension name set prop=value [prop=value ]

extension name unset prop

extension name show

Table 2-23 lists and describes the extension command properties.


Table 2-23: Extension Command Properties
Property Description

entry

Required (set by create). There is no default. The name of the entry point for the module. This function is called from any extension point to which this module is bound. The arguments for this function are server-implementation specific.

file

Optional (set by create). There is no default. This filename is relative to the directory extensions in the installation. It cannot be an absolute pathname, nor can it contain any sequence of two dots (..).

init-args

Optional. There is no default.The arguments that should be passed to the init-entry point function. For more information about how the DHCP server parses this information, see the "The Init-Entry Extension Point" section.

init-entry

Optional. There is no default. The name of the init-entry point. If you set it, Network Registrar calls this function when the server loads the module and when the server shuts down. For more information about this entry point, see "The Init-Entry Extension Point" section.

lang

Required (set by create). There is no default. The language in which the extension or module is implemented. Tcl indicates that the module is a Tcl extension (tcl7.5). Dex indicates that the module is a shared object with C calling interfaces.

name

Required (set by create). There is no default. The name of the extension or module. Network Registrar uses this name to assign extensions or modules to extension points. Changing this property renames the extension.



Force-Lock

When you execute a nrcmd command, the program attempts to get an exclusive lock for the cluster to which it is connected. If it is unable to get an exclusive lock, it displays a warning. Without an exclusive lock, you can issue only the following commands: client, lease, zone add, help, and force-lock.

The force-lock command obtains an exclusive lock. Use this command with caution, because running more than one program that updates the Network Registrar database can cause database corruption.

If you use the force-lock command to unlock a cluster, the command writes the warning to the log file on the client machine, not on the cluster.

Example

To force an exclusive lock, enter:

nrcmd> force-lock

Help

The help command allows you to display the nrcmd program's online help.

  • If you enter the help command without any arguments, Network Registrar displays a list of all the commands.

  • If you specify the help command with an argument, Network Registrar displays the help page for the command of that name.

You can select the sections of the help page output by specifying the section names after the help cmd command. The section names are:

  • SYNOPSIS—The valid syntax for the command

  • DESCRIPTION—A textual description of the command behavior

  • EXAMPLES—Examples of the command usage

  • PROPERTIES—Descriptions of the features and properties

  • STATUS—Description of the status codes returned by this command

The syntax is:

help

help cmd [section ]

Examples

To print the list of commands, enter:

-> help 
100 Ok
 

To print the contents of the help man page, enter:

-> help help

100 Ok
 

To print the contents of the help command's synopsis, enter:

-> help help synopsis

100 Ok
SYNOPSIS
help 
help <cmd> [<section>...]

Import

The import command allows you to import lease information into the DHCP server configuration or import the contents of a BIND named.boot file into the DNS server configuration.

Import Leases

Before you can import leases, you must perform several configuration steps:


Step 1   Configure scopes in the DHCP server for the leases that you plan to import. For more information, see the "Scope" section.

Step 2   If the host names for the leases are to be dynamically entered into DNS as part of the import, configure zones in the DNS server to allow dynamic updates. For more information, see the "Zone" section.

Step 3   Set the DHCP server to import mode so that it will not respond to other lease requests during the lease importing. For more information, see the "Dhcp" section.



Note   For all the time fields, use either the number of seconds since midnight GMT January 1, 1970, or day, month, date, time, year format (Mon Apr 13 16:35:48 1998). For more information about the file formats, see the "Import and Export File Formats" section.

The syntax is:

import leases file


Note   Importing permanent leases fails if you have disabled the permanent leases option.

After you have imported the leases, take the DHCP server out of import mode so that it can respond to other lease requests.

Example

To import the file LeaseIn to the DHCP server, enter:

nrcmd> import leases LeaseIn

 

If the lease time in the import file is greater than the lease time that the client would have received if it were to acquire a lease using the DHCP server's existing configuration, the client is given the lesser lease time. In other words, suppose it is 2 p.m. and your scope is configured for a one hour lease. According to the file you are importing, the lease time will not expire until 5 p.m. After you import the file, the lease will expire at 3 p.m. and not at 5 p.m.

If your import file specifies a DNS zone name, the zone name will not be used when DNS is updated. If it specifies a host name, the host name will be used when DNS is updated, unless overridden by a host-name specification in a client or client-class entry.

The only way to indicate to the DHCP server that the client's host name should be placed in a zone other than the default associated with the scope is to specify that zone in a client or client-class entry.

Import Named.boot

BIND 4.x.x uses a boot file, called named.boot, to point the server to its database files. You can import your entire BIND 4.x.x configuration by using the import command. The import command does not import BIND 8.x.x named.config files.

The syntax is:

import named.boot file

Example

To import the file /etc/named.boot to the DNS server, enter:

nrcmd> import named.boot /etc/named.boot

 

Note   You should use UNIX style pathnames even when running the import command on Windows NT.

The previous example on Windows NT might look like this:

nrcmd> import named.boot c:/etc/named.boot

 

When a zone file contains an $INCLUDE directive, BIND searches for the include file relative to the directory specified by the directory directive in the named.boot file, whereas the nrcmd program searches for the include file relative to the directory containing the zone file being processed.

To avoid this problem, ensure that the BIND configuration uses absolute paths whenever specifying an include file in a zone file. If your zone files contain relative paths when specifying include files and the directory containing the zone file is not the same as the directory specified by the directory directive in the named.boot file, your configuration will not load properly. You will need to convert the relative paths in your zone files to absolute paths to import your BIND configuration into Network Registrar. An example of a configuration and how it might be fixed follows.

Directory Hierarchy

/etc/named.boot

/usr/local/domain/primary/db.example

/usr/local/domain/primary/db.include

/usr/local/domain/secondary

Configuration Files

/etc/named.boot:

# BIND searches for zone files and include files relative to

# /usr/local/domain

directory /usr/local/domain

# BIND finds zone file in /usr/local/domain/primary primary

example.com primary/db.example

# end of /etc/named.boot

/usr/local/domain/primary/db.example

# BIND searches for include file relative to /usr/local/domain

$INCLUDE primary/db.include

# end of /usr/local/domain/primary/db.example

To make the configuration loadable, change the relative path in the file db.example to an absolute path.

$INCLUDE primary/db.include

$INCLUDE /usr/local/domain/primary/db.include

Mapping Boot File Directives to Nrcmd

Table 2-24 lists and describes the boot file directives that are supported by the BIND 4.9.6 distribution and the corresponding nrcmd command syntax that is generated. Directives that Network Registrar does not support are marked with the word unsupported, and the directives that require no action from Network Registrar are marked with the word none.

Table 2-24 lists the BIND to nrcmd commands mappings.


Table 2-24: BIND to Nrcmd Command Mappings
BIND Nrcmd

directory new-directory

Not supported within the named.boot file parser

include file

Not supported within the named.boot file parser

primary domain-name-of-zone file

zone create domain-name-of-zone primary file=file

secondary domain-name-of-zone ip-addr-list [backup-file]

zone create domain-name-of-zone secondary ip-addr [,ip-addr...]

forwarders ip-addr-list

dns addForwarder ip-addr [ip-addr...]

slave

dns enable slave-mode

tcplist ip-addr-or-network-list

zone domain-name-of-zone enable restrict-xfer

zone domain-name-of-zone set restricted-set=ip-addr [,ip-addr...]

xfernets ip-addr-or-network-list

zone domain-name-of-zone enable restrict-xfer zone domain-name-of-zone set restricted-set=ip-addr [,ip-addr...]

max-fetch number

dns set xfer-client-concurrent-limit=number

domain local-domain-name

unsupported

cache domain-name file

unsupported

sortlist network-list

unsupported

stub domain ip-addr-list [backup-file]

unsupported

bogusns ip-addr-list

unsupported

check-names primary/secondary/response fail/warn/ignore

unsupported

options forward-only

dns enable slave-mode

options no-recursion

dns enable no-recurse

options no-fetch-glue

dns enable no-fetch-glue

options fake-iquery

None—Network Registrar supports only fake iquery

options query-log

unsupported

limit transfers-in number

dns set xfer-client-concurrent-limit=number

limit transfers-per-ns number

unsupported

limit datasize number

unsupported

limit files number

unsupported



Ldap

The ldap command allows you to associate remote LDAP servers with Network Registrar and set their attributes.

The syntax is:

ldap name create hostname [prop=value]

ldap name delete

ldap name show

ldap list

ldap listnames

Examples

To create the LDAP server object myserver with a host name of myserver.mycompany.com, enter:

nrcmd> ldap myserver create myserver.mycompany.com

 

To delete an ldap server object myserver, enter:

nrcmd> ldap myserver delete

 

To list the ldap server objects, enter:

nrcmd> ldap list

Ldap Features

Use the enable, disable, or get commands to enable, disable, or determine whether the feature has been set.

The syntax is:

ldap name disable feature

ldap name enable feature

ldap name unset feature

ldap name get feature

Table 2-25 lists and describes the ldap command features. After you enable a feature, you can set its properties.


Table 2-25: Ldap Command Features
Feature Description

can-create

Optional. The default is false. Enables you to create entries for the LDAP server. When you enable can-create, you must enable can-update as well.

can-query

Optional. The default is false. Enables you to define queries to the LDAP server.

can-update

Optional. The default is false. Enables you to specify the types of updates to the LDAP server.

limit-requests

Optional. The default is false. Enables you to limit the number of outstanding queries to the LDAP server. If you enable this feature you can set the max-request property.



Ldap Properties

Use the set, get, and unset commands to assign and retrieve values from the LDAP server's properties.

The syntax is:

ldap name get prop

ldap name set prop=value [prop=value]

ldap name unset prop

Table 2-26 lists and describes the ldap command properties.


Table 2-26: Ldap Command Properties
Property Description

connections

Specifies the number of connections that the server should make to a particular LDAP server. This is primarily a performance-tuning parameter. In some cases, more than one connection can improve overall throughput.

create-object-classes

Specifies the names of the object classes that are inherited by a newly-created entry in the directory.

create-string-dictionary

Creates a separate string dictionary to contain attributes with values not in the lease object. This allows the addition of attributes containing an arbitrary text string.

default-attribute-value

Allows you to specify a string that is assigned to any LDAP attributes, listed in the create or update dictionaries, that do not have their matching lease attribute present. These LDAP attributes can be listed in the create update dictionaries. If you specify no value, Network Registrar uses the string <default>.

dn-attribute

If the distinguished name (DN) of the LDAP object to update (or create) can be constructed from one of the lease attributes, the specified dn-attribute is formatted using the dn-format string to construct the object filter that specifies the LDAP server to be modified.

dn-create-format

Specifies the distinguished name (DN) for entry creation. A %s is required and is replaced with the value of the dn-attribute.

dn-format

Formats the dn-attribute. A %s is required and is replaced with the value of the dn-attribute.

hostname

The host name of the server to connect to. Network Registrar needs the host name for LDAP servers.

max-referrals

The limit on the number of LDAP referrals Network Registrar will follow when querying. A value of zero means "don't follow referrals."

max-requests

Limits any single LDAP connection to this number of outstanding queries. You may choose to limit the number of outstanding queries to improve performance. The DHCP server uses this configuration information when preparing client-entry queries.

password

The password of a user with access to the parts of the directory that DHCP will use. (LDAP servers can be configured to allow anonymous access, so this is optional.)

port

The LDAP server port to connect to.

preference

A positive integer. LDAP servers can be used in preference order: 1 is the highest preference value.

referral-attr

The name of the LDAP attribute that may indicate that an LDAP response is a referral. The referral may or may not contain the DN to query for. If the DN is present (the current server assumes this), it is used as the search path along with a wildcard search scope in the query that follows the referral. If not, the search path is built by formatting the data in the referral attribute with the referral filter, and the existing search scope is used.

referral-filter

If the referral attribute does not contain a DN, the referral-attribute's data is formatted with this filter expression to build a search path, and the existing search scope for the LDAP server is used.

search-filter

The filter to be applied in the query. A %s is required and is replaced by the value of the DN attribute.

search-path

The name of an object in the directory to use as a query's starting-point. The path and the scope together control the portion of the directory that are searched.

search-scope

The scope can be SUBTREE (all children of the search path will be searched), ONELEVEL (only one the immediate children of the base object will be searched), or BASE (only the base object will be searched).

timeout

The number of seconds the DHCP server should wait for a response to an individual query. After a query times out, the server may re-try another LDAP server connection, or drop the query.

threadwaittime

The interval (in milliseconds) at which each LDAP client connection polls for results, if it has outstanding queries or updates.

update-search-attribute

If the LDAP object's DN cannot be determined directly, the DHCP server must issue a query to retrieve the DN. In that case, the DHCP server uses these parameters to extract the data from a lease attribute (specified by the search-attribute), and formats it using the search-filter expression.

update-search-filter

Formats the update-search-attribute. A %s is required and is replaced with the value of the DN attribute.

update-search-path

The search filter (built using either the DN attribute or the search attribute) is used along with the path and scope to specify the LDAP object that should be updated.

update-search-scope

The search scope is used to specify the LDAP object that should be updated.

username

The distinguished name of an object with access to the parts of the directory that DHCP will use. (Because you can configure LDAP servers to allow anonymous access, this property is optional.)



The dictionary associates with the create-string-dictionary property can contain multiple pairs of LDAP attributes. Each pair is set using a separate setEntry command. For example, to assign different string values to the attributes givenname and carlicense, enter:

nrcmd> ldap test-server setEntry create-string-dictionary givenname="abcdefg"

 
nrcmd> ldap test-server setEntry create-string-dictionary carlicense="123-456"

Ldap Dictionaries

Use the setEntry, getEntry, and unsetEntry commands to set, query, and clear elements of the various dictionary properties in the LDAP server configuration. These dictionary properties provide a convenient mapping from string keys to string values.

The syntax is:

ldap name setEntry prop key=value

ldap name getEntry prop key=value

ldap name unsetEntry prop key


Note   An LDAP attribute can appear only once in each dictionary. A second setEntry command that supplies an existing key will replace that key.

Table 2-27 lists and describes the ldap command dictionary properties.


Table 2-27: Ldap Command Dictionary Method Properties
Properties Description

create-dictionary

Creates a dictionary that maps LDAP attributes to DHCP lease attributes. This property describes a set of attributes to be included when creating an new LDAP directory entry.

create-string-dictionary

Creates a string dictionary of attributes with literal values not contained in the DHCP lease object. You can then assign arbitrary text strings to these attributes. This property is useful if you want to search for the attributes using the text string.

env-dictionary

Controls whether additional LDAP attributes are retrieved along with client-entry attributes. If any of these are present in a query's results, their values are made available to scripts through the request's environment dictionary. The LDAP value is keyed by the value in the LDAP query env-dictionary.

query-dictionary

Controls the mapping between the names of LDAP attributes and client-entry attributes. The server attempts to retrieve all of the LDAP attributes specified in the dictionary. When a query succeeds, the values for any LDAP attributes that it returns are set in the corresponding client-entry attributes.

This property also controls the mapping of an LDAP attribute name to the embedded-policy. The LDAP attribute name associated with the embedded-policy value is used to create an embedded policy. If the server finds the particular LDAP attribute name, it decodes the attribute data as if it were an encoding of the client-embedded policy.

For more information about LDAP configuration, see the Network Registrar User's Guide.

update-dictionary

The dictionary that maps LDAP attributes to DHCP lease attributes. When an LDAP object is modified, each LDAP attribute that is present in this dictionary is set to the value of its corresponding DHCP lease attribute.



Examples

To configure a query-dictionary to search for the surname (sn) and use its data to specify the client's DHCP host name, enter:

nrcmd> ldap dirserver setEntry query-dictionary sn=host-name

 

To configure a query-dictionary to search for the first name (givenname) to use for the specific client-class name, enter:

nrcmd> ldap myserver setEntry query-dictionary givenname=client-class-name

 

To configure a query-dictionary to search for the locality name to use for the domain name, enter:

nrcmd> ldap myserver setEntry query-dictionary localityname=domain-name

 

To create a string-dictionary with an attribute named myattribute assigned to a string named my string, enter:

nrcmd> ldap myserver setEntry create-string-dictionary

myattribute="my string" 

Lease

The lease command allows you to view and manipulate the current DHCP leases in the cluster.

The syntax is:

lease ip-address activate

lease ip-address deactivate

lease ip-address delete-reservation

lease ip-address force-available

lease ip-address get-scope-name

lease ip-address macaddr

lease ip-address send-reservation

lease ip-address show

lease list

lease list -lansegment ip-address address-mask

lease list -macaddr mac-address

lease list -subnet ip-address address-mask

Table 2-28 describes the lease command actions. Table 2-29 describes properties that affect the lease list command.


Table 2-28: Lease Command Actions
Action Description

activate

Removes the deactivate flag from the lease, but does not change the status of a lease marked as unavailable.

deactivate

Prevents the lease from being given out or renewed, but does not change the state of the lease.

delete-reservation

Deletes an existing reservation from the DHCP server immediately without requiring a server reload. To delete the lease from the internal nrcmd database, you should follow this command with the scope name removeReservation command.

force-available

Makes a currently held lease available, even a lease marked as unavailable. Because using the force-available action may compromise the integrity of your IP address allocations, make sure that before you use the command the client holding the lease has stopped using the lease.

get-scope-name

Displays the scope to which this lease belongs.

list

Lists leases. The list can be limited by the properties described in Table 2-29.

macaddr

Displays the most recent MAC address associated with this lease. If no MAC address was ever associated with this lease (or if the lease has become unavailable), then Network Registrar displays the error message, "302 Not Found."

send-reservation

Sends an existing reservation to the server immediately without having to reload the server. Use this command in conjunction with the scope name addReservation command.

show

Displays the lease attributes for a specific address.



All lease command actions take effect immediately. You do not need to reload the server.


Table 2-29: Lease List Command Action Properties
Property Description

-lansegment

Lists all leases in a LAN segment. This includes all leases in primary scopes whose addresses and masks match ip-address and address-mask. It also includes all leases in secondary scopes whose primary scope's addresses and masks match ip-address and address-mask.

-macaddr

Lists all leases that are associated with the specified MAC address. Examples of acceptable formats for the MAC address are as follows:

  • 1,6,08:00:20:A4:EB:16

  • 08:00:20:A4:EB:16

  • 080020A4EB16

-subnet

Lists all leases in a subnet whose addresses and masks match ip-address and address-mask.



Example

To activate lease 192.168.1.9, enter:

nrcmd> lease 192.168.1.9 activate 

Using the Lease Reservation Commands

send-reservation

Observe the following conditions when using the send-reservation command:

  • Make sure the reservation already exists (at least in the nrcmd internal database).

  • While the scope in which the reservation exists in nrcmd must already exist in the DHCP server, the particular IP address does not have to have appeared in the ranges for that scope.

  • If you are using failover on the scope in which the reservation resides, issue the send-reservation command first to the backup and then to the main server. (Make sure that you have issued the scope add-reservation command to both systems first.)

Example

To create a reservation for IP address 192.168.1.9 and add it to the open cluster's database without reloading the DHCP server, enter these commands:

nrcmd> scope myscope addReservation 192.168.1.9 1,6,00:a0:24:2e:9c:20 

nrcmd> save 

nrcmd> lease 192.168.1.9 send-reservation 


Note   You should save the reservation (the second command in the example) to ensure that it is preserved across server reload because issuing the send-reservation command alone affects only the server's internal memory.

For more information about the scope name addReservation command, see the "Scope Reservation Method Commands" section.

delete-reservation

Observe the following conditions when using the delete-reservation command:

  • Make sure the reservation has already been removed from the nrcmd internal database.

  • If you are using failover on the scope in which the reservation resides:

    a. Issue the delete-reservation command to the backup server.

    b. Issue the delete-reservation command to the main server.

    c. Issue a scope removeReservation command to both systems.

Example

To create a reservation and send it to server 192.168.1.9, enter these commands:

nrcmd> lease 192.168.1.9 delete-reservation 

nrcmd> scope myscope removeReservation 192.168.1.9 1,6,00:a0:24:2e:9c:20 

nrcmd> save 


Note   You should save the results of this operation to ensure that it is preserved across server reload because issuing the delete-reservation command alone affects only the server's internal memory.

For more information about the scope name removeReservation command, see the "Scope Reservation Method Commands" section.

Reserving An Address That Is Currently Leased

It is possible to delete a reservation for one client and send a reservation for a second client, even though the first client still has the lease. The following example describes how Network Registrar behaves in this situation.

Assume that you set up a reservation and lease, as follows:

nrcmd> scope my-scope addReservation 204.253.96.180 1,6,01:02:03:04:05:06

nrcmd> save

nrcmd> lease 204.253.96.180 send-reservation

nrcmd> lease 204.253.96.180 activate

nrcmd> save

 

Client 1,6,01:02:03:04:05:06 does a DHCPDISCOVER and gets an offer for 204.253.96.180. The client then does a DHCPREQUEST and gets an ACK for the same IP address.

As time passes, client 1,6,01:02:03:04:05:06 does several DHCPREQUESTs that are renewals, which are acknowledged. Then, at some time prior to the expiration time of the lease by client 1,6,01:02:03:04:05:06 on 204.253.96.180, you terminate the reservation as follows:

nrcmd> lease 204.253.96.180 de-activate

nrcmd> scope my-scope removeReservation 204.253.96.180

nrcmd> save

nrcmd> lease 204.253.96.180 delete-reservation

Next you add a reservation for a different client for that IP address, even though the address is still leased to the first client:

nrcmd> scope my-scope addReservation 204.253.96.180 1,6,02:01:02:01:02:01

nrcmd> save

nrcmd> lease 204.253.96.180 send-reservation

nrcmd> lease 204.253.96.180 activate

nrcmd> save

 

Now you have an IP address that is leased to one client, but reserved for another. If the new client (1,6,02:01:02:01:02:01) does a DHCPDISCOVER prior to the original client (1,6,01:02:03:04:05:06) doing a DHCPDISCOVER, it will not get 204.253.96.180. Instead, it will receive a random IP address from the dynamic pool.

When the original client (1,6,01:02:03:04:05:06) sends its next DHCPREQUEST to renew the lease on 204.253.96.180, it will get a DHCPNAK. Generally, upon receipt of the not-acknowledged message, the client immediately sends a DHCPDISCOVER. On receipt of that DHCPDISCOVER, the DHCP server cancels the remaining lease time on its lease for 204.253.96.180.

After this, client 1,6,01:02:03:04:05:06 will be given whatever lease is appropriate for it: some reservation other than 204.253.96.180, some dynamic lease (if one is available), or nothing, if no dynamic leases are available.

When the new client 1,6,02:01:02:01:02:01 does a DHCPDISCOVER, it will get 204.253.96.180.

Although you could force the availability of a lease, as follows,

nrcmd> lease 204.253.96.180 force-available

 

that will not stop the original client (1,6,01:02:03:04:05:06) from using 204.253.96.180. Also, it will not prevent the new client (1,6,02:01:02:01:02:01) getting 204.253.96.180.

In other words, this means that making a reservation for a client is independent of the lease state (and actual lease client) of the IP address for which the reservation is made. This is as true of reservations made by the send-reservation command as it is of reservations made solely in nrcmd in the configuration database. Thus, making a reservation for one client will not cause another client to lose that lease right away, although it does cause that client to receive a NAK response the next time it contacts the DHCP server (which could be seconds or could be days). Additionally, the client that has reserved the IP address will not get it if some other client already has it; it will get some other IP address until the:

  • IP address it is supposed to receive is free

  • client sends a DHCPREQUEST as a renewal and receives a NAK response

  • client sends a DHCPDISCOVER

Lease Command Properties

Use get to display the values from the lease properties. These properties are read-only.

The syntax is:

lease ip-address get prop

Table 2-30 lists and describes the lease command properties.


Table 2-30: Lease Command Properties
Properties Description

address

The IP address of this lease.

client-dns-name

The DHCP server attempted (possibly successfully) to enter this name into the DNS server for this client. It is related to the client-host-name, but may not be identical due to name collisions in the DNS server database.

client-domain-name

The domain name specified (if any) into which to put the client's DNS name.

client-flags

A variety of flags relating to the client. For more information about these flags, see the "Client Flags" section.

client-host-name

The DNS name that the client requested the DHCP server place into the DNS server.

client-id

The client-id specified by the client, or one synthesized by the DHCP server for this client (if client-id-created-from-mac-address is set in the client-flags).

client-last-transaction-time

The time at which the client most recently contacted the DHCP server.

client-mac-addr

The MAC address which the client presented to the DHCP server.

client-os-type

Specifies the operating system of the leased client. If you have enabled failover, the main server transmits this value to the backup server. The syntax of this property's value is OS-name major.minor.

Other examples are: LANMAN Server, LANMAN Workstation, MAC OS, Microsoft Windows, Microsoft Windows 2000 Professional, Microsoft Windows 95, Microsoft Windows 9x, Microsoft Windows for Workgroups, Microsoft Windows NT Advanced Server, Microsoft Windows NT Server, Microsoft Windows NT Workstation 3.51, Microsoft Windows NT Workstation 4.0, Netware, and OS/2.


Note   This property is only used by the updateSms command and has no other purpose.

expiration

The time at which the lease will expire.

flags

Flags for the lease are either reserved or deactivated. The lease is reserved for some MAC address or the lease is de-activated, which means that it should not be used. Any clients that are using de-activated leases will receive a NAK on their next renewal attempt.

lease-renewal-time

The minimal time in which the client is expected to issue a lease renewal.

start-time-of-state

The time at which the state last changed to its current value. Use this property to determine when the lease was made unavailable.

state

The current state of the lease. See Table 2-32.



Client Flags

Table 2-31 describes the client lease command flags.


Table 2-31: Lease Command Client Flags
Flag Description

client-dns-name-up-to-date

The client-dns-name (A record) is current in the DNS server database.

client-id-created-from-mac-address

The client-id was created for internal use from the client-supplied MAC address. If this is true, the server will not report it.

dns-update-pending

A DNS operation is pending for this client.

reverse-dns-up-to-date

The reverse (PTR record) DNS entry is current in the DNS database.



The following flags are for internal use only: client-valid, client-fqdn-present, client-updates-name, clear-host-name, host-name-has-changed, and domain-name-has-changed.

States

Table 2-32 describes the client lease command states.


Table 2-32: Lease Command Client States
State Description

available

The lease is not currently leased by any client. Any client information is from the most recent client-to-lease or be-offered this lease.

expired

The client has not renewed the lease, and it expired. Upon expiration the DHCP server schedules the removal of the client's DNS information.

leased

The lease is currently leased to the client whose information appears in the lease.

offered

The lease is offered to the associated client. In many cases, the database is not written with information concerning offering a lease to a client, because there is no requirement to update stable storage with this information.

unavailable

The lease is unavailable. It was made unavailable because of some conflict. A ping attempt might have shown that the IP address was already in use by another client, or the DHCP server might have noticed another DHCP server handing out this lease.



Lease-notification

The lease-notification command allows you to receive notification when the number of available addresses in a scope is exceeded. You can specify the notification limit either as the number of free addresses or the percentage of free addresses. You can also specify who will receive e-mail notification.

The syntax is:

lease-notification available=number|percentage%
[config=config file] [leasing-only]
[
recipients=recipient[,recipient] [mail-host=name [errors-to=receipient]]]
[
scopes=scope name|address range[,scope name|address range,...]]

Although you can use the lease-notification command interactively, its primary use is as an automated command. For more information, see the "Running the Lease-notification Command Automatically on UNIX" section and the "Running the Lease-notification Command Automatically on Windows NT" section.

Examples

To specify scope 1 with an available value of 10% and e-mail recipients billy, joe, and jane, enter:

nrcmd> lease-notification available=10% scopes=scope1 recipients=billy,joe,jane 
mail-host=mailhost

 

To specify the range of scopes 192.32.1.0-192.32.1.255, the config file .nrNotification, the recipients admin, an available value of 13 leases, and the Windows NT mail host as mailhost, enter:

nrcmd> lease-notification scopes=192.32.1.0-192.32.1.255
config=/home/bob/.nrNotification recipients=admin@comco.com available=13
mail-host=mailhost

Note   If successful, the lease-notification command prints "100 OK" both before and after Network Registrar lists the addresses. The first "100 OK" means that the command is being processed (without rejection because of existing locks, licensing problems, or command syntax errors). The second "100 OK" indicates that the command successfully completed its processing.

Lease-notification Properties

Table 2-33 lists and describes the lease-notification command properties.


Table 2-33: Lease-notification Command Properties
Property Description

available

Specify either a number or percentage of available addresses. If the number or percentage of available addresses is equal to or less than the specified value for the scopes being checked, Network Registrar generates a report listing information about the scopes that reach or exceed the available value.

config

Specify a configuration file. If you do not specify a configuration file, Network Registrar searches for the default .nrconfig file. For more information about the search order, see the "Specifying the Config File" section.

errors-to

If you specify a mail-host, you may also specify the e-mail address of the sender of the e-mail in order to provide a return path for bounced e-mail. The default value is postmaster.

leasing-only

If you specify leasing-only, Network Registrar displays only the scopes that can offer leases. If failover is enabled, this includes scopes for which one of the following conditions applies:

  • The role is main and the failover state is NORMAL, COMM-INTERRUPTED, or PARTNER DOWN.

  • The role is backup and the failover state is COMM-INTERRUPTED or PARTNER DOWN.

mail-host

On Windows NT, you must specify a mail-host.

On UNIX, the mail host is generally already configured for the sendmail program. You can verify that your UNIX system is properly configured by issuing the command date | mail your-email-address and observing whether or not the date is e-mailed to you. If mail is not configured, you must specify a mail-host.

recipients

If you specify the e-mail addresses of one or more recipients, Network Registrar sends an e-mail report to those addresses. Otherwise, Network Registrar directs the report to standard output.

scopes

Specify the scopes either by their names or as a range or ranges of addresses. Network Registrar checks any scope containing any address that falls within the range of address. If you do not list any scopes or addresses, Network Registrar checks all scopes managed by the specified cluster.



Specifying the Config File

If you do not specify a config file, the lease-notification command looks for a default .nrconfig file in your current directory, then in your home directory, and finally in the AIC_INSTALL_PATH/conf directory. Network Registrar uses the first file it encounters.

Each line of the file must either begin with the character # (comment), a section header enclosed in square brackets, or a parameter=value pair or its continuation. Network Registrar strips leading white space from each line and ignores blank lines.

Specifying Clusters

You can specify clusters in a variety of ways and Network Registrar follows a precedence order. Any of the specific cluster specifications can override the default specification or previous specification:

    Cluster information for lease notification
    [lease-notification] 
    clusters=<clustername> <username> <password>...
    clusters=host1 admin, host2, 
    host3 admin3 passwd3

Note   You should separate the three-cluster arguments with spaces. For long lines you can use continuation lines, that is, you do not need to use continuation escape indicators.

You can optionally specify a username and password for the cluster. If you do not provide a username or password for a particular cluster, Network Registrar uses the last username or password listed. If you do not provide user names or passwords, Network Registrar uses the information from the command line -N and -P arguments, and then the NT Registry or environment variables AIC_NAME and AIC_PASSWORD.

If Network Registrar cannot find a username or password or the supplied username and password are incorrect, the lease-notification command issues a warning for that cluster.

Running the Lease-notification Command Automatically on UNIX

You can run the lease-notification command periodically by means of the cron(1) command by supplying crontab(1) with the command to run. For example, to run the lease-notification command at 00:15 and 12:15 (15 minutes after midnight and noon) Monday through Friday, specify the following command to crontab:

15 0,12 * * 1-5 . .profile; /opt/nwreg2/usrbin/nrcmd lease-notification available=10\% 
config=/home/jsmith/.nrconfig addresses=192.32.1.0-192.32.128.0 
recipients=jsmith,jdoe@example.com >/dev/null 2>&1 

 

You can perform crontab editing by running the UNIX crontab -e command. Set your EDITOR environment variable before running the command, unless you want to use ed(1). See the crontab(1) man page for additional details.

Note that you must supply the nrcmd command's full pathname on the crontab command line. You can determine the full pathname in your environment with the UNIX which nrcmd command.

Also note that when you run the nrcmd lease-notification command by means of crontab, the user environment variables AIC_CLUSTER, AIC_NAME, and AIC_PASSWORD are ignored. Because the command being run could be viewed by others, for security reasons, you should not provide the password through the -P option on the command line.

The cluster name, user, and password information for the cluster you want the nrcmd command to run from should be supplied in a .profile or other file in the home directory of the user running crontab -e, as shown in the following example:

AIC_CLUSTER=host1 
export AIC_CLUSTER
AIC_NAME=admin1
export AIC_NAME
AIC_PASSWORD=passwd1
export AIC_PASSWORD
 

The file must be read explicitly in the crontab entry with . .profile specification. Note that the first "." is the shell command that causes the file to be read and must be followed by white space. For notification on a different cluster, or clusters, than the one on which ncrmd is running, you need to specify the following information:

  • clusters to be checked in a config file as described in"Specifying the Config File" section.

  • fully specified pathname as in sample crontab entry at the beginning of this section.

You can prevent others from examining or changing the contents of the .profile and the configuration file you create by changing its permissions with the UNIX command chmod go-rw config_file.

Running the Lease-notification Command Automatically on Windows NT

Use the Scheduled Tasks service available in Windows NT Explorer under My Computer to schedule the nrcmd lease-notification command. If you do not find a Scheduled Tasks folder under My Computer, you will need to add this optional component from Microsoft Internet Explorer 4.0 or later, or use some third-party task scheduler. You can also use the at command to schedule the nrcmd lease-notification command. Put multiple entries into the at queue, one for each time of day at which you want to run the job.

License

The license command allows you to specify the license key for a cluster or to view the license key or the license's expiration date. Your license key is located on the back of the Cisco Network Registrar CD case. You need to enter your license the first time you configure any cluster.

  • If you have a permanent license, you will not see the license message again unless you move your cluster to another machine.

  • If you have an evaluation copy of Network Registrar, you have a license that will expire.

  • If you have an invalid or missing licensing key, you will not be able to configure or manage the Network Registrar servers. The servers themselves however, will continue to function normally.

  • If the license will expire in seven or fewer days, you will see a warning when you start Network Registrar.

The syntax is:

license set prop=value

license get prop

license show

Table 2-34 lists and describes the license command properties.


Table 2-34: License Command Properties
Properties Description

expiration

The expiration date of the license. Note that the date is read-only.

key

The license key.



Example

To set the license, you must run the nrcmd program in interactive mode, then exit and rerun the nrcmd program. To set the license to key 1234 abcd 5678 efgh, enter:

nrcmd -C cluster1 -N admin -P changeme 
nrcmd> license set key=1234-abcd-5678-efgh

100 Ok
nrcmd> exit

Option-datatype

The option-datatype command allows you to define DHCP option data types as required to accommodate devices from a variety of vendors. You can create a collection of standard DHCP option data types, such as IPADDR, BYTE and IPADDR_ARRAY, to support requirements for complex data types.

The syntax for creating, deleting, and listing option data type definitions is:

option-datatype name create

option-datatype name delete

option-datatype list

option-datatype listnames

where name is the name of the data type to be created or deleted.


Note   The option datatype name is case-insensitive.

Option-datatype Field Method Commands

You can define, undefine, and list individual fields within an option data type definition using the defineField, undefineField, and listField methods.

The syntax is:

option-datatype name defineField field-name position-number datatype [flags]

option-datatype name undefineField field-name

option-datatype name listFields

Table 2-35 describes the properties of the defineField and undefineField methods.


Table 2-35: Option-datatype Method Properties
Property Description

field-name

The name of the field to be defined or undefined within the option data type definition.

position-number

The position of the field being defined within the option data type definition.

datatype

A DHCP option data type currently supported by Network Registrar. This specifies the data type of the field being defined in the new option data type definition. It can be BOOL, BYTE, WORD, INT, UINT, STRING, IPADDR, BYTE_ARRAY, WORD_ARRAY, INT_ARRAY, UINT_ARRAY, or IPADDR_ARRAY. There is no default. For more information about types, see Table 2-36.

flags

One or more comma-separated strings specifying formatting of the data type. Supported flags are:

  • little-endian specifies lower-byte-first ordering, such as for Intel devices.

  • counted-array specifies that the data in an array field is preceded by a byte that gives the length of the array. This is valid only for an array type, such as IPADDR_ARRAY. See the "Policy Command Options" section for information about setting data for an array field.

  • exclude-from-dhcp-packet specifies that the data in this field should be excluded from the packet that the DHCP server sends the DHCP client.



Option Data Types

Table 2-36 lists the option data types supported by the nrcmd program.


Table 2-36: Option Data Types
Option Data Type Datatype Definition

boolean

BOOL

TRUE or FALSE

byte

BYTE

8-bit unsigned integer

word

WORD

16-bit unsigned integer

signed integer

INT

32-bit signed integer

unsigned integer

UINT

32-bit unsigned integer

string

STRING

ASCII text string

IP address

IPADDR

IP address in the form of a.b.c.d

byte array

BYTE_ARRAY

A sequence of bytes represented in the form xx[:xx] in which x is a hex character 0-9 or a-f. For example, to enter a series of four bytes containing the values 192, 168, 73 and 144, you would enter their hex values as "c0:a8:49:90." The ASCII string "ABCijk123" should be entered as "41:42:43:69:6a:6b:31:32:33."

word array

WORD_ARRAY

Array of 16-bit unsigned integers

signed array

INT_ARRAY

Array of 32-bit signed integers

unsigned array

UINT_ARRAY

Array of 32-bit unsigned integers

IP address array

IPADDR_ARRAY

Array of IP addresses



Option-datatype Read-only Feature

To complete the option data type definition process and to avoid further changes to the definition, enable the read-only feature. The syntax is:

option-datatype name enable read-only

To make subsequent changes to the option data type, disable the read-only feature:

option-datatype name disable read-only


Note   The read-only feature should be enabled for an option data type before it is used in a vendor-option command.

Option-datatype Example

There are four main steps to configure Network Registrar to support a device that expects to receive vendor-specific DHCP options from the DHCP server:

1. Define any necessary vendor-specific data types. Refer to the vendor's manual for the device and use the option-datatype command to create any new data types required for vendor-specific suboptions.

2. Create a vendor option. Locate the device's Class Identifier string (sent in Option 60 by the DHCP client device) in the vendor's manual. Then use the vendor-option command to create a vendor-specific DHCP option for the device.

3. Define all required suboptions. Suboptions must be assigned either vendor-specific option data types (created as Step 1) or else standard DHCP data types. Use the vendor-option command to map suboptions formats to their appropriate data types.

4. Set the values of the vendor option using the policy setVendorOption command.

The example that follows is based on the Intel Preboot Execution Environment (PXE) Specification, Version 2.0. For continuity and completeness, the example includes all three commands required to accomplish its task. Refer to the "Vendor-option" section and the "Policy" section for more information about those commands.


Step 1   Define vendor-specific option data types. The IntelPxE device expects several vendor-specific suboptions to be returned by the DHCP server. One such suboption is Suboption 8, which holds a set of IP addresses for boot servers available to the device. Suboption 8 has a distinct format and can be mapped into Network Registrar using the option-datatype command to create a option data type called "IntelPXE_odt_suboption_8," as follows:

nrcmd> option-datatype IntelPXE_odt_suboption_8 create 

nrcmd> option-datatype IntelPXE_odt_suboption_8 defineField boot_server_type 1 WORD 

nrcmd> option-datatype IntelPXE_odt_suboption_8 defineField boot_server_IP_list 2 
IPADDR_ARRAY

nrcmd> option-datatype IntelPXE_odt_suboption_8 enable read-only

 

Here Intel_PXE_odt_suboption_8 describes the format for Suboption 8 of an IntelPXE-compatible network device. Please note that several suboptions with different formats are required for an IntelPxE device. Each suboption should be mapped into Network Registrar using a separate set of option-datatype commands.

Step 2   Create vendor option. Once the suboption formats are mapped to vendor-specific option data types or to standard DHCP options, you are ready to create a vendor option for an IntelPxE device. The command

nrcmd> vendor-option IntelPXE_vso create "PXEclient:Arch:xxxxxx:UNDI:yyyzzz"
 

where "PXEclient:Arch:xxxxxx:UNDI:yyyzzz" exactly matches the string provided by the vendor as the Class Identifier (Option 60) for the device, creates the vendor option "IntelPXE_vso."

Step 3   Define all required suboptions. Suboption 8 is assigned to the option data type IntelPXE_odt_suboption_8 as follows:

nrcmd> vendor-option IntelPXE_vso defineSuboption suboption_8 8 IntelPXE_odt_suboption_8 
array 

 

Repeat this command for each suboption required for the device.

Step 4   Set the data of the vendor option by setting the values of each suboption. In this example, the policy named "network-1.2.3" is set for Suboption 8 of the vendor-specific DHCP option named "IntelPXE_vso" to have the following values:

   a. The boot server type field in the first array element is set to Type 2 (Microsoft Windows NT boot servers).

   b. The boot server address list field in the first array element is set to 192.168.25.4 and 192.168.25.5.

   c. The boot server type field in the second array element is set to Type 8 (HP OpenView boot server).

   d. The boot server address list field in the second array element is set to 192.168.25.6.

nrcmd> policy network-1.2.3 setVendorOption IntelPXE_vso {suboption_8[0]} 
boot_server_type 2 
nrcmd> policy network-1.2.3 setVendorOption IntelPXE_vso {suboption_8[0]}

boot_server_IP_list 192.168.25.4,192.168.25.5
nrcmd> policy network-1.2.3 setVendorOption IntelPXE_vso {suboption_8[1]} 
boot_server_type 8

nrcmd> policy network-1.2.3 setVendorOption IntelPXE_vso {suboption_8[1]} 
boot_server_IP_list 192.168.25.6 


Note   This reference guide follows the convention of using square brackets to indicate that an argument is optional. However, in this example the square brackets and the braces in {suboption_8[0]} are parts of the syntax required to specify the value of the array field.


Policy

The policy command allows you to configure DHCP policy configurations. A policy is a collection of DHCP option values that can be associated with a range of addresses in a scope, or with a specific client or client-class configuration.

The syntax is:

policy name create [prop=value]

policy name delete

policy name show

policy list

policy listnames

Example

To create the policy CompanyB, enter:

nrcmd> policy CompanyB create

Policy Features

You can enable, disable, or determine whether the feature has been set. You use the enable, disable, or get commands.

The syntax is:

policy name enable feature

policy name disable feature

policy name unset feature

policy name get feature

policy name show

Table 2-37 lists and describes the policy command features. For more information about lease time, see "Lease Times" section.


Table 2-37: Policy Command Features
Feature Description

allow-client-a-record-update

Allows the client to update the A record. If the client sets the flags in the FQDN option to indicate an A record update in the request, and if this feature is enabled (true), the server allows the client to do the A record update. Otherwise, the server does the A record update based on other server configurations. Default is true.

allow-dual-zone-dns-update

Causes the DHCP server to return the client FQDN option so that the client can perform an A record update itself. In addition, the server performs an A record update on the client's behalf. This is required to support certain DHCP deployments that represent their clients in two DNS zones. If both the allow-client-a-record-update feature and the allow-dual-dns-update feature are enabled, the allow-dual-dns-update feature takes precedence.

allow-lease-time-override

Clients may request a specific lease time. The server will not honor those requested lease times if this attribute is false. The server will not honor a client's lease time if the time is longer than the server's normal lease time. Optional. The default is true.

permanent-leases

Specifies that leases for this client should be permanently granted to requesting clients. Optional. The default is false.

split-lease-times

Controls whether the server uses the value of the server-lease-time property to determine the length of a lease, rather than using the lease time returned to the client. Optional. The default is false.



Policy Properties

Use the set and get commands to assign and retrieve values from the policy's properties.

The syntax is:

policy name get prop

policy name set prop=value

policy name unset prop

Table 2-38 lists and describes the policy command properties.


Table 2-38: Policy Command Properties
Property Description

bootp-reply-options

Optional. There is no default. A list of the names of options that should be returned in any replies to BOOTP clients. The options themselves do not have to have been configured in the same policy as the reply-options list; the server will search the hierarchy of policies for each option named in the list. For more information about this property, see the "Policy Reply Options" section.

boot-file

Optional. There is no default. Supplies the name of the executable file from which to boot or obtain configuration data. This property can also contain the following variable substitution values:

  • %@docsis-vers%. If you specify the %@docsis-vers% value, it is substituted with the DOCSIS version presented in the DHCP request packet's vendor-class-identifier option. This version can be either "docsis1.0" or "docsis1.1". If the vendor-class-id option is missing or does not contain a DOCSIS version string, the server substitutes the docsis-version-id-missing string. For more information about this string, see Table 2-13.

  • %@mac-addr%. If you specify the %@mac-addr% value, %@mac-addr% is substituted with the source MAC address, presented in the DHCP request packet.

dhcp-reply-options

Optional. There is no default. A list of the names of options that should be returned in any replies to DHCP clients. The options themselves do not have to have been configured in the same policy as the reply-options list; the server will search the hierarchy of policies for each option named in the list. For more information about this property, see the "Policy Reply Options" section.

grace-period

Optional. The default is 5 minutes. The length of time between the expiration of a lease and the time it is made available for re-assignment.

offer-timeout

Optional. The default is 2 minutes. If the server offers a lease to a client, but the offer is not accepted, the server will wait the specified number of minutes before making the lease available again.

packet-file-name

Optional. There is no default. The name of a boot file to be used in a client's boot process. The server returns this file name in the 'file' field of its replies. The packet-file-name cannot be longer than 128 characters.

This property can also contain the following variable substitution values:

  • %@docsis-vers%. If you specify the %@docsis-vers% value, it is substituted with the DOCSIS version presented in the DHCP request packet's vendor-class-identifier option. This version can be either "docsis1.0" or "docsis1.1". If the vendor-class-id option is missing or does not contain a DOCSIS version string, the server substitutes the docsis-version-id-missing string. For more information about this string, see Table 2-13.

  • %@mac-addr%. If you specify the %@mac-addr% value, %@mac-addr% is substituted with the source MAC address, presented in the DHCP request packet.

packet-server-name

Optional. There is no default. The host name of a server to use in a client's boot process. The server returns this file name in the sname field of its replies. The packet-server-name field cannot be longer than
64 characters.

packet-siaddr

Optional. There is no default. The IP address of the next server in a client's boot process. For example, this might be the address of a TFTP server used by BOOTP clients. The server returns this address in the siaddr field of its reply.

server-lease-time

Optional. There is no default. The time that the server believes the lease is valid. It may be useful to have the server consider leases leased for a longer period than the client in order to get more frequent client communication along with the stability of long lease times.

vendor-class-identifier

Optional. There is no default. This property is used by clients and servers to exchange vendor-specific information. The information is an opaque object of n octets, presumably interpreted by vendor-specific code on the clients and servers. The vendor is indicated in the vendor-class-identifier option.



Example

To set the grace period to three days for policy 168.1-net, enter:

nrcmd> policy 168.1-net set grace-period=3d

Policy Reply Options

When the server is getting ready to return option data to a client, it examines up to seven policies: the client's embedded policy, the client's policy, the client's client-class's embedded policy, the client's client-class's policy, the client's lease's scope's embedded policy, the client's lease's scope's policy, and the system default policy, in that order.

Then the server looks through the policies for a reply-options list. It looks for bootp- or dhcp-reply-options depending on the client. The server uses the first list it finds. For each option in the list, the server looks through all of the policies, in order, and returns the data from the first policy that has a matching option. There is no requirement that the data that the server returns must come from the same policy that the reply-options list came from. If the server finds a reply-options list, it looks for each option in the list individually, and searches all of the related policies if necessary.

There is also no requirement that the options mentioned in a reply-options list be present in the policy that contains the list. The nrcmd program allows you to type in a string, and that string can name any option. The Network Registrar GUI, however, presents a special dialog box for adding a reply-options property to a policy that restricts you to the options already configured in the policy. This is a GUI-only restriction; the server does not impose this restriction.

Policy Command Options

You can set individual option values with the setOption method, unset option values with the unsetOption method, and view option values with the getOption and listOptions methods. When you set an option value, the DHCP server replaces any existing value or creates a new one, as needed, for the given option name.


Note   For a list of all the DHCP options that you can configure, type the nrcmd program help dhcp-option command.

The syntax is:

policy name listOptions

policy name setOption option-name value

policy name getOption option-name

policy name unsetOption option-name

policy name setVendorOption vendor-option-name suboption-namesuboption-index field-name value

policy name unsetVendorOption vendor-option-name suboption-namesuboption-index field-name

policy name listVendorOptions [vendor-option-name]


Note   This reference guide follows the convention of using square brackets to indicate that an argument is optional. However, in this case the square brackets and the braces in are parts of the syntax required to specify the value of an array field.

Table 2-39 describes the policy command option methods.


Table 2-39: Policy Command Option Methods
Method Description

listOptions

Lists the options in the named policy.

setOption

Sets the option name and value to the specified policy. The format is option-name value. For example, dhcp-lease-time 3600.

getOption

Gets the value of the named option.

unsetOption

Removes the named option from the specified policy.

listVendorOptions

Lists data for all vendor options in the policy or lists data for a vendor option specified by name.

setVendorOption

Associates a vendor-supplied DHCP option with the specified policy and assigns a value to a specified suboption field. A suboption within a vendor-supplied DHCP option could be an array. Therefore, the suboption-index property is necessary, even though in most cases it will be set to 0. Similarly, a field in a suboption could have an array of data items. The values for such array items in a field should be specified in comma separated format. For more information about vendor options and suboptions, refer to the "Vendor-option" section.

unsetVendorOption

Deletes the association between a vendor-supplied DHCP option and the specified policy.



Table 2-40 describes the properties of the policy command option methods.


Table 2-40: Policy Command Option Method Properties
Property Description

option-name

Name of the standard DHCP option.

vendor-option-name

Name of the vendor-supplied DHCP option. This must have been created using the option-datatype and vendor-option commands.

suboption-name

Name of the suboption of the vendor-supplied DHCP option that is to be set or unset to the policy.

suboption-index

If the suboption is an array, then this is the index into the array. Otherwise, this defaults to 0. Note that there is no space between suboption-name and suboption-index.

field-name

Name of the field in the suboption that is to be set or unset. If the field is being set and contains an array of items, then the items must be specified in comma-separated format.



Examples

To specify the lease time in a scope, enter:

nrcmd> policy 168.1-net setOption dhcp-lease-time 608400

 

To list the standard DHCP options in a policy, enter:

nrcmd> policy 168.1-net listOptions

 

To list the vendor-specific options in a policy, enter:

nrcmd> policy 168.1-net listVendorOptions

 

To set data for vendor-specific options in a policy, enter:

nrcmd> policy 168.1-net setVendorOption IntelPXE_vso {suboption_8[0]} 
boot_server_type 200

This sets data for the boot_server_type field in item 0 of the array named suboption_8. You would enter the "200" as a string, and not convert it to hexidecimal.

To set data for vendor-specific options in a policy whose option datatype field is an array (in this example, boot_server_IP_list), use comma-separated values:

nrcmd> policy network-1.2.3 setVendorOption IntelPXE_vso {suboption_8[0]}

boot_server_IP_list 192.168.25.4,192.168.25.5
 

You would enter the "192.168.25.4,192.168.25.5" as a string, and not convert it to hexidecimal.

Policy Lease Time Method Commands

The setLeaseTime command allows you to set the values of lease times and the getLeaseTime command to display the value of a lease time.

The syntax is:

policy name setLeaseTime value

policy name getLeaseTime

The lease time is the value of the dhcp-lease-time DHCP option. You should specify the time in seconds.

Lease Times

A policy contains two lease times: the client lease time and the server lease time.

  • You set the client lease time through the setLeaseTime method. This lease time determines how long the client believes its lease is valid.

  • You set the server lease time through server-lease-time property. This lease time determines how long the server considers the lease valid. Note that the server lease time is independent of the lease's grace period; that is, the server will not allocate the lease to another client until after the server's lease period has expired and the grace period has expired.

You might want to establish these two different lease times if you want to retain information about clients' DNS names and yet have them renew their leases frequently. When you use a single lease time and it expires, the server no longer keeps that client's DNS name. If, however, you use a short client lease time and a longer server lease time, the client information is retained even after the client's lease has expired.


Caution Although Network Registrar supports the use of two lease times for special situations, it is generally recommended that you not use the server-lease-time property.

Remote-dns

The remote-dns command allows you to control the behavior of the DNS server when it is communicating with other DNS servers. Use it to either control incremental transfer or to send multiple records per TCP packet.

The syntax is:

remote-dns create ip-address [/maskbits] [feature=value]

remote-dns ip-address [/maskbits] delete

remote-dns list

remote-dns listnames

Table 2-41 lists and describes the remote-dns command properties.


Table 2-41: Remote-dns Command Properties
Property Description

ip-address

The address of the server or network to which this information applies.

maskbits

The number of bits in the addr attribute that are significant.



Example

To create the remote server description 128.103.1.1 with the net mask of 255.255.0.0, enter:

nrcmd> remote-dns create 128.103.1.1/16 

 

Note   Each net mask octet is composed of 8 bits. In the previous example, the first two octets are significant, thus the netmask is 16. If the first three octets are significant, the net mask is 24.

Remote-dns Features

You can enable, disable, or determine whether the feature has been set. You use the enable, disable, or get commands.

remote-dns name disable feature

remote-dns name enable feature

remote-dns name unset feature

remote-dns name get feature

Table 2-42 lists and describes the remote-dns command features.


Table 2-42: Remote-dns Command Features
Feature Description

ixfr

Optional. The default is false. Indicates whether or not a foreign server supports incremental transfer and should be queried for incremental (IXFR) before full (AXFR) when asking for zone transfers. Although unwittingly setting this to true is generally harmless, doing so may result in additional transactions to accomplish a zone transfer.

multirec

Optional. The default is false. Indicates whether or not a remote server can be sent zone transfers (AXFR) with multiple records in one TCP packet. Older DNS servers will crash when receiving such transfers, despite being allowed by the protocol.



Examples

When you enable or disable incremental transfer, Network Registrar looks for the most specific match. That is, it matches the machine with the longest mask. Use this feature to specify a group of servers with a single command.

To enable all DNS servers on this network to perform incremental transfer, enter:

nrcmd> remote-dns create 128.103.0.0/16 ixfr=true

 

To disable incremental transfers on all DNS servers on this network, enter:

nrcmd> remote-dns create 128.103.1.0/24 ixfr=false

Report

The report command allows you to produce a summary of dynamic and static IP address utilization for one or more clusters.

The syntax is:

report [config=config file][column-separator=character string] [dhcp-only]
[file=
output file][leasing-only][mask-bits=value][scope=name]

Table 2-43 lists and describes the report command properties.


Table 2-43: Report Command Properties
Property Description

column-separator

Specifies the character string you want used between the columns in the report. The default is a single space. If you specify whitespace, you must escape it with a back slash (\) and if it is entered on the command line, use quotes. For example,  ",\ ".

config

A file that allows you to specify multiple clusters.

dhcp-only

Specifies a summary of just the DHCP information.

file

Specifies the filename to which the report command writes the output. If you do not specify a filename, the report command writes to standard out. Note that, because it can take a long time to collect DNS data, you should not run the report command interactively when requesting DNS summaries.

leasing-only

Specifies that only scopes that can offer leases will appear in the report. If failover is enabled, this includes scopes for which one of the following conditions applies:

  • The role is main and the failover state is NORMAL, COMM-INTERRUPTED, or PARTNER DOWN.

  • The role is backup and the failover state is COMM-INTERRUPTED or PARTNER DOWN.

mask-bits

Specifies the number of high-order bits set in the network mask that define a logical subnet for which the report command produces a summary. The default value is 16.

If the value of the mask-bits is less than the default or less than the largest mask of any scope's mask in the report, the report command uses the default value.



Examples

To create a report of static DNS addresses and dynamic DHCP addresses, enter:

nrcmd> report

 

To create a report of only DHCP scopes, enter:

nrcmd> report dhcp-only


Note   If successful, the report command prints "100 OK" both before and after Network Registrar lists the addresses. The first "100 OK" means that the command is being processed (without rejection because of existing locks, licensing problems, or command syntax errors). The second "100 OK" indicates that the command successfully completed its processing.

Specifying Clusters

You can specify cluster in a variety of ways and Network Registrar follows a precedence order. Any of the specific cluster specifications can override the default specification or previous specification.

  • The default cluster (localhost)

  • The UNIX environment or Windows NT registry variable AIC_CLUSTER

  • The -C flag on the command line allows you to specify a single cluster.

  • The clusters property in the config file allows you to specify a group of clusters. For example, to specify clusters, enter the following in the config file:

nrcmd>

nrcmd>

nrcmd>

nrcmd>


Note   You should separate the three cluster arguments with spaces. For long lines use continuation lines, that is, you do not need to use continuation escape indicators.

You can optionally specify a user name and password for the cluster. If you do not provide a username or password for a particular cluster, Network Registrar uses the last username or password listed. If you do not provide user names or passwords, Network Registrar uses the information from the command line -N and -P arguments, and then the Windows NT Registry or environment variables AIC_NAME and AIC_PASSWORD.

If Network Registrar cannot find a username or password or the supplied username and password are incorrect, then the report command issues a warning for that cluster.

Displaying the Summary

The report command displays a row of information for each subnet specified by scope or deduced from DNS static address assignments outside of scopes.

The report command displays subtotal rows when more than one scope shares a common subnet, and for addresses that share a common subnet as specified by their address and mask. Note that the report command assumes that there is no overlap between static addresses and scope ranges.

For each scope or subnet, the report command displays the following information:

  • Network number, in hexadecimal

  • Number of bits in the subnet mask

  • Network number in canonical dotted-octet format

For each scope-specified subnet, the report command also displays the following values:

  • Cluster name

  • Scope role—If using failover, the value is MAIN or BACKUP.

  • Scope name

  • Addresses—Value is the total addresses within the scope ranges, addresses = free + dynamically leased + reserved + unavailable + de-activated + other available

  • Free, addresses within a range and in the available state and not flagged reserved or de-activated

  • % free, as a percentage of all addresses within scope ranges

  • Reserved—Value is within a range and flagged reserved, unless unavailable

  • Leased—Value is within a range and in the leased, offered expired, or released state, even if flagged reserved or de-activated

  • Dynamically leased—Value is within a range and in the leased, offered, or expired state, unless flagged reserved or de-activated

  • Unavailable, within a range and marked as unavailable by the server, regardless of flags

  • De-activated, within a range and flagged deactivated, unless unavailable

  • Other available, leases set aside for the failover partner to lease when communication is interrupted

  • Other reservations, addresses marked reserved which are not within a scope range

Addresses have both a current state and a pending state after their leases expire.The categories leased and unavailable represent current states. The categories dynamically leased, reserved, and deactivated may represent current or pending states. The category free represents the current state available minus addresses flagged reserved or de-activated. Note that, the leased category overlaps other categories and is not incorporated in the scope total.

For each subtotal row, the report command provides summaries of any scope values in the subnet, and additionally, displays the following values:

  • Total—all addresses in the subnet, excluding scopes with the failover status BACKUP unless the server is in PARTNER-DOWN state.

  • Static—addresses statically assigned.

  • Unallocated—addresses unallocated to DHCP scope ranges, otherwise reserved or statically assigned, and therefore available for static assignment or allocation to a scope range

At the end of the report, a grand total summarizes all the data in the subnets.

The rows and columns in Table 2-44 represent potential states and flags that an address within a DHCP scope can possess. The cells within the table indicate the category into which Network Registrar places addresses with a given state and flag. When multiple flags are set, deactivated takes priority over reserved, and reserved takes priority over any remaining flags for reporting purposes.

Table 2-44 lists and describes the potential states and flags for IP addresses.


Table 2-44: Potential States and Flags for IP Addresses
States Flags
None Reserved Deactivated Reserved and Deactivated

available

free

reserved

deactivated

deactivated

offered

dynamically leased, leased

dynamically leased, leased

deactivated,
leased

deactivated,
leased

leased

dynamically leased, leased

dynamically leased, leased

deactivated
leased

deactivated,
leased

expired

dynamically leased, leased

dynamically leased, leased

deactivated,
leased

deactivated,
leased

pending-
available

dynamically leased, leased

dynamically leased, leased

deactivated,
leased

deactivated,
leased

other-
available

other available

reserved

deactivated

deactivated

unavailable

unavailable

unavailable

unavailable

unavailable



Save

The save command allows you to validate and save your changes to the database.

The syntax is:

save

Validation

The nrcmd program performs validation when you create objects or modify their properties. It checks that you have supplied the required properties and that their values are valid. It also checks the validity of property values when you set them.

When you issue the save command, Network Registrar performs three levels of validation:

  • It checks that no other modifications have been made to these objects since they were read from the database.

  • It checks that all affected references are still valid.

  • It ensures that the proposed modifications would result in a valid server configuration.


Note   If you create dangling references by deleting a referred-to object, such as the policy for a scope or the client-class for a client, the nrcmd program does not alert you by displaying an error message.

Error Codes

All nrcmd commands return a status code as the first line of output. The first word on the line is a three-digit status code. The remaining output is the descriptive text. The first digit of the status code determines the class of the status.

Table 2-45 lists the save command status codes.


Table 2-45: Save Command Status Codes
Status Code Description

100 OK

Indicates a successful save.

3xx

Indicates an error in processing the command.

4xx

Indicates an error in communicating with the cluster database server.

5xx

Indicates an internal error in the command.



For more information about error codes, see "Error Codes."

Scope

The scope command allows you to create and edit DHCP scopes.

The syntax is:

scope name create addr mask [prop=value]

scope name delete

scope name changemask mask

scope list

scope listnames

scope name show

Examples

To create a scope, enter:

nrcmd> scope testScope create 192.168.1.0 255.255.255.0

 

You need to specify the scope mask in the base of 10 (such as 255.255.255.0), not in hexadecimal.

To delete a scope, enter:

nrcmd> scope testScope delete 

 

To list scopes, enter:

nrcmd> scope list

 

To change the mask of a scope, enter:

nrcmd> scope testScope changemask 255.255.254.0

 

The changemask action:

  • Changes the mask on the specified scope

  • Changes the primary-mask attribute on any secondary scopes to the newly specified scope

  • Iterates over all reservations in the scope and displays any that now fall outside the scope. If reservations fall outside the scope, the command returns "101, Ok with warnings" instead of "100 Ok."

  • Iterates over all ranges in the scope and displays any that have endpoints that now fall outside the scope. If range endpoints fall outside the scope, the command returns "101, Ok with warnings" instead of "100 Ok."

  • When the DHCP server is next reloaded, deletes any existing leases that fall outside the acceptable ranges for this scope and are not contained within the acceptable ranges of any other scope.

Scope Features

The scope command allows you to enable and disable features, and to determine whether a feature has been set. You use the enable, disable, or get commands. Note that the get command displays the value of the feature.

The syntax is:

scope name disable feature

scope name enable feature

scope name unset feature

scope name get feature

Table 2-46 lists and describes the scope command features.


Table 2-46: Scope Command Features
Feature Description

bootp

Optional. The default is disabled. Controls whether the server accepts BOOTP requests. If you want clients to always receive the same addresses, you need to reserve IP addresses for all your BOOTP clients. For information about how to reserve address, see "Scope Reservation Method Commands" section.

dhcp

Optional. The default is enabled. Controls whether the DHCP server will accept DHCP requests for this scope. You would only disable DHCP for a scope to cause the scope to be used for BOOTP exclusively, or to temporarily de-activate a scope.

dynamic-bootp

Optional. The default is disabled. Controls whether the server will accept dynamic BOOTP requests for this scope. Dynamic BOOTP requests are BOOTP requests that do not match a reservation, but can be satisfied from the available lease pool. To use this feature, you must also enable bootp.

dynamic-dns

Optional. The default is disabled. Controls whether the DHCP server should attempt to update a DNS server with the name and address information from leases that are granted to requesting clients.

failover

See scope properties.

ping-clients

Optional. The default is disabled. Controls whether the server should attempt to ping an address.

renew-only

Optional. There is no default. Controls whether to allow existing clients to re-acquire their leases, but not to offer any leases to new clients. Note that a renew-only scope will not change the client associated with any of its leases, other than to allow a client currently using an available IP address to continue to use it.

synthesize-name

Optional. The default is disabled. Controls whether the DHCP server automatically creates DNS host names for DHCP clients who do not provide names. The server can synthesize unique names for clients based on the synthetic-name-stem property.

trap-free-address-high

Optional. The default is enabled. Controls whether you set a trap on the scope to alert you when the number of free addresses gets high. When a scope is created, the trap-free-address-high feature is enabled and the trap-free-address-low feature, trap-free-address-low-threshold property, and trap-free-address-high-threshold property are undefined. For more information, see the "Trap" section. See also the trap-free-address-high-threshold property.

trap-free-address-low

Optional. The default is disabled. Controls whether you set a trap on the scope to alert you when the number of free addresses gets low. For more information, see the "Trap" section. See also the trap-free-address-low-threshold property.

update-dns-first

Optional. The default is disabled. Controls whether the DNS server is updated before the lease is granted.



Examples

To enable dynamic DNS update, enter:

nrcmd> scope testScope enable dynamic-dns

 

To disable dynamic BOOTP, enter:

nrcmd> scope testScope disable dynamic-bootp

Scope Properties

Use the set and get commands to assign and retrieve values from the scope's properties.

The syntax is:

scope name get prop

scope name set prop=value [prop=value...]

scope name unset prop

Table 2-47 lists and describes the scope command properties.


Table 2-47: Scope Command Properties
Property Description

addr

Optional. There is no default. The address of the subnet for which this scope contains addresses (read-only).

deactivated

Optional. There is no default. A scope that does not extend leases to clients. It treats all of the addresses in its ranges as if they were individually deactivated.

dns-rev-server-addr

Optional. There is no default. The address of the reverse DNS server for the zone into which the server should add PTR records.

dns-reverse-zone-name

Optional. There is no default. The name of the inverse (in.addr.arpa) zone that is updated with PTR and TXT records.

dns-server-addr

Optional. There is no default. The IP address of the primary DNS server on which the forward zone resides.

dns-zone-name

Optional. There is no default. The name of the DNS zone to which a DHCP client's host name should be added (A record).

failover

Controls whether the server uses failover. It has three possible states. For more information, see the "Failover Property States" section.

failover-backup-server

String representing the DNS name of the backup server associated with this LAN segment. If the DNS name resolves to the IP address of the current server, then this server operates as the backup server for this scope. It is an error if the names of both the main and backup server resolve to the IP addresses that reside on the same server.

If the backup server is not configured on this scope or in the server-wide default, then this server is considered to be the main server for this scope.

failover-main-server

String representing the DNS name of the main server associated with this LAN segment. If the DNS name resolves to the IP address of the current server, then this server operates as the main server for this scope. It is an error if the names of both the main and backup server resolve to the IP addresses that reside on the same server.

If the main-server is not configured on this scope or in the server-wide default, then this server is considered to be the main server for this scope.

failover-new-backup-percentage

The percentage of available addresses that the main server should send to the backup server. If it is defined for a scope, it must be defined for the scope in the main server. If it is defined in a backup server, it is ignored (to enable copying of configurations). If it is defined, the defined value overrides the server defined values for failover-backup-percentage and failover-dynamic-bootp-backup-percentage, and the value defined here is the value that is used for this scope, whether or not this scope supports dynamic-bootp. If it is defined as zero (0), then no addresses are sent to the backup server. Because zero is a significant value, once defined, this parameter must be unset in order for this scope to utilize the server-wide default values for failover-backup-percentage or failover-dynamic-bootp-backup-percentage.

mask

Optional. There is no default. The mask associated with the scope's network address (read-only).

ping-timeout

Optional. There is no default. The number of milliseconds the DHCP server should wait for ping responses. If you make this value too large, you will slow down the lease offering process. If you make this value too small, you will reduce the effectiveness of pinging addresses before offering them. Three hundred milliseconds is a frequent compromise.

policy

Optional. There is no default. The name of the policy associated with this scope.

primary-addr

Optional. There is no default. The IP address of the primary scope for this (secondary) scope.

primary-mask

Optional. There is no default. The subnet mask of this scope's primary scope (if this is a secondary scope).

primary-scope

Optional. There is no default. The primary scope for this (secondary) scope. Setting the value of the primary-scope property on a scope designates the scope as being secondary to another scope. To remove the status of secondary from the scope (that is, to promote it to being a primary scope), you must unset the primary-scope property. You need to specify a primary scope if you have multiple logical subnets on the same physical network segment and if you allow DHCP to offer addresses from any of the subnets.

selection-tags

Optional. There is no default. The list of selection criteria associated with a scope. The scope compares a client's selection criteria to this list to determine whether the client can obtain a lease from the scope.

synthetic-name-stem

Optional. There is no default. The prefix of the default host name to use if clients do not supply host names.

trap-free-address-reset

Optional. There is no default. Sets the number or percentage of the reset value for the free-address trap on this scope. For more information, see the "Trap" section.

trap-free-address-high-threshold

Optional. There is no default. Sets the number or percentage threshold for the free-address trap on this scope. The high threshold must be greater than or equal to the low threshold. For more information, see the "Trap" section. See also the trap-free-address-high feature.

trap-free-address-low-threshold

Optional. There is no default. Sets the number or percentage threshold for the free-address trap on this scope. The low threshold must be less than or equal to the high threshold. For more information, see the "Trap" section. See also the trap-free-address-low feature.

update-dns-for-bootp

Optional. The default is enabled. If the server is replying to a BOOTP request and is offering a lease from a scope that is configured to perform DNS updates, it will check this property before beginning the DNS update. This property allows you to prevent DNS updates for BOOTP clients while allowing updates for DHCP clients.



Failover Property States

The failover property has three possible states:

If more than one scope on the same LAN segment is scope-enabled for failover, then the main and backup servers must be identical for each. It is an error for one scope on a LAN segment to be scope-enabled and another to be scope-disabled, unless the other scope has failover enabled server-wide then no error occurs.

Note   If you set the scope property failover-backup-percentage explicitly, Network Registrar uses it, even if the value of the failover property is use-server-settings.

Examples

To set the name of the reverse zone, enter:

nrcmd> scope testScope set dns-reverse-zone-name=10.in-addr.arpa.

 

To get the DNS zone name, enter:

nrcmd> scope testScope get dns-zone-name

Scope Lease Method Commands

The scope lease method commands allow you to change unavailable leases in a scope to available and to list leases in a scopes. The syntax is:

scope name clearUnavailable

scope name listLeases

Table 2-48 describes the scope command lease methods.


Table 2-48: Scope Command Lease Methods
Method Description

clearUnavailable

Moves all unavailable leases in a scope to "available."

listLeases

Lists the leases in the named scope. This list can be very long.



Scope Range Method Commands

The scope range method commands allow you to add, remove and list ranges of addresses of a scope. You can specify the start and end values as host numbers or IP addresses. Note that the start and end values must fall within the network addresses as defined by the scope address and the network mask attributes.

  • If adding addresses to a scope creates a continuous set of addresses, Network Registrar merges the current list of ranges, if possible.

  • If deleting a range of addresses creates a discontinuous set of addresses, Network Registrar modifies or splits the existing ranges, if necessary.

The syntax is:

scope name addRange start end

scope name listRanges

scope name removeRange start end

Table 2-49 lists and describes the scope command range methods.


Table 2-49: Scope Command Range Methods
Method Description

addRange

Adds a range of addresses to the named scope.

listRanges

Lists the available addresses in the named scope.

removeRange

Removes the range of available addresses in the named scope.



Examples

To add a range, enter:

nrcmd> scope testScope addRange 192.168.1.10 192.168.1.20

 

To delete a range, enter:

nrcmd> scope testScope removeRange 192.168.1.10 192.168.1.15

Scope Reservation Method Commands

The scope command with the name argument allows you to add, delete, or list the reservations on the named scope.

The syntax is:

scope name addReservation ipaddr macaddr

scope name listReservations

scope name removeReservation [ipaddr|macaddr]

Table 2-50 lists and describes the scope command reservation methods.


Table 2-50: Scope Command Reservation Methods
Method Description

addReservation

Adds the reservation to the named scope.

listReservations

Lists the reservations in the named scope.

removeReservation

Deletes a reservation from the named scope.



Examples

To add a reservation, enter:

nrcmd> scope testScope AddReservation 192.168.1.10 1,6,00:a0:24:2e:9c:20

 

To remove a reservation, enter the following, specifying either the client's MAC or IP address:

nrcmd> scope testScope removeReservation 192.168.1.10 

 

Tips You can use the lease name send-reservation command to send the reservation immediately to the server without reloading it. For more information, see the "Lease" section.

Scope-Policy

The scope-policy command allows you to configure DHCP embedded policies for scopes. A scope-policy is a policy object embedded within (and limited to) a scope object. Each scope may contain option data within its embedded policy, and may refer to a named policy with more option data, such as a router IP address.

Embedded scope-policies are implicitly created and deleted when you create or delete the corresponding scopes. You manipulate the scope-policy using the name of the scope to which the embedded policy is attached.

Scope-Policy Features

You can enable, disable, or determine whether the feature has been set. You use the enable, disable, or get commands.

The syntax is:

scope-policy scope-name enable feature

scope-policy scope-name disable feature

scope-policy scope-name delete

scope-policy scope-name unset feature

scope-policy scope-name get feature

scope-policy scope-name show

Table 2-51 lists and describes the scope-policy command features. For more information about lease time, see "Lease Times" section.


Table 2-51: Scope-Policy Command Features
Feature Description

allow-lease-time-override

Optional. There is no default. Clients may request a specific lease time. The server does not honor those requested lease times if this attribute is false. The server does not honor a client's lease time if the time is longer than the server's normal lease time.

allow-dual-zone-dns-update

Causes the DHCP server to return the client FQDN option so that the client can perform an A record update itself. In addition, the server performs an A record update on the client's behalf. This is required to support certain DHCP deployments that represent their clients in two DNS zones. If both the allow-client-a-record-update feature and the allow-dual-dns-update feature are enabled, the allow-dual-dns-update feature takes precedence.

permanent-leases

Optional. There is no default. Specifies that leases for this scope-policy should be permanently granted to requesting clients.

split-lease-times

Optional. There is no default. Controls whether the server uses the value of the server-lease-time property to determine the length of a lease, rather than using the lease time returned to the client.



Scope-Policy Properties

Use the set and get commands to assign and retrieve the values of scope-policy command properties.

The syntax is:

scope-policy scope-name get prop

scope-policy scope-name set prop=value

scope-policy scope-name unset prop

The unset command unsets the specified property. The delete command (scope-policy scope-name delete) "unsets" all the properties and features of the scope policy.

Table 2-52 lists and describes the scope-policy command properties.


Table 2-52: Scope-Policy Command Properties
Property Description

bootp-reply-options

Optional. There is no default. A list of the names of options that should be returned in any replies to BOOTP clients. The options themselves do not have to have been configured in the same scope-policy as the reply-options list; the server will search the hierarchy of client-policies for each option named in the list. For more information about this property, see the "Scope-Policy Reply Options" section.

boot-file

Optional. There is no default. Supplies the name of the executable file from which to boot or obtain configuration data. This property can also contain the following variable substitution values:

  • %@docsis-vers%. If you specify the %@docsis-vers% value, it is substituted with the DOCSIS version presented in the DHCP request packet's vendor-class-identifier option. This version can be either "docsis1.0" or "docsis1.1". If the vendor-class-id option is missing or does not contain a DOCSIS version string, the server substitutes the docsis-version-id-missing string. For more information about this string, see Table 2-13.

  • %@mac-addr%. If you specify the %@mac-addr% value, %@mac-addr% is substituted with the source MAC address, presented in the DHCP request packet.

dhcp-reply-options

Optional. There is no default. A list of the names of options that should be returned in any replies to DHCP clients. The options themselves do not have to have been configured in the same scope-policy as the reply-options list; the server will search the hierarchy of client-policies for each option named in the list. For more information about this property, see the "Scope-Policy Reply Options" section.

grace-period

Optional. There is no default. The length of time between the expiration of a lease and the time it is made available for re-assignment.

offer-timeout

Optional. There is no default. If the server offers a lease to a client, but the offer is not accepted, the server will wait the specified number of minutes before making the lease available again.

packet-file-name

Optional. There is no default. The name of a boot file to be used in a client's boot process. The server returns this filename in the "file" field of its replies. The packet-file-name cannot be longer than 128 characters.

This property can also contain the following variable substitution values:

  • %@docsis-vers%. If you specify the %@docsis-vers% value, it is substituted with the DOCSIS version presented in the DHCP request packet's vendor-class-identifier option. This version can be either "docsis1.0" or "docsis1.1". If the vendor-class-id option is missing or does not contain a DOCSIS version string, the server substitutes the docsis-version-id-missing string. For more information about this string, see Table 2-13 in this guide.

  • %@mac-addr%. If you specify the %@mac-addr% value, %@mac-addr% is substituted with the source MAC address, presented in the DHCP request packet.

packet-server-name

Optional. There is no default. The host name of a server to use in a client's boot process. The server returns this filename in the sname field of its replies. The packet-server-name field cannot be longer than
64 characters.

packet-siaddr

Optional. There is no default. The IP address of the next server in a client's boot process. For example, this might be the address of a TFTP server used by BOOTP clients. The server returns this address in the siaddr field of its reply.

server-lease-time

Optional. There is no default. The time that the server believes the lease is valid. It may be useful to have the server consider leases leased for a longer period than the client to get more frequent client communication along with the stability of long lease times.

vendor-class-identifier

Optional. There is no default. This property is used by clients and servers to exchange vendor-specific information. The information is an opaque object of n octets, presumably interpreted by vendor-specific code on the clients and servers. The vendor is indicated in the vendor-class-identifier option.



Example

To set the grace period to three days for scope-policy 168.1-net, enter:

nrcmd> scope-policy 168.1-net set grace-period=3d

Scope-Policy Reply Options

When the server is getting ready to return option data to a client, it examines up to seven policies: the client's embedded policy, the client's policy, the client's client-class's embedded policy, the client's client-class's policy, the client's lease's scope's embedded policy, the client's lease's scope's policy, and the system default policy, in that order.

Then, the server looks through the policies for a reply-options list. It looks for bootp- or dhcp-reply-options depending on the client. The server uses the first list it finds. For each option in the list, the server looks through all of the policies, in order, and returns the data from the first policy that has a matching option. There is no requirement that the data that the server returns must come from the same policy that the reply-options list came from. If the server finds a reply-options list, it looks for each option in the list individually and searches all of the related policies if necessary.

There is also no requirement that the options mentioned in a reply-options list be present in the scope-policy that contains the list. The nrcmd program allows you to type in a string, which can name any option. The Network Registrar GUI, however, presents a special dialog box for adding a reply-options property to a scope-policy that restricts you to the options already configured in the scope-policy. This is a GUI-only restriction; the server does not impose this restriction.

Scope-Policy Option Method Commands

You can set individual option values with the setOption command, unset option values with the unsetOption command, and view option values with the getOption and listOptions commands. When you set an option value the DHCP server replaces any existing value or creates a new one, as needed, for the given option name.


Note   For a list of all the DHCP options that you can configure, enter the nrcmd program help dhcp-option command.

The syntax is:

scope-policy scope-name listOptions

scope-policy scope-name setOption option-name value

scope-policy scope-name getOption option-name

scope-policy scope-name unsetOption option-name

scope-policy scope-name setVendorOption vendor-option-name suboption-namesuboption-index field-name value

scope-policy scope-name unsetVendorOption vendor-option-name suboption-namesuboption-index field-name

Table 2-53 lists and describes the scope-policy command options.


Table 2-53: Scope-Policy Command Option Methods
Property Description

listOptions

Lists the options in the named scope-policy.

setOption

Sets the option name and value to the specified scope-policy. The format is optname value. For example, dhcp-lease-time 3600.

getOption

Gets the value of the named option.

unsetOption

Removes the named option from the specified scope-policy.

setVendorOption

Associates a vendor-supplied DHCP option with the specified policy and assigns a value to a specified suboption field. A suboption within a vendor-supplied DHCP option could be an array. Therefore, the suboption-index property is necessary, even though in most cases it will be set to 0. Similarly, a field in a suboption could have an array of data items. The values for such array items in a field should be specified in comma separated format. For more information about vendor options and suboptions, refer to the "Vendor-option" section.

unsetVendorOption

Deletes the association between a vendor-supplied DHCP option and the specified policy.



Table 2-54 describes the properties of the scope-policy option method commands.


Table 2-54: Scope-Policy Option Method Properties
Property Description

option-name

Name of the standard DHCP option.

vendor-option-name

Name of the vendor-supplied DHCP option. This must have been created using the option-datatype and vendor-option commands.

suboption-name

Name of the suboption of the vendor-supplied DHCP option that is to be set or unset to the policy.

suboption-index

If the suboption is an array, then this is the index into the array. Otherwise, this defaults to 0. Note that there is no space between suboption-name and suboption-index.

field-name

Name of the field in the suboption that is to be set or unset. If the field is being set and contains an array of items, then the items must be specified in comma-separated format.



Examples

To specify a router on a scope-policy, enter:

nrcmd> scope-policy 168.1-net setOption routers 168.1.96.180

 

To list the options in a scope-policy, enter:

nrcmd> scope-policy 168.1-net listOptions

Scope-Policy Lease Time Method Commands

The setLeaseTime command allows you to set the values of lease times and the getLeaseTime command to display the value of a lease time. The syntax is:

scope-policy scope-name setLeaseTime value

scope-policy scope-name getLeaseTime

The lease time is the value of the dhcp-lease-time DHCP option. You should specify the time in seconds.

Lease Times

A scope-policy contains two lease times: the client lease time and the server lease time.

  • You set the client lease time through the setLeaseTime method. This lease time determines how long the client believes its lease is valid.

  • You set the server lease time through server-lease-time property. This lease time determines how long the server considers the lease valid. Note that the server lease time is independent of the lease's grace period; that is, the server will not allocate the lease to another client until after the server's lease period has expired and the grace period has expired.

You might want to establish these two different lease times if you want to retain information about clients' DNS names and yet have them renew their leases frequently. When you use a single lease time and it expires, the server no longer keeps that client's DNS name. If, however, you use a short client lease time and a longer server lease time, the client information is retained even after the client's lease has expired.


Caution Although Network Registrar supports the use of two lease times for special situations, it is generally recommended that you not use the server-lease-time property.

Scope-selection-tag

The scope-selection-tag command allows you to define tags that are added to the scope selection tag list. After you have defined scope selection tags you can associate them with scopes, clients, and client-classes.


Note   If you delete a selection tag, Network Registrar removes it from the selection tag list, but does not remove it from any existing scope, client, or client-class configurations.

The syntax is:

scope-selection-tag name create

scope-selection-tag name delete

scope-selection-tag list

Examples

To create the scope selection tag internal, enter:

nrcmd> scope-selection-tag internal create

 

To delete the scope selection tag internal, enter:

nrcmd> scope-selection-tag internal delete

 

To list the scope selection tags, enter:

nrcmd> scope-selection-tag list

Number of Scope Selection Tags

Network Registrar limits you to a total of 30 scope selection tags. When the DHCP server configures itself, it checks the number of scope selection tags defined for any network. A network in this context is the aggregation of all of the scopes that are related to a particular subnet. This includes all of the scopes that belong together (because they share a common network number and subnet mask) and all of the scopes that are related to one of these through the use of the primary scope reference. Thus, within all of the scopes that make up a network, there can be no more than 30 scope selection tags.

When the DHCP server reads a client entry (from the local database or from LDAP), the server checks its scope selection inclusion and exclusion criteria against the scope selection tags defined for the scopes on this network. If the client entry references tags that are not present in any scope in the network, then how the server handles the tags depends on whether the reference is to included or excluded tags. If the reference is for excluded tags, then the tag will have no effect. If the reference is for included tags, then the server determines that there is no acceptable scope on that network for this client.

Server

The server command allows you to affect the behavior of the server. After you have used the server command or any other time you have changed the server's configuration, you need to reload the server. Use the server command or the Network Registrar GUI to reload the server.

Server Commands

The syntax is:

server [DNS|DHCP|TFTP] cmd

server DHCP setPartnerDown other-server name {date}

server DHCP getRelatedServers [column-separator=string]

Table 2-55 lists and describes the arguments to the server commands.


Table 2-55: Server Command Arguments
Command Description

disable

Disables the server.

enable

Enables the server.

getHealth

Gets the specified server's current health. A return of 0 indicates that the server is not running. Values of 1 through 10 indicate how well the server is running, with 10 being the best.

getRelatedServers

Reports the status of the connection between the server and its DNS, LDAP, or failover servers. For more information, see the "getRelatedServers" section.

getStats

Gets the specified server's current statistics.

serverLogs

Sets or changes nlogs, the number of server logs, and logsize, the size of the server logs. Valid values for nlogs are 1 to 100. The value of logsize is specified in bytes, and the optional suffixes K and M scale the specified value by 1000 or 1,000,000 respectively. Valid values for logsize are from 10000 to 500000000 (or 10K to 500M) bytes. The server agent must be restarted for the changes to take effect.

reload

Causes the specified server to be stopped and then immediately restarted. When the server restarts, it rereads all of its configuration information and its previously saved state information and then begins operating.

setDebug

Sets the debugging level and the location of the debug messages. You can specify either MLOG or WINDOW as locations. The default location is MLOG.

setPartnerDown

Notifies one DHCP server that another DHCP is down and moves all appropriate scopes into the PARTNER-DOWN state. For more information, see the "setPartnerDown" section.

start

Starts the specified server (DNS, DHCP, or TFTP).

stop

Stops the specified server (DNS, DHCP, or TFTP).

unsetDebug

Turns off debugging output.

updateSms

Causes the DHCP server to perform System Management Server (SMS) network discovery. You must first enable the DHCP sms-network-discovery property and set the sms-library-path and sms-site-code properties. For more information, see the "Dhcp Properties" section.



Examples

To stop the DNS server, enter:

nrcmd> server DNS stop

 

To start the DHCP server, enter:

nrcmd> server DHCP start

 

To display the health of the DHCP server, enter:

nrcmd> server DHCP getHealth

 

To set the server to generate up to 7 log files of 5 million bytes each, enter:

nrcmd> server DNS serverLogs nlogs=7 logsize=5M

 

To enable SMS network discovery, enter these commands:

nrcmd> dhcp set sms-network discovery 1

nrcmd> server DHCP updateSms

getRelatedServers

The getRelatedServers command allows you to create a report on the connection status of the other servers associated with this DHCP server. Information is reported for DNS, LDAP, and failover-associated DHCP servers.

The syntax is:

server DHCP getRelatedServers [column-separator=string]

Network Registrar displays the columns sorted by type, name, and IP address. Table 2-56 describes the report output.


Table 2-56: GetRelatedServers Report
Column Description

Type

Main, Backup, DNS, or LDAP

Name

DNS host name

Address

IP address in dotted octet format

Requests

Number of outstanding requests or two dashes (--) if not applicable

Communications

OK or INTERRUPTED. Information about DHCP and DNS servers that a DHCP server has tried to update

localhost State

Failover state of this server or two dashes (--)

Partner State

Failover state of the associated failover server or two dashes (--)



setPartnerDown

The setPartnerDown command allows you to notify a DHCP server that a failover server associated with the DHCP server has been verified to be down. When you run the setPartnerDown command all of the scopes in this server, which are running failover with the partner server, move into PARTNER-DOWN state.

When you use the setPartnerDown command, you can specify a date and time, which represents a value equal to or later than the last known data and time the partner server could have been operational. If you do not specify a value, Network Registrar uses the current date and time.

You might want to specify a value on this command to shorten the waiting period associated with entering PARTNER-DOWN state. In particular, IP addresses that were available in the partner server cannot be allocated to different DHCP clients until a waiting period equal to the maximum client lead time has passed. For more information about the maximum-client-lead-time, see the "failover-maximum-client-lead-time" section.


Caution Make sure that the partner server is really down before issuing the setPartnerDown command.

The syntax is:

server DHCP setPartnerDown other-server name {date}

The following are valid values:

  • - num unit—Specify the date as -num unit (a time in the past). The num is a decimal number, and unit is one of s, m, h, d, w, in which s is seconds, m is minutes, h is hours, d is days and w is weeks. For example -3d for three days.

  • date—Specify the date as month (name or its first three letters), day, hour (24 hour) year (fully specified year or last two digits). For example, Jun 30 20:00:00 1998.

If you specify 98 or 99, Network Registrar assumes 1998 or 1999. If you specify a lower number, such as 05 or 10, Network Registrar assumes 2005 or 2010.

Note   Wherever you specify a date and time using the nrcmd command, you should enter the time that is local to the nrcmd process. This means that, if the server is running in different time zone than your nrcmd process, you should disregard the timezone where the server is running and use local time instead.

Examples

To notify the backup server that its main server is down now, enter:

nrcmd> server DHCP setPartnerDown main.mycompany.com 

 

To notify the backup server that its main server went down at 12 midnight on October 31, 2000, enter:

nrcmd> server DHCP setPartnerDown main.mycompany.com Oct 31 00:00:00 2000

updateSms

The updateSms command causes the DHCP server to perform System Management Server (SMS) network discovery. This command has been modified to take an optional parameter "all," which sends out all leased addresses from the DHCP server to SMS. If this parameter is not provided, only those addresses leased since the last time this command was run are sent.

When using updateSms, you must first enable the DHCP sms-network-discovery property and set the sms-library-path and sms-site-code properties. If you reload the DHCP server when updateSms is processing, it stops the command. Note that the command does not resume after the DHCP server is brought back up again.

To use the updateSms command on NT, turn on "This Account" in the Startup tab of AIC Server Agent 2.0. Then provide the name of the administrator account of the domain and the corresponding password, and start the services.

For more information, see the "Dhcp Properties" section.

Server Features

The server command allows you to enable or disable a feature. You use the enable or disable commands to affect the following features.

The syntax is:

server [DNS | DHCP | TFTP] enable feature

server [DNS | DHCP | TFTP] disable feature

Table 2-57 describes the server command feature.


Table 2-57: Server Command Feature
Argument Description

start-on-reboot

Controls whether the AIC server agent starts the server when you reboot. You might want to disable this feature for clusters that want to provide a single protocol service. By default, both the DNS and DHCP servers are enabled, while TFTP is disabled.



Example

To disable the DNS server from automatically restarting on reboot, enter:

nrcmd> server DNS disable start-on-reboot

Server Properties

Table 2-58 lists and describes the server command property.


Table 2-58: Server Command Property
Property Description

version

The version string for the server. This property is useful when describing version information to Technical Support.



Session

The session command allows you to set session control parameters on your nrcmd command session. You can control the visibility level that determines which properties are displayed, and the default output format.

The syntax is:

session set prop=value

session get prop

session show

Table 2-59 lists and describes the session command properties.


Table 2-59: Session Command Properties
Property Description

default-format

An enumerated string that can have the following values:

  • script—show objects in script-suitable format, that is, one object per line.

  • user—show objects in a user-readable format, that is, one attribute per line.

cluster

The name of the current cluster. This is a read-only property.

user-name

The name of the current user. This is a read-only property.

visibility

Controls which properties are displayed. The default visibility is 5.



Example

To set the output so that it is suitable for script processing, enter:

nrcmd> session set default-format=script

Tftp

The tftp command allows you to enable or disable TFTP server features. Because there is only one TFTP server per cluster within Network Registrar, you do not need to refer to the server by name.

The syntax is:

tftp disable feature

tftp enable feature

tftp get feature

Table 2-60 describes the tftp command features.


Table 2-60: Tftp Command Features
Feature Description

docsis-access

Required. The default is disabled. Specifies how the TFTP server should respond to DOCSIS file requests from TFTP clients. If this feature is disabled, the TFTP server refuses DOCSIS file requests and sends an access violation error to the client.

docsis-file-logging

Required. The default is disabled. Specifies whether the TFTP server should log generated DOCSIS files to disk. If this feature is enabled, the TFTP server will log each generated DOCSIS configuration file to a tftp subdirectory within the server logs directory.

read-access

Required. The default is enabled. Specifies how the TFTP server should respond to file read requests from TFTP clients. If this feature is disabled, the TFTP server refuses file read requests and sends an access violation error to the client.

ldap-use-ssl

Required. The default is disabled. Specifies whether or not the TFTP server will use SSL when communicating with a LDAP server. If this feature is disabled, the TFTP server does not use SSL when communicating with LDAP.

write-access

Required. The default is disabled. Specifies how the TFTP server should respond to file write requests from TFTP clients. If this feature is disabled, the TFTP server refuses file write requests and sends an access violation error to the client.

use-home-directory-as-root

Required. The default is disabled. Specifies whether or not the TFTP server treats pathnames contained within TFTP requests as if the paths were rooted at the specified home directory. If this feature is enabled, the TFTP server attempts to resolve both absolute and relative pathnames to paths located beneath the specified home directory.



Tftp Properties

Use the set, get, and unset commands to assign and retrieve values from the DNS server's name-value properties.

The syntax is:

tftp get prop

tftp set prop=value [prop=value]

tftp unset prop

tftp show

Table 2-61 lists and describes the tftp command properties.


Table 2-61: Tftp Command Properties
Property Description

active-directory-domain

Required. There is no default. Specifies the name of an active directory domain that the TFTP server uses to provide dynamic configuration file support.

default-device

Required. There is no default. Specifies the name of the default disk device the TFTP server uses when none is specified in the pathname contained in the TFTP request. This property is designed for use on NT to specify a default drive letter.

docsis-log-file-count

Required. The default is 100. Specifies the maximum number of DOCSIS configuration log files the TFTP server maintains in the TFTP subdirectory within the server logs directory. Once this limit is reached, the TFTP server removes one DOCSIS log file for each new log file it creates.

docsis-pathname-prefix

Required. The default is /docsis. Specifies a pathname prefix the TFTP server recognizes as the trigger to create a DOCSIS configuration file. This prefix must match the one the DHCP server is using to generate the DOCSIS filename that DHCP sends to the TFTP client.

home-directory

Required. There is no default. Specifies a path to a home directory the TFTP server uses to resolve TFTP requests. If the use-home-directory-as-root property is disabled, the value of the home-directory property is used in conjunction with the paths specified in the search-list to resolve TFTP requests.

initial-packet-timeout

Required. The default is 5 seconds. Specifies the initial length of time the TFTP server waits after sending a response to a client before declaring that response timed-out and sending a retransmission to the client.

ldap-host-name

Required. The default is localhost. Specifies the hostname or IP address of a LDAP server the TFTP server uses to provide dynamic configuration file support.

ldap-initial-timeout

Required. The default is 10 seconds. Specifies the initial length of time the TFTP server waits after sending a request to a LDAP server before declaring that request timed-out and sending a retransmission to the server.

ldap-maximum-timeout

Required. The default is 60 seconds. Specifies the maximum length of time the TFTP server waits after transmitting the initial LDAP request before giving up retrying on that request.

ldap-password

Required. There is no default. Specifies the password the TFTP server uses when connecting to a LDAP server.

ldap-port-number

Required. The default is 389. Specifies the port number the TFTP server uses when communicating with a LDAP server.

ldap-root-dn

Required. There is no default. Specifies the root distinguished name the TFTP server uses to locate the root of the directory tree for dynamic configuration file support.

ldap-user-name

Required. There is no default. Specifies the username the TFTP server uses when connecting to a LDAP server.

log-file-count

Required. The default is 4 files. Specifies the number of log files the TFTP server will maintain in the server logs directory.

log-file-size

Required. The default is 1 megabyte. Specifies the size of each log file that the TFTP server will maintain in the server logs directory.

log-level

Required. The default is 3. Specifies the level of verbosity the TFTP server will employ when writing log messages to the TFTP server log file. Each integer value from zero through four enables the following log levels:

  • None (0)—There is no writing of log messages.

  • Error (1)—The present condition inhibits the operation of the TFTP server, such as no LDAP server.

  • Warning (2)—The present condition may cause operational problems such as connection timeouts.

  • Information (3)—Normal server informational messages are provided.

  • Activity (4)—There is normal server operation such as client requests and replies.

max-inbound-file-size

Required. The default is 1 megabyte. Specifies the maximum file size limit the TFTP server will enforce for a file written to the TFTP server.

min-socket-buffer-size

Required. The default is 65536. Specifies the minimum socket buffer size the TFTP server uses for the well known port on which it is listening for TFTP requests.

packet-trace-level

Required. The default is 0. Specifies the level of verbosity the TFTP server will employ when writing messages to the server trace file. Each integer value from 0 through 4 enables the following log levels:

  • 0—Packet tracing is turned off.

  • 1—All logging is turned on (the equivalent to log-level 4).

  • 2—Client IP and port number are logged for all incoming and outgoing packets.

  • 3—Packet headers are logged for each incoming/outgoing TFTP packet.

  • 4—Thirty-two bytes of packet data are logged for each incoming/outgoing TFTP packet.

Note that you should only turn on packet tracing if instructed to do so by technical support. Packet tracing has a significant impact upon performance level.

port-number

Required. The default is 69. Specifies the UDP port number the TFTP server uses to listen for TFTP requests.

search-list

Required. There is no default. Specifies a comma-separated list of paths the TFTP server uses to resolve TFTP requests. If you enable use-home-directory-as-root, the paths in the search list are ignored and the home directory is used to resolve all TFTP requests.

session-timeout

Required. The default is 60. Specifies the maximum length of time the TFTP server will wait after transmitting the initial response before giving up retrying on that response. If no response is received from the client within this timeout period, the TFTP session is terminated.


Tftp Trace Level Method Commands

Use the setTraceLevel and getTraceLevel methods to specify and report the trace levels for the TFTP server.

The syntax is:

tftp getTraceLevel

tftp setTraceLevel value

Table 2-62 describes the trace level methods.


Table 2-62: Tftp Trace Level Methods
Command Description

getTraceLevel

Optional. There is no default. Reports the trace level that the TFTP server is currently using. Enable TFTP server tracing only when investigating server problems. For normal server operation the trace level should be zero.

setTraceLevel

Required. The default is 0. Specifies the level of tracing used for the TFTP server. Trace output is written to the file file_tftp_1_trace in the server logs directory. Trace levels are cumulative and defined as follows:

  • 0—Disables all server tracing.

  • 1—Displays all server log messages in the trace file

  • 2—Displays the client IP address and port for all TFTP packets.

  • 3—Displays header information for all TFTP packets.

  • 4—Displays the first 32 bytes of TFTP packet data.



Trap

The trap command allows you to enable or disable Simple Network Management Protocol (SNMP) traps. You can use traps to warn you of error conditions, and possible problems with Network Registrar's TFTP or DHCP servers. These conditions include depleting the DHCP server scope address pools and loss of communication with other servers.

Using the enable, disable, and get commands you can activate, de-activate, and list the state of the traps:

  • The enable command causes a trap to be activated.

  • The disable command causes a trap to be de-activated.

  • The get command causes the status of a trap to be displayed, that is, whether it is enabled or disabled.

The syntax is:

trap disable feature

trap enable feature

trap get feature

Table 2-63 describes the trap command features and the corresponding SNMP notification name.


Table 2-63: Trap Command Features
Feature SNMP Notification Description

address-conflict

ciscoNetRegAddressConflict

Indicates that an address conflict has been detected with another DHCP server.

dhcp-failover-config-
mismatch

ciscoNetRegFailover
ConfigurationMismatch

Indicates that a DHCP server has detected a configuration mismatch with a failover peer.

dns-queue-too-big

ciscoNetRegDNSQueueToo
Big

Indicates whether Network Registrar has detected the DNS server queue has become too large.

duplicate-address

ciscoNetRegDuplicateAddress

Indicates whether Network Registrar has detected a duplicate IP address.

free-address-high

ciscoNetRegFreeAddressHigh

Indicates that the number of free IP addresses is no longer too low.

free-address-low

ciscoNetRegFreeAddressLow

Indicates that the number of free IP addresses is too low.

other-server-not-
responding

ciscoNetRegOtherServerNot Responding

Indicates the Network Registrar DHCP or DNS server is not responding.

other-server-
responding

ciscoNetRegOtherServer Responding

Indicates that the other Network Registrar DHCP or DNS server is responding.

server-start

ciscoNetRegServerStart

Indicates whether the Network Registrar DHCP or DNS server has been started

server-stop

ciscoNetRegServerStop

Indicates whether the Network Registrar DHCP or DNS server has been stopped.



Trap Properties

You can use the set, unset, get, and show commands to assign and retrieve values from the various name-value properties associated with traps.

  • The set command lets you specify a property.

  • The unset command allows you to undefine a property and thus use the default value.

  • The get command allows you to display the property's value.

  • The show command allows you to display all the trap properties.

The syntax is:

trap set prop=value [prop=value...]

trap unset prop

trap get prop

trap show

Table 2-64 describes the trap command properties.


Table 2-64: Trap Command Properties
Property Description

free-address-low-threshold

A string representation of an integer or percentage indicating the threshold value for the free-address-low trap.

Valid values are digits [0-9] and optionally a single trailing % character. 0-2147483647 and percentages must lie within the range 0-100 inclusive.

free-address-high-threshold

A string representation of an integer or percentage indicating the reset value for the free-address trap.

Valid values are digits [0-9] and optionally a single trailing % character. 0-2147483647 and percentages must lie within the range 0-100 inclusive.



Threshold traps are throttled through the use of a hysteresis mechanism. At any time either the free-address-low trap or the free-address-high trap may be armed, but not both. The free-address-low trap is armed when the DHCP process starts. If a free-address-low event occurs, Network Registrar generates the free-address-low trap and unarms it, and then arms the free-address-high trap.

The occurrence of one condition is used to arm the trap for the opposite condition—even if one trap is disabled through the nrcmd command, its opposite will still be sent as needed. You need to specify both the low and high values in the same manner, that is, if you specify the low threshold as a percentage, then you must also specify the high threshold as a percentage, and vice-versa. The high value must be greater than or equal to the low threshold value.

The low and high values are always expressed as units of resource free in which the units are either numeric or percent. In the case of the free-address trap, the resource being measured is the number of free addresses available in a scope.

The DHCP server issues a trap when the number of free addresses is equal to or less than the trap low value, after which the server automatically disables the trap. By default, both the trap low and high threshold values are set to 20 percent.

Examples

To set the free-address-low-threshold to 12 percent and the free-address-high-threshold to 22 percent, enter:

nrcmd> trap set free-address-low-threshold=12% 

nrcmd> trap set free-address-high-threshold=22%

 

To set the free-address-low-threshold to 100 and the free-address-high-threshold to 130, enter:

nrcmd> trap set free-address-low-threshold=100 free-address-high-threshold=130

Trap Recipients Methods

You can use the methods addRecipient, removeRecipient, and listRecipients in conjunction with the trap command to define a list of trap recipients that are shared by all of the traps.

  • The trap addRecipient method adds the specified trap recipient to the cluster's trap recipient list.

  • The trap removeRecipient command deletes the specified trap recipient from the cluster's trap recipient list.

  • The trap listRecipients command lists all the trap recipients (and parameters) in the cluster's trap recipient list.

The syntax is:

trap addRecipient recipient-name host-name [community] [port-number]

trap removeRecipient recipient-name

trap listRecipients

Table 2-65 lists and describes the trap recipient method arguments.


Table 2-65: Trap Recipient Method Arguments
Argument Description

community

An optional community string that you can specify as part of the trap PDU for authentication purposes. Note that the default community string is public.

host-name

A string representation of the host name or IP address of the recipient platform.

port-number

An optional port number parameter to which Network Registrar directs the trap. The default port number is 162.

recipient-name

A unique (cluster-wide) identifier for the recipient.



The Network Registrar DNS and DHCP servers reference the trap recipients through aliases to allow multiple recipients at the same address, but at different ports. You can add or delete a particular trap recipient from the list, but you cannot modify the recipients.

Vendor-option

The vendor-option command allows you to define the option data format vendor-specific options (DHCP Option 43) as required to accommodate devices from a variety of vendors. Using the vendor-option command, you can:

  • create a vendor-specific option by name and associate it with a DHCP Class Identifier string (Option 60).

  • specify Suboptions 1-255, within each vendor-specific option

The syntax to create, delete, and list vendor options is:

vendor-option name create vendor-class-identifier

vendor-option name delete

vendor-option list

vendor-option listnames

where name is the name of the vendor option being created or deleted.


Note   The hyphen (-) is an invalid character and should not be used in the vendor-specific option name. The vendor-specific option name is case-insensitive.

Vendor-option Properties

Table 2-66 describes the properties of the vendor-option command.


Table 2-66: Vendor-option Command Property
Property Description

vendor-class-identifier

The Class Identifier string (DHCP Option 60) for the device to be supported.



Vendor-option Suboption Methods

You can define, undefine, and list suboptions to be included in the vendor option definition using the defineSuboption, undefineSuboption, and listSuboption methods.

The syntax is:

vendor-option name defineSuboption suboption-name number option-datatype-name [flags]

vendor-option name undefineSuboption suboption-name

vendor-option name listSuboptions

Table 2-67 describes the properties of the defineSuboption and undefineSuboption methods.


Table 2-67: Vendor-option Recipient Method Arguments
Argument Description

suboption-name

The name of the suboption to be defined or undefined for the vendor option.

number

The number of the suboption to be added to the vendor option. Suboption numbers can be 1-255.

option-datatype-name

The name of the option datatype or the name of a standard DHCP option.

flags

A comma-separated string specifying formatting of the vendor option. Supported flags are:

  • array specifies that data for multiple suboptions should be allowed when the policy command is used to set vendor options. See the "Policy" section for information about how to set data for arrays of suboptions.

  • no-suboption-opcode causes the DHCP server to skip the byte that contains the suboption number.

  • no-suboption-len causes the DHCP server to skip the byte that contains the length of the suboption data. This may be required by a device that uses an empty suboption to indicate the end of vendor-specific DHCP option data.

  • no-suboption-data causes the DHCP server to skip the suboption data bytes. This may be required by a device that uses an empty suboption to indicate the end of vendor-specific DHCP option data.



Vendor-option Read-only Feature

To complete the process of defining a vendor-specific DHCP option and to avoid further changes to the definition, enable the read-only feature. The syntax is:

vendor-option name enable read-only

To make subsequent changes to the vendor option, disable the read-only feature:

vendor-option name disable read-only


Note   The read-only feature of the vendor-specific DHCP option should be enabled before you use the option in a policy name setVendoroption command to set the data for the option.

Vendor-option Examples

This example is part of a more complete example presented in the "Option-datatype Example" section. In this example, a vendor option is created for the IntelPxE device.

The command

nrcmd> vendor-option IntelPXE_vso create "PXEclient:Arch:xxxxxx:UNDI:yyyzzz" 
 

where "PXEclient:Arch:xxxxxx:UNDI:yyyzzz" exactly matches the string provided by the vendor as the DHCP Class Identifier (Option 60) for the device, creates the vendor option "IntelPXE_vso."

Next, Suboption 8 is assigned to the option data type IntelPXE_odt_suboption_8:

nrcmd> vendor-option IntelPXE_vso defineSuboption suboption_8 8 IntelPXE_odt_suboption_8 
array 

 

Note that the "IntelPXE_odt_suboption_8" data type must be defined by the option-datatype command before it is available for use in the vendor-option command.

This command should be repeated for each suboption required for the device.

Zone

The zone command allows you to create and edit DNS zones, as well as force transfer zones.

The syntax is:

zone name create primary file=BINDfile

zone name create primary ns person [prop=value]

zone name create secondary addr [prop=value]

zone name delete

zone name forceXfer [secondary|primary]

zone list

zone listnames

Examples

To create a zone, enter:

nrcmd> zone QuickExample.com create primary file=host.local


Note   The zone command automatically creates the NS and SOA resource record for you. You need to use the addRR command to create an A record for the name server named in the NS field.

To create both an SOA record with values (ns.test.org. andy.test.org.) and an NS record with value ns.test.org, enter:

nrcmd> zone test.org create primary ns andy

 

Both of these records will have the name of the zone ("test.org." or "@"). Because the name ns.test.org. is within the test.org. zone, you must provide an A record for ns.test.org:

nrcmd> zone test.org. addRR ns A 24.10.2.2

 

To have the primary server initiate a forced zone transfer to one or more secondary servers, use the forceXfer primary argument. To have a secondary server force a zone transfer from the primary, use the forceXfer secondary argument. For example, to force a zone transfer to the secondary server test.org from the primary, enter:

nrcmd> zone test.org forceXfer secondary


Note   Currently, the primary argument is not implemented.

Zone Command Features

You can enable, disable, or determine the feature that has been set with the enable, disable, or show commands.

The syntax is:

zone name disable feature

zone name enable feature

zone name show

Table 2-68 lists and describes the zone command features.


Table 2-68: Zone Command Features
Feature Description

dynamic

Required. The default is enabled (Primary server only). Enables or disables RFC 2136 dynamic updates to the zone. The most typical source of these updates is a DHCP server.

restrict-xfer

Required. The default is disabled. Restricts zone transfers to a specific set of hosts. If you restrict zone transfers, you need to use the restricted-set property to list the servers that are allowed to perform zone transfers.

ixfr

Optional. There is no default. Applies to secondary zones only. Enables requesting incremental transfer for this zone. When set, to either true or false, it overrides the global ixfr-enable value for this zone.

notify

Optional. There is no default. Enables the notification of other authoritative servers when this zone changes. When set, to either true or false, it overrides the global notify value for this zone.



Incremental Transfer

  • If you set incremental transfer, then this particular zone will act differently than zones that inherit the server global value.

  • If you unset incremental transfer, Network Registrar uses the server global IXFR value. The operation of the GUI specifically depends on this because it has no way of setting this per-zone feature.

Using the server global value (not setting this value per-zone) gives you an easy way of globally turning IXFR on or off, or setting a general policy for your zones and specific exceptions to the server global value.

Zone Properties

Use the set and get commands to assign and retrieve the values of the zone properties. These properties depend on the type of zone that you are creating.

The syntax is:

zone name set prop=value [prop=value...]

zone name get prop

Table 2-69 lists and describes the zone command properties.


Table 2-69: Primary Zone Command Properties
Property Description

auth-servers

(Secondary-only). The list of servers from which Network Registrar will transfer data for this zone.

defttl

Optional. The default is 86400 seconds (1 day). Default TTL for this zone. Network Registrar responds to authoritative queries with an explicit TTL value if one exists. If none exists, Network Registrar responds with the default TTL value.

dynupdate-set

The set of IP addresses from which dynamic updates will be accepted when you have enabled the dynamic feature. The nrcmd program treats addresses with zeroes in the least significant octets as network numbers, with implicit masks in octet multiples.

expire

Optional. The default is 604800. The expire interval, in seconds, of the zone. The length of time a secondary can continue to serve zone data without confirmation that it is still current.

minttl

Optional. The default is 86400. The minimum TTL value to expose in resource records for this zone. If the enforce-min-ttl property has been enabled, records with lower TTL values or without any TTL will be published with this value. This property is generally not used except under special configuration circumstances.

notify-set

An optional list of additional servers to notify when this zone changes. All servers listed in NS records for the zone with the exception of the server described by the ns property of the zone (the mname field of the SOA record) will receive notifications. Servers listed in the notify-set will also be notified.

ns

Required. There is no default. The fully-qualified domain name of the primary for this zone. This host is the original or primary source of data for this zone.

person

Required. There is no default. A domain name which specifies the mailbox of the person responsible for this zone. The first label is a user or mail alias, the rest of the labels are a mail destination. A mailbox of hostmaster@test.com would be represented as hostmaster.test.com.

refresh

Optional. The default is 10800. The refresh interval, in seconds, of the zone. Secondary servers use this as the period of polling for zone changes.

restricted-set

The set of IP addresses that may request zone transfers when you have enabled the restrict-xfer feature.

retry

Optional. The default is 3600. The retry interval, in seconds, of the zone. Used by secondaries as the period of retrying when polling for changes, or attempting zone transfer after encountering errors.

serial

Optional. The default is 1. The current serial number of the zone. Maintained automatically by the DNS server.



Zone Host Method Commands

You use the following methods to add, remove, and list the hosts for the zone.

The syntax is:

zone name addHost name addr [alias]

zone name
removeHost name

zone name
listHosts

Table 2-70 lists and describes the zone host method properties.


Table 2-70: Zone Host Method Properties
Property Description

name

The host's domain name.

addr

The list of addresses assigned to the host.

aliases

An optional list of alias domain names for this host.



Example

To add a host to the QuickExample zone, enter:

nrcmd> zone QuickExample.com addHost bethpc 192.168.1.10

Zone Resource Record Method Commands

You use the following commands to add, remove, and list the resource records in the zone or to delete a zone's unused or obsolete resource records.

The syntax is:

zone name addRR name [ttl] [class] type [preference] data

zone name
removeRR name [type [data]]

zone name
removeDynRR name [type]

zone name
cleanRR

zone name
listRR {all|static|dynamic}

Table 2-71 lists and describes the zone resource record method properties.


Table 2-71: Zone Resource Record Method Properties
Property Description

class

The class of resource record, which is always IN (for Internet) in DNS.

name

The resource record's domain name (owner name).

preference

Prevents mail routing loops. Is an unsigned 16 bit number (between 0 and 65535) that indicates the mail exchanger's priority. Mailers attempt delivery to the mail exchangers with the lowest preference values first.

ttl

The resource record time to live (in seconds). The length of time the record the client may cache the resource record.

type

The type of resource record, such as PTR or A.



addRR

The addRR command adds a resource record of the type that you specify.

If you are adding an MX record, you can specify a preference to determine the order of mail servers. The system will try the mail server with the lowest number and if that server is not available it will try the next lowest number. You can have two mail servers with the same number, and the system will randomly try either one.


Note   For the addition to take effect, you must reload the server.

cleanRR

The cleanRR command deletes zone records that are left after you have deleted a zone. It uses the DNS server's historical zone data to determine what part of this data can be removed. Use the cleanRR command if you periodically delete and re-import zones, which can cause your database to grow.

The behavior of the cleanRR command depends on whether there is a new zone:

  • Deleting and then re-creating the zone —Causes the command to realize it can purge the entire old copy of the zone.

  • Deleting the zone and then not re-adding a zone—Although the zone does not exist any longer, its resource records still do (they are marked as deleted). In this case, running the cleanRR command does not affect the deleted zone, and the records are not deleted.

The cleanRR command does not print out a list of records to be deleted or prompt you for confirmation. You can safely run it at any time.

listRR

The listRR command displays resource records in the named zone. You can display all the resource records, or just the static or the dynamic resource records.

removeDynRR

The removeDynRR command removes all specified dynamic resource records. You can specify resource records by name or name and type. To use the command, the DNS server must be running. Changes take effect immediately; you do not need to reload the server.

removeRR

The removeRR command removes all specified static resource records. You can specify resource records by name, name and type, or name, type, and data (in which the specified data is in BIND-style format). Note that for the removal to take effect, you need to reload the server.

When you have multiple SRV records of the same name, the command removeRR <name> would remove all resource records having that name. To remove only the resource records of a specific type, or to remove only a specific resource record, include the type or type and data options, as indicated in the examples that follow.

Examples

To add a name server resource record, enter:

nrcmd> zone QuickExample.com addRR green ns green.QuickExample.com

 

You can specify the name as either the relative name (if the server is within the same domain), as an absolute name (by supplying the fully qualified domain name), or the same name as the zone name (by using the @ symbol).

To delete a zone's unused or obsolete resource records, enter:

nrcmd> zone QuickExample.com cleanRR

 

To remove all static resource records for the zone named "green," enter:

nrcmd> zone QuickExample.com removeRR green

 
To remove only type A static resource records for the zone named "green," enter:
nrcmd> zone QuickExample.com removeRR green A

 
To remove only a specific static resource record for the zone named "green," enter:
nrcmd> zone QuickExample.com removeRR green A 192.168.1.52