![]() |
Reference Manual |
NAME
dhcpd - interact with the NAT32 DHCP daemonSYNOPSIS
dhcpd [ifn [on | off | d | D]DESCRIPTION
dhcpd ifn lease n
dhcpd ifn offset n
dhcpd ifn limit n
dhcpd ifn real on | off
dhcpd ifn dns ip
dhcpd ifn delete ip
dhcpd ifn reset
dhcpd ifn ip mac
dhcpd ifn dump [n]
dhcpd ifn list
The NAT32 DHCP daemon can be used to configure computers on one or more private LANs. Up to 1024 clients per private interface can be configured in this release, but the subnet mask of an interface also limits the maximum number of clients per network. The default configuration settings are:NOTESThe DHCP daemon is started via the NAT32 command start dhcpd in file startup. Once started, the daemon is inactive until a dhcpd ifn on command for interface ifn is issued.
- 7 day lease (604800 sec)
- DNS address is NAT32's private IP address
- Assigned IP addresses start at the interface's subnet address plus offset and always exclude the subnet address itself, the subnet broadcast address, NAT32's IP address and the Windows IP address of an interface.
- The number of assignable IP addresses can be limited to the value specified in limit. The default limit is the lesser of 1024 and the number of addresses per subnet as specified via the subnet mask of the interface.
- Individual IP addresses can be blocked by specifying the IP address and the special MAC address 00-00-00-00-00-01 or reserved by specifying the IP address and the associated MAC address.
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 the lease duration (in secs) for a specified interface.
The default NAT32 IP address of a private LAN adapter with a fixed Windows IP address is X.X.X.100.
If the adapter was configured via DHCP under Windows, NAT32's IP address defaults to X.X.X.200.
If the adapter was unconfigured under Windows when NAT32 started, 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. Otherwise, the actual DNS address assigned to clients 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 all clients on the network, 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 for an interface, while option dump prints either the entire table (from offset to limit) or entry n.
Command dhcpd ifn list prints details of all current allocations for the specified interface.
Command dhcpd [ifn] prints the current DHCPD settings for either all interfaces or the specified interface. daemon.
SEE ALSOThe DHCP daemon saves no state information between runs. IP addresses are first assigned in the order the client machines are booted. The first IP address (e.g. 172.16.2.1) is assigned to the first machine to boot, 172.16.2.2 to the second machine to boot and so on. However, on reboot, most DHCP Clients always request the last assigned IP address if the lease for that address has not expired, and NAT32 will assign such preferred addresses whenever possible.
A problem arises if computers with fixed IP addresses exist on the private LAN because the DHCPD will only detect their presence if they are running at the time the DHCPD attempts to assign their address. To prevent this from happening, such fixed IP addresses should be reserved by issuing an appropriate
dhcpd ifn ip maccommand for each address to be reserved.For example, to reserve the IP address 172.16.2.1 for the machine with the MAC address 00-E0-98-18-11-45 on interface 2, the following command should be issued:
dhcpd 2 172.16.2.1 00-E0-98-18-11-45Such commands can be placed in a text file called dhcpd.ini that is executed whenever the DHCPD is started or reset. Never place reset commands in dhcpd.ini as this will cause recursive execution of dhcpd.ini.
If you ever need to replace a particular Ethernet NIC, be sure to update the relevant entry.
To prevent a particular IP address (e.g. 172.16.2.32 on interface 2) from ever being assigned, simply specify its MAC address as 00-00-00-00-00-01.
Whenever an IP address is assigned, released or renewed, the file dhcp.tcl is executed as follows:
dhcp.tcl ifn ip mac [name] opwhere 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.
The menu item Config, DHCP Server can also be used to interact with the DHCPD.
dhcp, dnsmap, netcfg, nsdetect, setns, start, TCL