DHCPD(8)                                                 DHCPD(8)

     NAME
          dhcpd, dhcp6d, dhcpleases, rarpd, tftpd - Internet booting

     SYNOPSIS
          ip/dhcpd [-dmnprsSZ] [-h homedir] [-f ndbfile] [-M secs] [-x
          netmtpt] [-Z secs] [ address n ] ...

          ip/dhcpleases

          ip/dhcp6d [-d] [-f ndbfile] [-x netmtpt]

          ip/rarpd [-d] [-e etherdev] [-x netmtpt]

          ip/tftpd [-dr] [-h homedir] [-x netmtpt] [-n nsfile] [-m
          mapfile]

     DESCRIPTION
          These programs support booting over the Internet.  They
          should all be run on the same server to allow other systems
          to be booted.  Dhcpd, dhcp6d and tftpd are used to boot
          everything; rarpd is an extra piece just for Suns.

          Dhcpd runs the BOOTP and DHCP protocols.  Clients use these
          protocols to obtain configuration information.  This infor-
          mation comes from attribute/value pairs in the network data-
          base (see ndb(6) and ndb(8)). DHCP requests are honored both
          for static addresses found in the NDB and for dynamic
          addresses listed in the command line.  DHCP requests are
          honored if either:
          - there exists an NDB entry containing both the ethernet
          address of the requester and an IP address on the originat-
          ing network or subnetwork.
          - a free dynamic address exists on the originating network
          or subnetwork.

          A BOOTP request is honored if all of the following are true:
          - there exists an NDB entry containing both the ethernet
          address of the requester and an IP address on the originat-
          ing network or subnetwork.
          - the entry contains a bootf= attribute
          - the file in the bootf= attribute is readable.

          Dynamic addresses are specified on the command line as a
          list of addresses and number pairs.  For example,
               ip/dhcpd 10.1.1.12 10 10.2.1.70 12
          directs dhcpd to return dynamic addresses 10.1.1.12 through
          10.1.1.21 inclusive and 10.2.1.70 through 10.2.1.81 inclu-
          sive.

          Dhcpd maintains a record of all dynamic addresses in the

     Page 1                       Plan 9            (printed 11/18/24)

     DHCPD(8)                                                 DHCPD(8)

          directory /lib/ndb/dhcp, one file per address.  If multiple
          servers have access to this common directory, they will cor-
          rectly coordinate their actions.

          Attributes come from either the NDB entry for the system,
          the entry for its subnet, or the entry for its network.  The
          system entry has precedence, then the subnet, then the net-
          work.  The NDB attributes used are:

          ip          the IP address
          ipmask      the IP mask
          ipgw        the default IP gateway
          dom         the domain name of the system
          fs          the default Plan 9 file server
          auth        the default Plan 9 authentication server
          dns         a domain name server
          ntp         a network time protocol server
          time        a time server
          wins        a NETBIOS name server
          www         a World Wide Web proxy
          pop3        a POP3 mail server
          smtp        an SMTP mail server
          bootf       the default boot file; see ndb(6)
          tftp        the TFTP server to fetch bootf from
          rootpath    the NFS root for unix machines
          rootserver  the NFS server used with rootpath
          vendor      Specific vendor attribute for dhcp and bootp

          Dhcpd will answer BOOTP requests only if it has been specif-
          ically targeted or if it has read access to the boot file
          for the requester.  That means that the requester must spec-
          ify a boot file in the request or one has to exist in NDB
          for dhcpd to answer.  Dhcpd will answer all DHCP requests
          for which it can associate an IP address with the requester.
          The options are:

          d    Print debugging to standard output.

          h    Change directory to homedir. The default is /.  This
               should match the homedir setting of tftpd so that the
               existence check of non-rooted file names is consistent.

          f    Specify a file other than /lib/ndb/local as the network
               database.

          m    Mute: don't reply to requests, just log them and what
               dhcpd would have done.

          M    Use secs as the minimum lease time for dynamic
               addresses.

          n    Don't answer BOOTP requests.

     Page 2                       Plan 9            (printed 11/18/24)

     DHCPD(8)                                                 DHCPD(8)

          p    Answer DHCP requests from PPTP clients only.

          r    Mute static addresses: don't reply to requests for
               static addresses, just log them and what dhcpd would
               have done.

          s    Sleep 2 seconds before answering requests for static
               addresses.  This is used to make a server be a backup
               only.

          S    Sleep 2 seconds before answering requests for dynamic
               addresses.

          x    The IP stack to use is mounted at netmtpt. The default
               is /net.

          Z    Use secs as the minimum lease time for static
               addresses.

          Dhcp6d provides DHCPv6 service for IPv6 clients. Only net-
          work boot and DNS parameters are supported.

          Dhcpleases prints out the currently valid DHCP leases found
          in the /lib/ndb/dhcp directory.

          Rarpd performs the Reverse Address Resolution Protocol,
          translating Ethernet addresses into IP addresses.  The
          options are:

          d    Print debugging to standard output.

          e    Use the Ethernet mounted at /net/etherdev.

          x    The IP stack to use is mounted at netmtpt. The default
               is /net.

          Tftpd transfers files to systems that are booting.  It runs
          as user none and can only access files with global read per-
          mission.  The options are:

          d    Print debugging to standard output.

          x    The IP stack to use is mounted at netmtpt. The default
               is /net.

          h    Change directory to homedir. The default is /.  All
               requests for files with non-rooted file names are
               served starting at this directory. This needs to be
               consistent with the homedir setting of dhcpd. Tftpd
               supports only octet mode.

          r    Restricts access to only those files rooted in the

     Page 3                       Plan 9            (printed 11/18/24)

     DHCPD(8)                                                 DHCPD(8)

               homedir.

          n    Sets the namespace file (default /lib/namespace).

          m    Loads name substitutions from mapfile. The format is a
               space or tab separated two-column text with the first
               column being a regular expression (see regexp(6)) that
               is matched against the requested file name and the sec-
               ond column contains a subsitution.  Lines starting with
               # are ignored.  Occurances in the resulting filename of
               %I, %C or %E are replaced with the ip, cfgpxe name or
               ether MAC of of the client.

     FILES
          /lib/ndb/dhcp    directory of dynamic address files

     SOURCE
          /sys/src/cmd/ip

     SEE ALSO
          ndb(6), booting(8)

     Page 4                       Plan 9            (printed 11/18/24)