Windows NT 3.1's TCP/IP has no DHCP client. DHCPNT31 runs the
DISCOVER / OFFER / REQUEST / ACK handshake over Windows Sockets 1.1. It saves
the lease as the adapter's static TCP/IP settings, which take effect at the
next restart. With /stay it keeps the lease alive while the user is logged
on.
Note
DHCPNT31 is a logon utility, not a service. NT 3.1's TCP/IP cannot change the running address, so an address that changes is saved for the next restart.
| Command | What it does |
|---|---|
DHCPNT31 show |
Lists the bound adapters and their saved TCP/IP settings |
DHCPNT31 52-54-00-ab-cd-ef |
Requests a lease for that MAC and asks before saving it |
DHCPNT31 52-54-00-ab-cd-ef /apply |
The same, saved without asking |
DHCPNT31 /auto /apply |
Every adapter with EnableDHCP = 1 and a published MAC |
DHCPNT31 /auto /apply /stay |
The same, then renews every half lease (at least a minute, at most a day) |
C:\> DHCPNT31 52-54-00-12-34-56 /apply
DHCPDISCOVER sent (try 1)
DHCPOFFER 192.168.1.50
DHCPREQUEST sent (try 1)
=== LEASE ACQUIRED ===
IP Address : 192.168.1.50
Subnet Mask: 255.255.255.0
Gat
70E9
eway : 192.168.1.1
DNS Server : 8.8.8.8
Lease Time : 86400 seconds
DHCP Server: 192.168.1.1
An explicit MAC addresses the first eligible adapter in registry order.
/auto reads the MAC each adapter publishes in its registry parameters and
handles only adapters whose EnableDHCP DWORD is exactly 1.
| Value | Key |
|---|---|
IPAddress, SubnetMask, DefaultGateway |
Services\<adapter>\Parameters\Tcpip |
NameServer |
the global resolver settings |
The values use NT 3.1's string format. Each successful apply adds a line to
C:\DHCPNT31.LOG.
The RLTKLANT NT 3.1 Setup package maintains one item of its own in the
installing user's Program Manager Startup group. NT 3.1 does not run the
old OEM-setup Run value at logon. The package has passed these Setup
checks:
- native Update and Configure
- disabling and removing the item
- moving it from a custom group
- running Setup again
- refusing to replace an unrelated command with the same title
Important
The Startup item runs for the installing user only. It is not an all-user DHCP service.
With more than one adapter, each must already have a valid, distinct, non-overlapping saved IPv4 subnet. The client binds the selected local address, and that address must exist on the running system. Ambiguous or unconfigured multi-adapter networks are rejected before anything is sent.
bash build.shThe executable is freestanding (no C runtime DLL). It targets the Pentium
instruction set and PE subsystem 3.10, and imports only KERNEL32, ADVAPI32
and WSOCK32. bin/DHCPNT31.EXE is the current build.
All tests ran under QEMU; no physical hardware was used.
- Single adapter. DHCP discovery, request and registry application completed.
- Two subnets. In an NT 3.1 guest with two distinct configured subnets, the full handshake completed on the enabled PCI adapter. The disabled USB adapter sent no DHCP packets.
- Cold logon. Packet captures show one PCI DHCP exchange. With DHCP disabled, no DHCP traffic appeared for over 60 seconds.
- Packet parser. It checks the received length, BOOTREPLY identity, hardware type and length, transaction id, client MAC, magic cookie and option bounds. An ACK must name the selected server and the offered address. The parser passes truncation, header, identity and option tests and 65,536 fuzz datagrams under ASan / UBSan.
- Receive waits. Each wait is bounded to five seconds with Winsock 1.1
select.
Warning
These tests do not cover unconfigured or overlapping networks, live
address replacement or physical hardware. The /stay renewal has been
built but not yet run in a guest.
Copyright (C) 2026 ages2001.