Reference Manual

NAME

dhcpd - interact with the NAT32 DHCP daemon
SYNOPSIS
dhcpd [ifn [on | off | d | D]
dhcpd ifn lease n
dhcpd ifn offset n
dhcpd ifn real on | off
dhcpd ifn dns ip
dhcpd ifn delete ip
dhcpd ifn reset
dhcpd ifn dump

DESCRIPTION
The NAT32 DHCP daemon can be used to configure machines on a private LAN. Up to 252 clients per private interface can be configured in this release. The default configuration settings are: The DHCP daemon is started via the NAT32 start command, usually in file startup. Once started, the daemon is inactive until a
dhcpd ifn on
command for an interface ifn is issued. If ifn is specified as s, the main private interface will be used.

Option off disables the daemon for the specified interface.

Option D turns on debugging, option d turns off debugging for the specified interface.

Option lease can be used to specify a lease (in secs) for a specified interface.

The DHCP daemon allocates IP addresses starting with the value following the NAT32 IP address of the specified interface (offset = 1). Option offset can be used to specify a different starting value.

The default NAT32 IP address of a private LAN adapter that has a fixed Windows IP address is x.x.x.100.

If the private LAN adapter has a Windows DHCP-assigned address, NAT32's IP address defaults to x.x.x.200.

If the adapter is unconfigured under Windows when NAT32 starts, the address 172.16.x.200 is used for the interface, where x is the index of the adapter in the NAT32 wincfg table.

Note that the NAT32 DHCPD does honor local DHCP requests from Windows. If this is undesirable (e.g. because some other DHCP server is running on that network), the NAT32 DHCPD should be turned off for that interface.

Option real can be used to specify that a real DNS server address be assigned so that NAT32's DNS Mapping mechanism is not used. The actual DNS address assigned to the client is the current DNS address as printed by the NAT32 setns command.

Option dns can be used to specify a DNS server address that will always be assigned to clients, irrespective of NAT32's notion of the current DNS address.

Option delete can be used to delete an assigned entry from the DHCPD allocation table. The MAC address of the entry is left unaltered to ensure that the same IP address will be assigned if that client later requests or renews a lease.

Option reset resets the NAT32 DHCPD allocation table, while option dump prints the entire table.

Command dhcpd ifn prints details of all current allocations for the specified interface.

Command dhcpd with no arguments prints the state of the DHCP daemon.

NOTES
The NAT32 DHCP daemon is started with the following start command:
start dhcpd

The DHCP daemon saves no state information between runs. IP addresses are assigned in the order the client machines are booted. The first IP address (e.g. 172.16.1.101) is assigned to the first machine to boot, 172.16.1.102 to the second machine to boot and so on. As a result, the DHCPD may assign a different IP address to a machine each time it boots. But note that DHCP Requests for recorded leases are honored whenever possible, therefore a machine which reboots during the current run of the DHCPD will normally receive the same IP address.

Caution: If machines with fixed IP addresses exist on the private LAN, the DHCPD will only detect their presence if they are running at the time the DHCPD attempts to assign their address. To prevent the DHCPD from ever assigning such addresses, a special entry can be placed in the dhcpd.ini file (see below).

To reserve an IP address slot for a particular machine, a text file called dhcpd.ini containing interface numbers and Ethernet MAC addresses (and an optional comment) should be generated as in the following example:

2 00-e0-98-18-11-45 # Comment
2 00-00-21-c4-24-da # Comment
2 00-40-05-4e-8b-ad # Comment
..........

The first IP address slot (x.x.x.101) will then be reserved for the machine on interface 2 with the Ethernet Address 00-e0-98-18-11-45, the second slot for machine 00-00-21-c4-24-da on interface 2 and so on.

If you ever need to replace a particular Ethernet NIC, be sure to update the relevant dhcpd.ini entry.

To prevent a particular IP address from ever being assigned, simply place the entry

ifn 00-00-00-00-00-01

in the required position in the dhcpd.ini file.

To allow an IP address assignment, place the entry

ifn 00-00-00-00-00-00

in the required position in the dhcpd.ini file.

To ensure that only certain machines with specific MAC addresses ever receive an IP address, simply fill the file with exactly 256 entries like the above and then edit the MAC addresses for the machines you wish to allow. A red Table Full error message will appear on the Console each time an unauthorised machine requests a lease.

The menu item Config, DHCP Server can also be used to interact with the DHCPD.

Whenever an IP address is assigned, released or renewed, the file dhcp.tcl is executed as follows:

dhcp.tcl ifn ip mac [name] op
where ifn is the interface number, ip is the ip address, mac is the Ethernet address, [name] is the host name and op is one of the strings assigned, released or renewed.

The above mechanism can be used to add port mappings when a particular computer is booted, or to remove port mappings when that computer releases its DHCP lease.

SEE ALSO
dhcp, dnsmap, netcfg, nsdetect, setns, start, TCL