Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ dhcpdb(1M) — IRIX 6.5.3f

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

dhcp_server(1M)

ProclaimServerMgr(1M)



dhcpdb(1M)                                                          dhcpdb(1M)



NAME
     dhcpdb - DHCP database manager

SYNOPSIS
     /usr/sbin/dhcpdb [ -a [ -r] ] | [ -d ] | [ -u ] | [ -p ] [ -X ]
     [ -C Clientid  ] [ -M Macaddress ] [  -I IPaddress ]
     [  -H hostname ] [ -T leaseinseconds  ] [ -f dhcpdatabase ]

     /usr/sbin/dhcpdb [  -D ] | [ -L ] [ -X ] [ -f dhcpdatabase ]

DESCRIPTION
     dhcpdb is a database manager for the NDBM database used by the DHCP
     server to store address leases. It provides a command line interface to
     add, delete, update, or print the DHCP database.

     The tool can be used either in entry mode to manipulate individual
     entries or in file mode. In file mode the entire contents of the database
     can be dumped to a file or loaded from a file.


COMMAND LINE OPTIONS
     In the entry mode options can be used to add (replace), delete, update a
     lease, or print an entry using a key. The key can be either a client
     identifier, MAC (interface) address, IP address, or a hostname.

     -a   Add an entry. The -r option allows an existing entry to be replaced
          or a new entry is added if the specified entry does not exist. The
          client identifier, Mac address, IP address, and hostname must be
          specified. If a record is being replaced these values must be
          specified to be the same as existing values in the database. The
          lease time should also be specified.

     -d   Delete an entry. A single key in the form of client identifier, Mac
          address, IP address, or hostname should be specified.

     -u   Update lease time. Specify a key and the lease time using the -T
          option.

     -p   Print an entry for the given key. This can also be used to print
          leases expiring in more or less than a specified number of seconds.

     -X   Specifies that the client identifier is a colon separated string of
          bytes in hexadecimal in the specified input or in the output. If
          this option is not specified the client identifier is assumed to be
          a string.

     -C Cid
          Specifies the client identifier key.

     -M Mac_address
          Specifies the Mac (physical interface) address as a string of bytes
          in hexadecimal, separated by colons.



                                                                        Page 1





dhcpdb(1M)                                                          dhcpdb(1M)



     -H Hostname
          This is the hostname (usually fully qualified) as it appears in the
          database.

     -I IP address
          Specifies the IP address as a dotted decimal address string.

     -T  lease_seconds|absolute time
          Specifies the lease time in seconds. With the -p option the lease
          time can be specified to print the leases that expire in less than
          or greater than a given number of seconds from the current time. For
          example -p -T <100, and -p -T >100 prints leases expiring in less
          than 100 seconds and more than or equal to 100 seconds respectively.
          The format -T "sec[0-61] min[0-59] hour[0-23] mday[1-31] mon[0-11]
          years_since_1900" can also be used to specify the time when adding
          or updating an entry. For example -T "10 12 20 18 4 98" means the
          lease should expire on May 18 21:12:10 1998. The format is the same
          as is used with the mktime(3C) call. Alternately -T seconds can be
          used to specify the time in seconds from 00:00:00 UTC, January 1,
          1970 (see time(2)). For example in the particular case discussed
          above the option would be specified as -T 895551130.

          With the -a and -u options the lease can be specified as INF for an
          infinite lease or as STATIC for a static (infinite) lease. For
          example, to make an existing lease for address 10.0.10.1 static the
          command is dhcpdb -I 10.0.10.1 -u -T STATIC.

     -f   Specifies an alternate database to use. The default is
          /var/dhcp/etherToIP.

   File mode usage
     In the file mode the command can be used to dump the entire database to a
     file that can be subsequently loaded into the database.

     -D   Dumps the database to the standard output. The file consists of
          fields separated by tabs and includes the client identifier, Mac
          address, IP address, hostname, and the lease time.

     -L   Loads the database from the standard input.


NOTES
     The /etc/ethers and /etc/hosts are not updated when the DHCP
     /var/dhcp/etherToIP database is updated.

FILES
     /var/dhcp/etherToIP.lock
     /var/dhcp/etherToIP.pag
     /var/dhcp/etherToIP.dir






                                                                        Page 2





dhcpdb(1M)                                                          dhcpdb(1M)



SEE ALSO
     dhcp_server(1M) ProclaimServerMgr(1M),





















































                                                                        Page 3



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026