|
|
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.
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.
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.
$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"
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.
172.16.75.57 moosehorn.cisco.com moosehorn moose # 172.16.75.216 stanley.cisco.com #
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.
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.
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.
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.
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.
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
![]()
![]()
![]()
![]()
![]()
![]()
![]()
Posted: Thu Feb 3 10:42:58 PST 2000
Copyright 1989 - 2000©Cisco Systems Inc.