DHCP Server Overview
Dynamic Host Control Protocol (DHCP), is an open, industry standard
protcol that reduces the complexity of administering networks based on TCP/IP.
Each host computer connected to a TCP/IP network must be assigned a unique
IP address. DHCP frees network administrators from having to configure all
of the computers by hand.
The Sambar DHCP Server was created to supply each network client with an
IP addresse, subnet mask, default gateway, and IP address for a DNS server.
Using DHCP a host is dynamically configured
to the network using a simple handshake that is build-in to Windows
and Unix operating systems; the client requests a network address
and various additional configuration parameters, and the server replies
with an address that can be used for a specified duration (lease period).
The Sambar DHCP Server only implements a subset of the DHCP protocol
necessary to serve:
- IP address (and subnet)
- Gateway address
- DNS Server address (Sambar DNS Server, if enabled;
otherwise DNS Primary/Secondary from [common] section of the
- Domain name
- WINS (NetBIOS Name Server)
The DHCP server works with Windows 98/2000/NT and other DHCP clients.
If Windows 95, NT or Unix machines are configured to use DHCP, the machines
will have no networking ability unless the DHCP server is up and
running at the time the machines boot. Windows 98 and 2000 machines do
not have this limitation because the use a special ("169.x.x.x" range)
temporary address until a defined IP address can be assigned by the
The Sambar DHCP server is limited to serving a single range of IP addresses.
So, if you have available addresses 10.0.0.2 through 10.0.0.100, your
network components are scattered throughout this range. The DHCP server
attempts to PING an address before assigning it for use, so machines
that are inadvertently configured for a specific address within the range,
or machines that have not freed their IP address after a lease expires
can safely continue to operate.
- From the System Administration -> Server Configuration
form set the Act as DHCP Server parameter to Yes and then
update the server configuration.
- Restart the Sambar Server.
On the main System Administration page, a DHCP Server
entry should appear along with various configuration options.
dhcp.ini Configuration File
If Act As DHCP Server is set to true in the
config.ini the DHCP Server is initialized at startup.
The parameters of the dhcp.ini configuration file (below)
guides the DHCP Server operation.
||The subnet from which to serve the IP addresses.
The gateway to use for communication outside the subnet (this is
typically your router).
The domain name to serve to hosts for fully qualified domain name lookups.
|Force IP Bind
This allows you to configure the DHCP listener to bind to a specific
interface on a multi-homed machine.
|IP Range Lower Limit
The lowest IP address that should be served by this DHCP server.
|IP Range Upper Limit
The highest IP address that should be served by this DHCP server.
Note: A check is performed to ensure that the lowest
and highest IP address ranges conform with the subnet mask specified.
|Default Lease Time
The default time, in seconds that a DHCP lease should be provided a host.
|Maximum Lease Time
The maximum time, in seconds that a DHCP lease should be provided a host.
Display DHCP requests via the GUI display (if enabled).
Integration with DNS
Domain Name System (DNS) servers provide name resolution for network
resources and are closely related to DHCP services. When the
Sambar DNS Server is enabled, DHCP clients are
automatically registered with the DNS server. Using this mechanism,
the DNS server can respond to pointer (PTR) and address (A) resource
records on behalf of DHCP-enabled clients.
The tight integration between the DHCP and DNS servers is quite compelling;
if both servers are enabled in the Sambar Server, the DNS server will
resolve host names to IP addresses without any manual intervention.
Every time a computer comes on-line or drops
off-line the DNS tables are updated automatically.
A lease is the length of time that a DHCP server specifies that a client
computer can use an assigned IP address. When a lease is made to a client,
it is described as active. At half-lease period, the client must renew its
address lease assignment with the server. The duration of leases affects
how often clients attempt to renew those leases that have been assigned with
the DHCP server.
The DHCP leases are stored in the config/dhcp.dat. Leases are
saved (one lease per line) in the format:
The lease-duration is specified in minutes, and the lease-time is
in seconds since 1970.
Reservations allow permanent address lease assignments by the DHCP server.
Where reservations are used, they ensure that a specific hardware device
on the subnetwork can always use the same IP address.
To pre-define/reserve an IP-address for a given host such as print servers
or other special devices, you must create a lease record entry as specified
above (using the MAC-address), and set the lease-time to 0.
This will result in the lease never expiring for the device.
To obtain MAC address on Windows NT/2000/XP based clients, type
ipconfig /all at the comand prompt and view the
Physical Address field. For Windows 95/98/ME based clients,
Winipcfg.exe, and view the Adapter Address field.
DHCP operations fall into four basic phases. These phases are IP lease request, IP lease offer, IP lease selection, and IP lease acknowledgement.
IP Lease Request
Whenever a computer comes on line, it checks to see if it currently has an
IP address leased. If it doesn't, it requests a lease from a DHCP server.
Because the client computer doesn't know the address of a DHCP server, it
broadcasts a DHCPDISCOVER message across the network. This message consists
of the client computer's Media Access Control (MAC) address (the hardware
address built into the network card) and its NetBIOS name.
IP Lease Offer
When a DHCP server receives an IP lease request from a client, it extends
an IP lease offer. This is done by reserving an IP address for the client
and broadcasting a DHCPOFFER message across the network. This message
contains the client's MAC address, followed by the IP address that the
server is offering, the subnet mask, the lease duration, and the IP address
of the DHCP server making the offer.
IP Lease Selection
When the client PC receives an IP lease offer, it must tell all the other
DHCP servers that it has accepted an offer. To do this, the client broadcasts
a DHCPREQUEST message containing the IP address of the server that made
the offer. When the other DHCP servers receive this message, they withdraw
any offers that they might have made to the client. They then return the
address that they had reserved for the client back to the pool of valid
addresses that they can offer to another computer. Any number of DHCP
servers can respond to an IP lease request, but the client can only accept
one offer per network interface card.
IP Lease Acknowledgement
When the DHCP server receives the DHCPREQUEST message from the client, it
initiates the final phase of the configuration process. This acknowledgement
phase involves sending a DHCPACK packet to the client. This packet includes
the lease duration and any other configuration information that the client
might have requested. At this point, the TCP/IP configuration process is