cc/td/doc/product/rtrmgmt/ciscoasu/nr/nr3-5
hometocprevnextglossaryfeedbacksearchhelp
PDF

Table of Contents

Data Import and Export

Data Import and Export

Network Registrar allows you to import and export data in a variety of delimited-text file formats. You can generate the import files from a different external sources, such as data bases or asset management systems. You can use the export files as reports in themselves, or you can import the data into external databases and spreadsheets.

Table 4-1 displays the commands that import and export information from the Network Registrar DNS and DHCP servers.


Table 4-1: The Import and Export Commands
Purpose Command Format

Import DNS named.boot files to a DNS server

import named.boot

BIND

Export DNS zone information to a file

export zone

BIND

Export DNS hostfile information to a file

export hostfile

UNIX hosts file

Export DNS zone names to a file

export zonenames

ASCII list

Import DHCP lease information to a DHCP server

import leases

JOIN

Export DHCP and DNS IP address information to a database or file

export addresses

CSV text or ODBC db

Export current and expired leases to a file

export leases -server

JOIN

Export current leases to a file

export leases -client

JOIN

Report dynamic and static IP address utilization

report

text table

Notification when the number of available IP addresses falls below a configurable minimum

lease-notification

text table

DNS Data Import and Export

You can import and export a variety of file types. You can import existing BIND files into Network Registrar, as well as export DNS zone data in BIND format.

Bind Format Files

Network Registrar can import DNS zone data in BIND file format, as defined in RFC 1035. To import an existing BIND file, use the nrcmd zone create primary command and specify the name of a BIND file, or from the GUI, specify the BIND file name when you are adding a zone.

Network Registrar can read a BIND named.boot file and import all of the zone files identified in named.boot. To import a named.boot file, use the nrcmd import named.boot command and specify the name of the file.

Network Registrar can export DNS zone data in BIND file format. An export can include only static addresses (addresses not assigned by DHCP), dynamic addresses (addresses assigned by DHCP), or both types of addresses. When exporting dynamic addresses, Network Registrar includes the MAC address of the host in a text Resource Record (record type TXT). To export a DNS zone, use the nrcmd export zone command and specify the type of addresses and the name of the output file.

Figure 4-1 displays the partial output from the command nrcmd export zone cisco.com. Because the host STANLEY is a DHCP client, the MAC address (the client-id from the DHCPREQUEST packet) appears in a TXT record.


Figure 4-1: BIND Export Format
$ORIGIN cisco.com.
moose	IN	CNAME	moosehorn.cisco.com.
moosehorn	IN 	A 	172.16.75.57
STANLEY 	1200	IN 	A 172.16.75.216
STANLEY	1200	IN 	TXT "01:00:60:97:3f:ce:f0"

Hosts Format Files

Network Registrar can export DNS data in UNIX /etc/hosts file format. Network Registrar combines information from the A and CNAME records for a host. To export all the zones in the server in hostfile format, use the nrcmd export hostfile command and specify the name of the output file.

Figure 4-2 displays selections from a hosts format export of the cisco.com zone.


Figure 4-2: Hosts Export Format
172.16.75.57 	moosehorn.cisco.com	moosehorn moose #
172.16.75.216 	stanley.cisco.com	 #
 

Note You can also export the names of all the zones in the
DNS server. You can specify forward, reverse, or both types. To export the names of the zones, use the export zonenames command and specify the type of zones you want and the output file.

DHCP Data Import and Export

You can import and export a variety of DHCP lease information. You can also run reports that describe your dynamic and static IP address utilization, and you can set utilization thresholds that trigger an e-mail notification.

Lease Data

Network Registrar can import and export lease data from or to text files. The import leases and export leases commands use the following file format. Each record (line) in the file represents one DHCP client.

The syntax is:

field1|field2|field3|

If, in the import file, you chose not to supply the information for an optional field, you need to use delimiters ( | |) so that the number of fields is still 12. For example, type xyz|abc||123.

The fields are, in order:


Note 
For all the time fields, use either the number of seconds since 1970, or day, month, date, time, year format (Mon Apr 13 16:35:48 1998).

When you use the export command to export lease information, you can choose between writing the state of all current and expired leases, or just the current leases to the output file.

Figure 4-3 displays selections from a least data export from the Network Registrar DHCP server. Blank lines have been inserted between records for clarity---these were not in the original output. The format of this file is often called "JOIN" format, because this output was first introduced in Competitive Automation's JOIN DHCP server.


Figure 4-3:
Lease Data Export

00:60:97:40:c1:96|1|6|204.253.96.103|Mon Aug 31 08:36:57 1998|Fri Sep 04 13:34:05 1998|Mon Aug 31 08:36:57 1998|Fri Sep 04 09:34:05 1998|204.253.96.57|nomad|cisco.com|01:00:60:97:40:c1:96
 
08:00:09:9f:6a:f8|1|6|204.253.96.77|Thu Aug 20 13:10:11 1998|Fri Sep 04 14:24:46 1998|Thu Aug 20 13:10:11 1998|Fri Sep 04 10:09:46 1998|204.253.96.57|NPI9F6AF8|cisco.com
 
00:a0:c9:59:e7:b2|1|6|204.253.96.78|Wed Jun 24 15:02:18 1998|Fri Sep 04 14:11:40 1998|Wed Jun 24 15:02:18 1998|Fri Sep 04 09:56:40 1998|204.253.96.57|JTB-LOCAL|cisco.com
 

For more information about importing and exporting leases, see the import and export commands in the Network Registrar CLI Reference Guide.

Summary Reports

Network Registrar can produce a utilization summary of the static and dynamic IP address on one or more clusters. The report command displays a row of information for each subnet specified by a 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 commands assumes that there is no overlap between static addresses and scope ranges.

For each scope or subnet, the report command displays the following information:

For each scope-specified subnet, the report command also displays the following values:

Addresses have both a current state and a pending state after their lease expires. 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 deactivated. 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:

The comma-delimited text format is well suited for import into a database, spreadsheet or a similar tool. You can easily create customized reports.

For more information about producing reports, see the report command in the Network Registrar CLI Reference Guide.

DHCP Usage Notification

Network Registrar can survey all scopes on one or more Network Registrar servers (clusters), and produce a report of all the scopes in which the available addresses falls below a threshold. The command is suitable for inclusion in a scheduled procedure, such as a UNIX cron task. You can optionally specify that the report be e-mailed to a specific user.

Using the lease-notification command, 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.

Although you can use the lease-notification command interactively, its primary use is as an automated command.

For more information about lease notification, see the lease-notification command in the Network Registrar CLI Reference Guide.

Figure 4-4 shows the e-mail message you would receive if you set your available threshold to 25 percent of all available leases.


Figure 4-4:
The lease-notification Command
From postmaster@bethpc.cisco.com Thu Sep  3 10:44 EDT 1998
Subject: Scope utilization exceeds threshold
To: dbach@cisco.com
From: "Network Registrar" <postmaster@bethpc.cisco.com>
Date: 03 Sep 1998
 
The following scopes have 25% or less of the addresses
within their ranges available for lease:
 
Cluster   Scope             Network      Mask Addrs % Free  Free 
localhost 192.168.01.0-name 192.168.01.0   24    20    20%    4 


hometocprevnextglossaryfeedbacksearchhelp
Posted: Thu Feb 3 10:42:58 PST 2000
Copyright 1989 - 2000©Cisco Systems Inc.