0% found this document useful (0 votes)
151 views38 pages

Dual DHCP DNS Server: Installation and Configuration Manual

This document provides installation, configuration, and usage instructions for a dual DHCP and DNS server software. It describes how to install the software on Windows and Linux, how to configure DNS and DHCP services, zones, and options. It also explains the processes the server uses for assigning IP addresses via DHCP and resolving DNS queries, including coordination between primary and secondary servers and replication of zone data.

Uploaded by

rqi11
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
151 views38 pages

Dual DHCP DNS Server: Installation and Configuration Manual

This document provides installation, configuration, and usage instructions for a dual DHCP and DNS server software. It describes how to install the software on Windows and Linux, how to configure DNS and DHCP services, zones, and options. It also explains the processes the server uses for assigning IP addresses via DHCP and resolving DNS queries, including coordination between primary and secondary servers and replication of zone data.

Uploaded by

rqi11
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 38

Dual DHCP DNS Server

Installation and Configuration Manual

Dual DHCP DNS Server Manual V3 Page 1


1 Contents

1 Contents .....................................................................................................................................2
2 Preface .......................................................................................................................................5
3 Installation..................................................................................................................................6
3.1 Windows Installation............................................................................................................6
3.2 Windows Uninstallation .......................................................................................................6
3.3 Windows Compiling .............................................................................................................6
3.4 Linux Installation ..................................................................................................................7
3.5 Linux Compiling ...................................................................................................................7
3.6 Linux Daemonizing ...............................................................................................................7
4 Configuration ..............................................................................................................................9
4.1 SERVICES .............................................................................................................................9
4.2 LISTEN_ON ..........................................................................................................................9
4.3 LOGGING .............................................................................................................................9
4.4 DNS_HOSTS ....................................................................................................................... 10
4.5 ALIASES ............................................................................................................................. 10
4.6 WILD_HOSTS ..................................................................................................................... 11
4.7 DNS_ALLOWED_HOSTS ...................................................................................................... 11
4.8 DOMAIN_NAME................................................................................................................. 11
4.9 MAIL_SERVERS .................................................................................................................. 12
4.10 FORWARDING_SERVERS ..................................................................................................... 12
4.11 CONDITIONAL_FORWARDERS ............................................................................................. 12
4.12 ZONE_REPLICATION ........................................................................................................... 13
4.13 TIMINGS ............................................................................................................................ 14
4.14 RANGE_SET ....................................................................................................................... 14
4.15 GLOBAL_OPTIONS .............................................................................................................. 15
4.16 Static Host Sections ............................................................................................................ 16
4.17 HTTP Interface ................................................................................................................... 16
5 Running of Dual Server .............................................................................................................. 18
5.1 Windows ........................................................................................................................... 18

Dual DHCP DNS Server Manual V3 Page 2


5.2 Linux ................................................................................................................................. 19
6 Process of Allotting Addresses ................................................................................................... 20
7 Process of Resolving Addresses .................................................................................................. 22
7.1 General ............................................................................................................................. 22
7.2 Dual Server Resource Records............................................................................................. 22
7.2.1 Records loaded from DualServer.ini files. ..................................................................... 22
7.2.2 Records added by DHCP Service .................................................................................. 23
7.2.3 Records replicated from Primary Server ....................................................................... 23
7.2.4 Cached Records .......................................................................................................... 23
7.3 Dual Server Queries Supported ........................................................................................... 23
7.4 Forwarding ........................................................................................................................ 23
7.4.1 Non-Authorized Forwarding ........................................................................................ 24
7.4.2 Authorized Forwarding ............................................................................................... 24
7.5 Replicated Operation. ........................................................................................................ 24
7.6 Co-Ordination between DHCP and DNS components............................................................ 24
7.7 DHCP Co-Ordination between two instances of Dual Server ................................................. 24
7.8 DNS Co-Ordination between two instances of Dual Server. ................................................... 25
7.9 Replication Schemes .......................................................................................................... 25
7.9.1 Dual Server with only DNS Service as Primary and Secondary Server. ............................. 25
7.9.2 Dual Server with DNS and DHCP as Primary Server and Dual Server with only DNS as
Secondary Server ...................................................................................................................... 25
7.9.3 Dual Server with DNS and DHCP as Primary Server and third party DNS server as
Secondary Server. ..................................................................................................................... 26
7.9.4 Dual Server as secondary server and third party server as primary server. ..................... 26
7.9.5 Dual Server with only DHCP Service as Primary and Secondary Server............................ 26
7.9.6 Dual Server with DNS and DHCP as Primary Server and Dual Server with DNS and DHCP as
Secondary Server ...................................................................................................................... 26
7.9.7 Dual Server with only DNS (or third party DNS) as Primary and Dual Server with DHCP as
Secondary. ................................................................................................................................ 27
7.9.8 Conditional Forwarding ............................................................................................... 27
7.9.9 Domain with child Zones ............................................................................................. 27
8 DHCP OPTIONS ......................................................................................................................... 29
8.1 Specifying options and values in Dual DHCP DNS Server ....................................................... 29

Dual DHCP DNS Server Manual V3 Page 3


8.2 Filtering DHCP Ranges ........................................................................................................ 31
8.2.1 Mac Range Filters ....................................................................................................... 31
8.2.2 Vendor Class and User Class Filters .............................................................................. 31
8.2.3 Subnet Selection Filters............................................................................................... 32
8.3 List of DHCP Options Names (in Dual DHCP DNS Server) ....................................................... 33
8.4 Dual Server specific DHCP Header Field Options................................................................... 35
9 Debugging ................................................................................................................................ 36
9.1 Windows ........................................................................................................................... 36
9.2 Linux ................................................................................................................................. 36
10 Other Recommended Software .............................................................................................. 38
10.1 Open DHCP Server ............................................................................................................. 38
10.2 Open TFTP Server............................................................................................................... 38

Dual DHCP DNS Server Manual V3 Page 4


2 Preface

DHCP Server allots the IP addresses to computers, while DNS server resolves them.

You need DHCP Server if you do not want to manually maintain IP Addresses or you have less IP
Addresses than number of machines you have, as dynamic DHCP Server will recycle IP Addresses on
machines.

DNS Server is needed for resolving hostnames to their IP addresses. Normally your ISP will provide you
with DNS Service, which will resolve external names.

Now if you have home/small office network with internal machines, your ISP's DNS Server will not have
this list and these machines won’t be resolved from each other. You may use your own DNS Server but
maintaining IP addresses against the hostnames will be tedious task. Windows do provide slow NBNS
protocol to overcome this issue but Linux/Unix machines don’t use this. Other solution is to configure
Dynamic Updates but configuring it is too complex.

Dual DHCP Server is straight answer to above issues. It is combined DHCP DNS Servers. DNS Server will
resolve external names and it would also resolve DHCP Server allotted hosts to their IPs automatically.
You can also use this server as DHPC Server only or caching DNS Server only.

The salient features are:

 Either DHCP or DNS or Both Services can be used.


 DHCP hosts automatically added to DNS, If both services used
 DHCP Supports 125 ranges, all options, range specific options
 DNS Supports Zone Transfer and Zone Replication.
 DHCP Supports BOOTP Relay Agents, PXE Boot, BOOTP.
 Dynamically Detects Listening Interfaces, can listen on 125 interfaces
 HTTP Interface for Lease Status.
 Filtering of Ranges by Mac Range, Vendor Class and User Class
 Very easy configuration, no Zone files required.
 Allows Fully Replicated operations for both DHCP and DNS
 Very Low Memory and CPU use
 Can be installed and used by person not having DNS/DHCP Concepts

Dual DHCP DNS Server Manual V3 Page 5


3 Installation
3.1 Windows Installation
Installation of DualServer on Windows is straightforward. Just run the Installer and it installs.
Windows Service is automatically created. You can start/stop the Service from Windows Service Control
Applet, also setup as Auto Start or Manual Start.

3.2 Windows Uninstallation


The uninstaller, in Control Panel (Programs), cleanly installs the program and also removes the Windows
Service. If you want to remove the windows service but keep the installation run the utility (in Admin
Mode) RemoveService.exe from installation directory. You can add it back using utility InstallService.exe
from same place.

3.3 Windows Compiling


The current version is compiled on 64bit gcc compiler. 64 bit version will not cause Y2038 issue.
If you have old 32bit computer and need 32bit version, please download 32 version. You can also
compile from source:-

g++ -o DualServer.exe DualServer.cpp -lwsock32 -liphlpapi -lws2_32

Dual DHCP DNS Server Manual V3 Page 6


3.4 Linux Installation
Expand the GZ archive to any directory (preferably /opt/dualserver ) and change the permission of file
dualserverd with chmod 744 dualserverd, if needed. Linux Installation is easy too but in Linux, we need
to create script files for daemonization. Also recompiling may be needed.

Warning: dualserver (Linux version) has been designed to run only on Linux Operating System and may
not run on other operating systems like BDS, Mac and Solaris.

3.5 Linux Compiling


The enclosed dualserver executable file may only run on Linux 64 bit version. For 32 bit Linux system,
you can recompile on 32bit machine:-

#g++ dualserverd.cpp -odualserverd -lpthread


#g++ dualserverd.cpp -odualserverd -lpthread -lgcc_s

You need C++ compiler for Versions 3 onwards, as these versions use STL. If you have only C Compiler,
you need to download and use Version 2.1 only.

3.6 Linux Daemonizing


If your Linux flavor supports chkconfig command, you can use the enclosed rc.dualserver file to add the
service. Just create a symbolic link /etc/init.d/dualserver to /opt/dualserver/rc.dualserver in init.d
directory and make it executable. Also change the file paths (depending on where you have installed the
executive and log file directory) in this file. Then you can use chkconfig command to add the daemon:-

#ln -s /opt/dualserver/rc.dualserver /etc/init.d/dualserver


#chmod 755 /etc/init.d/dualserver
#chkconfig --add dualserver
#chkconfig dualserver on

Last command is for automatic start/stop only. That’s all you may need on such Linux flavors.

Some of the Linux flavors like debian support rcconf command, which is very similar to chkconfig
command. Nothing more is required to be done for flavors supporing chkconfig or rcconf command.

If your flavor doesn’t support chkconfig or rcconf you can manually do following 2 steps:-

#ln -s /opt/opendhcp/rc.dualserver /etc/rc.d/dualserver


#chmod 744 /etc/rc.d/dualserver

For automatic start Add the following line to /etc/rc.d/rc.local file or /etc/inittab file or /etc/rc.d/rc.inet2
file (preferred).

Dual DHCP DNS Server Manual V3 Page 7


# Start the Dual Server daemon:
if [ -x /etc/rc.d/rc.opendhcp ]; then
/etc/rc.d/rc.opendhcp start
fi

Dual DHCP DNS Server Manual V3 Page 8


4 Configuration
The entire configuration for Dual Server is done in file DualServer.ini (or dualserver.in in Linux). You
should find and keep this file in your installation directory in Windows. In Linux you can keep this file at
any location. Configuration file has many sections. DNS configuration is covered in first few sections and
DHCP configuration is covered in last few sections. These sections are described further. Comments in
red are for guiding purpose only and should not be copied in actual DualServer.ini file. Each section have
many entries in the form Name=Value. Any entry starting with punctuation mark is a comment and such
entry will be ignored.

4.1 SERVICES
You can use Dual Server as DHCP Server only or DNS Server only or both. Using both services only brings
the star feature alive, means DHCP allotted hosts are automatically added to DNS Service. If you use
both services you don’t have to configure the Dynamic Updates.

[SERVICES]
DNS #This entry enables DNS Service of Dual Server
DHCP #This entry enables DHCP Service of Dual Server

4.2 LISTEN_ON

This section is common to both DHCP Service and DNS Service. This section restricts the server to listen
for DHCP and DNS requests on selected interfaces. There may be many interfaces on multi-homed
servers. Out of these interfaces, you can still restrict which interface(s) should listen for requests.
DualServer only listens on Static Interfaces which means the IP address is fixed and not obtained from
another DHCP Server. Any dynamic interfaces specified here will be ignored. If no interface is specified
here, Dual Server listens on all Static Interfaces.

[LISTEN_ON]
192.168.0.1
192.168.55.23

4.3 LOGGING
Logging level should be specified under section [LOGGING]. Logging will be done only if run as Service.
LogLevels can be set as None, Normal or All. It is advisable to keep logging to Normal. Normal means
errors and DHCP renewal messages. None and All are self-explanatory. Log levels can be separately
specified for DNS and DHCP Services.

[LOGGING]
DNSLogLevel=Normal #Can be None, Normal or All

DHCPLogLevel=Normal #Can be None, Normal or All

Dual DHCP DNS Server Manual V3 Page 9


4.4 DNS_HOSTS
Section [DNS_HOSTS] is list of all the hostnames, which will be resolved by Dual Server. Each host should
be specified with it’s IP address. Dual Server loads hosts from here to it’s memory and resolves to give IP
against the hostname. Also Dual Server will resolve the IP address to it’s hostname, which is called
reverse lookup. You don’t have to make reverse lookup entries, these are automatic. There is no limit to
number of entries here. Host here can be bare names (without domain extension) or with domain
extension. Bare names assume default domain name specified under [DOMAIN_NAME]. Some names
are repeated with different IP, which is Okay, as hosts can have multiple IPs.

[DNS_HOSTS]
OracleServer.yahoo.com=192.168.55.43
DNS=192.168.55.1
DNS=192.168.55.2
cpltcaxd02b=192.168.55.2
homehost.external.com=187.178.187.178
strange=192.168.6.11
soho=192.168.0.111

You need not specify your hosts in DualServer.ini file, you can also specify in a separate file. You can just
make all the above entries in filename of your own choice and specify the just the filename here.
Comments are not allowed in this section, when you do this but allowed in file myhostfile.txt. Only one
file is allowed here.

[DNS_HOSTS]
@myhostfile.txt

4.5 ALIASES
You can use alias names to hostnames specified above. For example if you have previously specified the
hostname=192.168.4.6 in [DNS_HOSTS] section, you can add alias here as newhost=hostname. Now
your DNS query for both hostname and newhost will be resolved to IP 192.168.4.6

[ALIASES]
MyHost=HomeHost
DBServer=DB2Server.com
gmail=gmail.google.com
workgroup=www
dns1 = dns

Dual DHCP DNS Server Manual V3 Page 10


4.6 WILD_HOSTS
Wild host resolve names based on wild card match. Wild card char are * and ?. Axfr/Zone queries do not
include wild hosts and these are not replicated from Primary to Secondary Server. You need to create
WILD_HOSTS entries on both Primary and Secondary Servers. Only 256 wild host entries are allowed in
current version 7.40. To increase this number you need to change the line MAX_WILD_HOSTS 256 in
DualServer.h and recompile.

[WILD_HOSTS]
*.google.com=64.136.20.120
www.*.com=127.0.0.1
*xyz.com*=4.2.2.3
*.hostnotfound.com=0.0.0.0

You can give the target IP as 0.0.0.0 if “host not found” response is required. This last example plays a
very useful role in blocking some of the external web sites. For example you want to block all google
sites, you can make an entry like:

[WILD_HOSTS]
*.google.com=0.0.0.0

4.7 DNS_ALLOWED_HOSTS
These entries restrict the access to DNS Server. There are two different protocols are used for accessing
DNS records, UDP and TCP/IP. UDP is used for hostname and reverse lookup while TCP/IP is used for
zone transfer. SOA and NS queries can be done using any protocols. This section allows/restricts UDP
queries. Please specify the range of hosts which will be able to query this server. Hosts "queried for" has
nothing to do with these ranges. 32 ranges can be specified. You can simply allow all hosts by specifying
single range 1.0.0.1-255.255.255.254 as second example below:-

[DNS_ALLOWED_HOSTS]
192.168.0.1-192.168.255.254
1.0.0.1-255.255.255.254

4.8 DOMAIN_NAME
Domain Name specified in this section is the default domain for all the bare hosts and aliases specified
under previous sections. Suppose you specify the domain name as mydomain.com then an entry in
[DNS_HOSTS] section like www=192.168.55.3 will be treated as www.mydomain.com=192.168.55.3.
Just specifying a domain name do not make this server authorized for the domain. To make this server
authority for domain, you need to specify both forward zone and reverse zone with = sign.

Dual DHCP DNS Server Manual V3 Page 11


[DOMAIN_NAME]
workgroup.com #Not an Authority
Above entry will make the workgroup.com as the default domain for this server but still unfound
queries may be forwarded to forwarding servers, if not resolved locally.

[DOMAIN_NAME]
workgroup.com=55.168.192.in-addr.arpa #Server is an authority for zones

Above entry will make the server an authority for both zones workgroup.com and 55.168.192.in-
addr.arpa and any query with above domain names will only be locally resolved and not be forwarded to
forwarding servers. Authorized server will also return SOA, NS and AXFR queries.

4.9 MAIL_SERVERS
These are default mail servers for domain. Entries should be in form HOST=Priority. Hosts can be local or
external. Up to 5 servers can be specified. Mail Servers will be added as attributes mXRecord in forward
zone only. The hostnames below need not be internal.

[MAIL_SERVERS]
MailServer1.com=10
MailServer2.net=20

4.10 FORWARDING_SERVERS
To resolve external hosts, DNS Server needs to forward the query to external DNS Servers and get the
answer back. Dual Server do caches the external hosts for a duration which is equal to expiry, as
returned in the response from forwarding servers. Up to 125 servers can be specified here. However
only the last successful server will be repeatedly used unless it fails (then next and so on). However
query will be forwarded to these servers if it do not match with conditional forwarders.

[FORWARDING_SERVERS]
192.168.0.1
10.10.10.1

4.11 CONDITIONAL_FORWARDERS
Dual Server resolves queries either locally if query’s domain name extension is local else by forwarding
to forwarding DNS Servers above. But Dual Service allows you to forward selected queries to specific
DNS Servers, based on matching the last part of DNS Query. Something this is also referred as DNS
Proxy. For example you want to forward all queries with domain name mydomin.com to your special
DNS Server 192.168.55.45. You can make an entry as:-

Dual DHCP DNS Server Manual V3 Page 12


[CONDITIONAL_FORWARDERS]
mydomain.com=192.168.55.45
55.168.192.in_addr_arpa=192.168.55.45

Now queries like a.mydomain.com will be forwarded to 192.168.55.45 but all other external queries still
will be forwarded to servers under [FORWARDING_SERVERS]. You can also make entries here for
reverse lookup like 34.158.195.in-addr.arpa=192.168.55.45 so that reverse queries can also be
forwarded to your special DNS Servers.

4.12 ZONE_REPLICATION
Normally for redundancy, there are two DNS Servers are used one is primary and other secondary. To
make sure both DNS Servers have identically information, zone replication scheme is used. All the
entries are done on primary server and secondary server automatically replicates entries from primary
server. This is done by DNS Protocol’s zone transfer functionality. On sending axfr type query, full zone is
returned, zone is all entries having same zone extension. Secondary server send axfr query for zone and
copies all entries returned by primary server, discarding it’s all previous entries. Zone replication is done
periodically after lapse of a time called Refresh Time. Make sure the Dual Server(s) actually listen on
these interfaces.

[ZONE_REPLICATION]
Primary=192.168.55.254 #Primary or Master zone DNS Server

Secondary=192.168.55.23 #Secondary or Replicated zone DNS Server

Other than secondary server, some clients may also need to pull full zone or there may be some more
servers who replicate or pull full zone. DNS Servers of other vendors can also be specified as
AXFRClients. These clients/servers can be specified in this section as AXFRClient like:-

[ZONE_REPLICATION]
Primary=192.168.55.254
Secondary=192.168.55.23
;AXFRClient=192.15.0.1 #This server/client can pull zones too
;AXFRClient=192.16.0.3 #This server/client can pull zones too

;AXFRClient=192.16.0.4 #This server/client can pull zones too


;AXFRClient=192.17.0.6 #This server/client can pull zones too

If only DHCP or DNS Service is used then also Replication can be used and for Replicated operation the
Primary and Secondary Servers should be specified here.

Dual DHCP DNS Server Manual V3 Page 13


4.13 TIMINGS
Default host expiry is one kind of time DNS Servers need. DHCP Server needs maximum lease time. Both
of these have single entry called AddressTime. Zone replication needs Refresh, Retry, Expire and
Minimum time parameters. All these times need to be added under TIMINGS section.

[TIMINGS]
AddressTime=3600 #This is DNS host expiry time for all local hostnames also Lease Time for DHCP

Refresh=360 #Secondary DNS Server’s refresh time

Retry=10 #If zone replication fails, retry after this time


Expire=36000 #Zone expires after this time, if not refreshed

Minimum=20 #Minimum host time in zone

#MinCacheTime=1000 #Only for testing


#MaxCacheTime=50000 #Only for testing

For testing of DNS Caching, there are MinCacheTime and MaxCacheTime can be specified here. But in
actual use, please comment or remove these entries.

The proceeding Sections are DHCP configuration Sections. Clients can be allotted addresses in two ways,
dynamically from DHCP Range or statically. For static addresses, client section needs to be created for
each static client against its MAC Address. BOOTP clients are always static.

4.14 RANGE_SET
DHCP Ranges are required for Dynamic Address allocation. The DHCP Ranges are grouped into
[RANGE_SET]s, so that range specific options can be specified for a group of ranges at one place. Each
[RANGE_SET] can contain actual DHCP Ranges, Range specific options and Range Filters. Options have
option tags (0-254) and values can be specified many different ways. Please Refer to DHCP Options and
Range Filters topics for more info on these. The total ranges together in all [RANGE_SET]s is limited to
125 and there can also be 125 [RANGE_SET]s max. You can specify one or more ranges in each
[RANGE_SET] section, in format specified. DHCP Server will allot addresses from these ranges. Static
Hosts and BootP clients do not need ranges. You need not specify any [RANGE_SET] if all clients are
Static. Next is example of simple DHCP Range and may be sufficient for home/SOHO use.

[RANGE_SET]
DHCPRange=192.168.0.1-192.168.254 #Actual DHCP Range
SubnetMask=255.255.255.0 #Subnet Mask for range

Router=192.168.0.1 #Default Gateway

AddressTIme=500 #Lease Expiry Time after which client will renew.

The SubnetMask and Router are range specific options and will be added to all DHCP responses falling in
this range. Even you need not specify these options in [RANGE_SET] if you have already specified in

Dual DHCP DNS Server Manual V3 Page 14


[GLOBAL_OPTIONS] section. Keywords SubnetMask and Router are option names (specific to Dual
Server) but clients are sent with option tags. You can also use option tags directly as below.

[RANGE_SET]
DHCPRange=192.168.0.1-192.168..254 #Actual DHCP Range

1=255.255.255.0 #Subnet Mask for range


3=192.168.0.1 #Default Gateway

51=500 #Lease Expiry Time after which client will renew.

You can speciy as many options in a [RANGE_SET]. Option values can also be multiple ways please refer
to DHCP Options topic. You can also filter [RANGE_SET]s based on client sent values Mac Address,
Vendor Class and User Class. These is advance topic and please refer to Range Filters topic for more
info. Below is an example of a filtered range.

[RANGE_SET]
FilterMacRange=00:0d:60:c5:4e:00-00:0d:60:c5:4e:ff #Mac Filter, can be hex only
FilterMacRange=00:0e:12:c5:4e:00-00:0e:12:c5:4e:ff #Another Mac Filter can be 30 more

FilterVendorClass="MSFT 5.0" #Vendor Class Filter


FilterVendorClass="MSFT 5.1" #Another Vendor Class Filter
FilterUserClass="My User Class 4.0" #User Class Filter using text

FilterUserClass=123,56,87,123,109,0,23,56,156,209,234,56 #Another User Class Filter using bytes


FilterUserClass=00:0d:60:c5:4e:0d:60:c5:4e #Another User Class Filter using hex

DHCPRange=10.0.0.5-10.0.0.10 #Actual DHCP Range

DHCPRange=10.0.10.1-10.0.10.254 #One more DHCP Range

SubnetMask=255.255.255.0 #DHCP option for range set


DomainServer=10.5.6.90, 11.4.5.6 #another option for range set

Router=11.5.6.7, 10.0.99.1 #Default Gateway option

4.15 GLOBAL_OPTIONS
If some of DHCP Options are common to all the DHCP Ranges and Static Clients, you can specify these
under [GLOBAL_OPTIONS] and you need not specify these options in [RANGE_SET] or under static
clients. DHCP Options under these sections would supplement (but not replace) client specific options
and [RANGE_SET] options. Here only some examples are given, for complete list of mnemonic option
names please refer DHCP Options topic. However all 254 DHCP options can be specified using Tag
Names directly.

[GLOBAL_OPTIONS]
SubNetMask=255.255.255.0
DomainServer=192.168.1.1, 192.168.1.2
Router=192.168.1.1
RenewalTime=0

Dual DHCP DNS Server Manual V3 Page 15


RebindingTime=0

4.16 Static Host Sections


You can create Static Host Sections for hosts having fixed IP addresses. A new section against it’s MAC
Address need to be created for each client. You can specify client specific options under the client
section. You need to specify IP Address only. If IP is not specified for a Static Host, this host would not be
able to get an IP from Open DHCP Server. (This feature can be used to prevent some clients from getting
any IP from this Server, even dynamic address won’t be available for such client). All options are
optional. For BOOTP requests, only these options (specified in client section) would be sent. However
for DHCP requests, missing Options will be supplemented first from matching [RANGE_SET] options (if IP
falls in any range) then from [GLOBAL_OPTIONS].

Following example below is simple most section where only IP is specified. Other options will be
supplemented from [DHCP_RANGE] and [GLOBAL_OPTIONS].

[00:41:42:41:42:00] #This is a client with MAC addr 00:41:42:41:42:00


IP=192.168.0.200 #Only IP is specified for this client

This is another example with some client specific options

[00:41:42:41:42:05] #This is a client with MAC addr 00:41:42:41:42:05


IP=192.168.0.211 #IP Address for this client
HostName=TestHost #DHCP will offer this host name to client
DomainServer=10.5.6.90, 11.4.5.6 #Domain Name Server for client
Router=11.5.6.7, 4.6.7.34 #Default Gateyway for client

Open DHCP Server will never allot any address to 00:41:42:41:42:76 as 0.0.0.0 IP has been specified

[00:41:42:41:42:76] #This is a client with MAC addr 00:41:42:41:42:00


IP=0.0.0.0 #No IP is specified for this client

#Following hosts will also never get an IP from this server as no IP is specified
[ff:00:27:78:7b:01] #Easy way to specify no IP

[ff:00:27:78:7b:02]
[ff:00:27:78:7b:03]HTTP_INTERFACE

4.17 HTTP Interface


Dual Server publishes a page showing the Lease Status. The default IP for this is 127.0.0.1 (windows) or
first interface on Linux and default port is 6789. You can change both IP and port here.

[HTTP_INTERFACE]
HTTPServer=192.168.0.3:6789

If no port is specified, it is 6789

Dual DHCP DNS Server Manual V3 Page 16


In addition to HTTPServer, you can specify upto 8 http clients, which can access this http page. If no
client is specified, all clients can access this page.

[HTTP_INTERFACE]
HTTPServer=192.168.55.254
HTTPClient=192.168.0.11
HTTPClient=192.168.23.123

Dual DHCP DNS Server Manual V3 Page 17


5 Running of Dual Server
5.1 Windows
In Windows, you can run Dual Server in two different modes a) As Windows Service b) as StandAlone
from Start Menu/Command Line. For running it as Service you should go to windows Services Control
Applet and start the Service called Dual DHCP DNS Sever. For running from Command Window, you

need to first Stop the Service and then run either from Command Line or Start menu. For normal
operation you should run as Window Service from Service Control Panel.

Dual DHCP DNS Server Manual V3 Page 18


5.2 Linux
In Linux too you can run the dualserver in modes:-

a) Verbatim Mode (using -v argument)


b) Daemon (NOT using -v argument)

This program uses 2 or 3 helper files, which should be passed as arguments.

a) -i[inifile], where configuration settings can be specified, default is ./etc/dualserver.ini


b) -l[logfile] dumps log to this file in daemon mode, default is syslog
c) -s[statefile] saves current leases, default is /tmp/dualserver.state

You can start/run as:-

/opt/dualserver/dualserverd #(daemon with default files)


/opt/dualserver/dualserverd –v # (verbatim with default files)
/opt/dualserver/dualserverd -i inifile -l logfile # (as daemon)
/opt/dualserver/dualserverd -i inifile #(as daemon)
/opt/dualserver/dualserverd -v -i inifile #(as verbatim)

The logfile should include %Y for full year or %y for 2 digit year, %m for month, %d for day of month.
These will be replaced with actual values and this will cause different file every day.

/opt/dualserver/dualserverd -l /opt/dualserver/log/dualserver%Y%m%d.log -i/opt/dualserver/dualserverd.ini

You can also include just %m and %Y if you want monthly log file like:-

/opt/dualserver/dualserver -l <logDirecory>/dualserver%Y%m.log -i<someDirecory>/dualserver.ini

Make sure the directory for logfiles should exit before running the program. If you have already done
the daemonization under section Installation, you can start/stop the dualserver with commands:-

service dualserver start


service dualserver stop

Otherwise you can try:

/opt/dualserver/rc.dualserver start
/etc/rc.d/dualserver start
/opt/dualserver/rc.dualserver stop
/etc/rc.d/dualserver stop

Dual DHCP DNS Server Manual V3 Page 19


6 Process of Allotting Addresses

DHCP part of Dual Server is Dynamic Host Configuration Protocol server, which allots IP addresses to
computers automatically. You may manually setup IP addresses on computers but managing them is
always troublesome process. On networks, where there are many computers, it is nightmare and error
prone. DHCP Server allots address to computers as and when an IP address is requested. DHCP Server
maintains a pool of addresses and keeps on allocating and renewing IP addresses from this pool (or
statically pre-assigned addresses for some computers).

When an address is allotted to a computer, many more parameters of computer are also set like Domain
Name, DNS Server, router/gateway etc. These are called DHCP Options. DHCP Server can use different IP
address pools and options depends on how the request came (which interface, or relay agent), what
parameters are send with request.

As the newly booted computer don’t have IP address, it uses broadcast for discover a DHCP Server on
network, send the request as broadcast and received the allotted address via broadcast till booted
computer gets a IP address of its own.

The actual process is:-

A user turns on a computer with a DHCP client.

The client computer sends a broadcast request (called a DISCOVER or DHCPDISCOVER), looking for a
DHCP server to answer.

The server receives the DISCOVER packet. Based on availability and usage policies set on the server, the
server determines an appropriate address (if any) to give to the client. The server then temporarily
reserves that address for the client and sends back to the client an OFFER (or DHCPOFFER) packet, with
that address information. The server also configures the client's DNS servers, WINS servers, NTP servers,
and sometimes other services as well.

The client sends a REQUEST (or DHCPREQUEST) packet, letting the server know that it intends to use the
address.

The server sends an ACK (or DHCPACK) packet, confirming that the client has a been given a lease on the
address for a server-specified period of time.

When a computer uses a static IP address, it means that the computer is manually configured to use a
specific IP address. One problem with static assignment, which can result from user error or inattention
to detail, occurs when two computers are configured with the same IP address. This creates a conflic t
that results in loss of service. Using DHCP to dynamically assign IP addresses minimizes these conflicts.

Dual DHCP DNS Server Manual V3 Page 20


When DHCP-DISCOVER is received by Dual Server, it does the following:-

a) Look into static hosts, if there is a Static Host entry for that Mac-Address. If one is found, it
temporarily allocated that IP to the client and sends the DHCP-OFFER.
b) If no static host is defined against the Mac-Address of client, it now looks into all the DHCP
ranges under all RANGE_SETs one by one. Once it finds a usable address in any matching range,
it temporarily reserves that address and sends DHCP DISCOVER. The matching range is the one
which :-

 If it has Subnet Selection IP (option 118) or Relay Agent IP falls in same subnet as that of
Subnet Selection IP or Relay Agent IP.
 If there is no Relay Agent involved, the range falls in same subnet that of IP of interface from
which the DISCOVER is received.
 The range has a previously allotted address of same client, which is free or a new free
address is available or an expired address of another client is available.
 If any of the RANGE_SET has MacRange specified and client Mac Address falls in the
MacRange, ranges of only such RANGE_SET are considered. If no RANGE_SET has matching
Mac Range, all [RANGE_SET]s, not having MacRange filter are considered.
 If any of the RANGE_SET has Vender Class specified and client has matching Vendor Class,
Ranges of only such RANGE_SET are considered.
 If any of the RANGE_SET has User Class specified and client has match User Class, Ranges of
only such RANGE_SET are considered.

If you do not have MacRange, VendorClass and UserClass specified for any range (which are
advance filters, used by experts), please ignore last 3 conditions above.

Dual DHCP DNS Server Manual V3 Page 21


7 Process of Resolving Addresses
7.1 General
The primary purpose of DNS Service is to translate the Host Name (normally fqdn meaning hostname
including the domain name) to its IP address(s). DNS Service runs at Query/Reply. There are multiple
type of queries but most common is asking the IP address of host. DNS Service queries its tables and if
found sends the reply. These tables are called Resource Records or RRs.

In standard DNS Servers, these tables are loaded (into memory) from text files called resource records.
Some servers, these records are stored in a backend database.

The complete DNS System is divided into zones (one domain name can have multiple zones). Usually
there is one or more DNS Server for a zone but some DNS server can handle multiple zones. DNS Server
can be an Authorized DNS Server for a zone or just a replicated DNS Server, usually a copy of records
from an authorized DNS Server. Normally a zone will have 2 DNS Server, Primary and Secondary. The
Secondary server replicates records from Primary Server periodically, keeping both Primary and
Secondary Server in Sych. Both of these Servers are Authorized DNS Servers for the Zone.

Fully Qualified Domain name means hostname. zone. For example in www.microsoft.com, www is
actual hostname while microsoft.com is zone. All records which have last part as microsoft.com are part
of zone microsoft.com. These are called forward zone. There are reverse zone too, which is based on IP
address only. An IP address 192.168.55.1 will be considered part of reverse zone 55.168.192.in-
addr.arpa. All the IPs whose first three octates are 192.168.55, will be part of this zone 55.168.192.in-
addr.arpa. 55.168.192.in-addr.arpa is 256 IP zone with subnetmask of 255.255.255.0. We can also define
large zone for example 168.192.in-addr.arpa with subnetmask 255.255.0.0. As you can see all IP
addresses from 192.168.0.1 to 192.168.254.254 will be part of this zone.

A DNS Server resolves the address using Resource Records from:-

a) Its list of authorized entries or non authorized entries.


b) It can forward the queries to its forwarding servers and get the response back.
c) It can cache the previous queries resolved and use this cache to resolve queries.

Forwarding Server too is a DNS Server but this too may not have record for host being queried. Then
forwarding server too can forward the query to it’s own forwarding servers and so on till the query is
resolved or it is no more resolvable.

7.2 Dual Server Resource Records


Dual Server has following type of Records

7.2.1 Records loaded from DualServer.ini files.


These records all loaded from DualServer.ini file from [DNS_HOSTS], [ALIASES] and [WILD_HOSTS]
sections. There is one forward entry for resolving hostname to IP and also there is a reverse entry for

Dual DHCP DNS Server Manual V3 Page 22


resolving IP address to its hostname. The DualServer makes automatic reverse entry. In other words two
records are created from each entry in DNS_HOSTS section. Only one record is created from entries
under ALIASES section and one from MAIL_SERVERS section. WILD_HOST are individually loaded but will
not be replicated in a zone transfer.

7.2.2 Records added by DHCP Service


If DHCP Service is used, it will add its own records. For example, if a new IP has been allotted by DHCP
Server, this record will be added to DNS Records. All hosts allotted by DHCP Service, will be added and
will be removed automatically, when the lease expires. In case of Replicated operation, records will not
be added to Secondary Server directly but to Primary Server and will be replicated to Secondary Server.

7.2.3 Records replicated from Primary Server


In case of Primary/Secondary operation, Secondary Server will not load these records from its
DualServer.ini file but will replicate these from Primary Server by regular zone transfer. Wild host
records are still read from local DualServer.ini file.

7.2.4 Cached Records


When a query is external (means it is out of zone of authorized DNS Server), it forwards the query to its
external DNS Server and gets the reply. It finally send the reply to querying host but also store this
record in its memory for a period of time so that it don’t have to forward this query. These are called
Cached Records.

7.3 Dual Server Queries Supported


Dual Server supports following Queries:-

Query Type Protocol Source of RRs


1 A (Host to IP) udp Loaded from DualServer.ini, Allotted by DHCP, From
2 PTR (IP to Host) udp Forwarded queries and Cache or Replicated
3 MX (Domain’s Mail udp MAIL_SERVERS section of DualServer.ini or replicated from
Servers) Primary
4 NS (Name Server) Udp/tcp Information from DOMAIN_NAME, authorized operation
5 SOA (Start of Authority) udp/tcp only.
6 AXFR (Complete forward tcp Information from DOMAIN_NAME and all other matching
and reverse zone) records to DOMAIN_NAME, authorized operation only.
7 ANY (All records for a udp Matching from all SECTIONS
host)

7.4 Forwarding
Dual Server does forward records to forwarding servers stated under FORWARDING_SERVERS. What
queries are forwarded depends on Authorized and Non-Authorized operation.

Dual DHCP DNS Server Manual V3 Page 23


7.4.1 Non-Authorized Forwarding
When Server is not an authority for the zone, all the queries are attempted from Resource Records
specified in DualServer.ini file or added by DHCP. If the query could not be resolved, it is attempted from
cache (A and PTR records only) and if no matching record is found in cache, it is simply forwarded to
FORWARDING_SERVERS or CONDITIONAL_FORWARDERS. All queries including NS, SOA and AXFR too
will be forwarded. If resolved, these are cached (A and PTR only) before reply is sent to querying host.

7.4.2 Authorized Forwarding


If Server is on Authorized operation for a zone, the only difference is zone specific queries are never
forwarded. Suppose the DualServer is an authority for zone xxxx.com=55.168.192.in-addr.arpa, then all
queries whose last part matches with any Zone name specified above will not be forwarded. In the given
example in previous line, www.xxxx.com will not be forwarded also reverse lookup query 30.
55.168.192.in-addr.arpa will not be forwarded. In case of Authorized Server for a zone, SOA, NS, AXFR
queries will be responded locally.

7.5 Replicated Operation.


The Dual Server have been designed and developed to for replicated operation. Dual Server has both
DHCP and DNS Capabilities. Replication means multiple things to Dual Server:-

a. Co-Ordination between DHCP and DNS components of Single Server Instance.


b. DHCP Co-Ordination between two instances of Dual Server.
c. DNS Co-Ordination between two instances of Dual Server.

7.6 Co-Ordination between DHCP and DNS components


DHCP server allots the IP address to network hosts and DNS Server resolves them. How DNS server
figures out what IP address has been allotted to what host by DHCP server. If you have different DHCP
and DNS Servers, one way is to manually do it, which is error prone and tedious task. Another approach
is to configure Direct Dynamic Update which too needs complex configuration. When Dual Server is
used, there is no need for above as Dual Server does this automatically as it is in-build feature of Dual
DHCP DNS Server.

7.7 DHCP Co-Ordination between two instances of Dual Server


If you want to have more than one DHCP Servers (from any other vendor) in your network for
redundancy, it is not easy as different DHCP Server may assign different IP address to same host. Also
already allotted addresses by one server can be re allotted by different Server. Furthermore, if one
instance goes down, other would force DHCP DISCOVER and DHCP OFFER etc. causing break of Service.
This too would change the allotted address of host.

Dual Server has been designed for well-coordinated replicated operation. Following features make it
unique among other DHCP Servers available.

Dual DHCP DNS Server Manual V3 Page 24


a. All the allotted addresses are immediately replicated to other instance by sending special DHCP
INFORM messages keeping the internal database of both servers identical. This prevents
issuing of same address to multiple hosts or issuing different address to same host.
b. When once instance goes down, other can simply renew the same lease, moment lease
request goes to broadcast mode. This process does not need a DHCP DISCOVER and offer. This
feature prevents the break of Service for clients.
c. All the DHCP ranges and option between different instances should be make consistent by
simply copying single DualServer.ini file from one server to other server.

7.8 DNS Co-Ordination between two instances of Dual Server.


DNS Co-ordination is done in Dual Server using conventional zone transfer scheme. The zone from
Primary server is replicated periodically using axfr queries.

But how about DHCP allotted host. These too are replicated from Primary Server, which automatically
adds the DHCP allotted hostnames and IPs to Primary Server’s zones and increments the serial on
primary server. Now the question comes how about addresses allotted by secondary DHCP Server
instance. Dual Server do not modify zone in secondary server directly. Even if address is allotted by
secondary server, the host is added in the zone of Primary Server only and replicated in secondary
server using axfr.

7.9 Replication Schemes


As Dual Server provides both DHCP service and DNS service, there are multiple ways replication
operation can be setup.

7.9.1 Dual Server with only DNS Service as Primary and Secondary Server.

This is the simple most arrangement. When primary server is started it reads ALIASes, MX and STATIC-
HOST records from it's ini file. When Secondary Server starts, it does not read these entries from its' ini
file, but pulls the full zone from Primary Server. Secondary Server keeps checking the Serial from
Primary Server, using UDP SOA query, if Serial advances, full zone is transferred from Primary. If any
changes are made in ini file of Primary Server, it needs to be restarted and thereafter Secondary Server
would pull automatically all RRs from Primary, after refresh time. Dual Servers do not support NOTIFY.

7.9.2 Dual Server with DNS and DHCP as Primary Server and Dual Server with only
DNS as Secondary Server

This is the conventional arrangement. When Primary Server starts, it reads Hosts, MX, CNAMEs from ini
file. When Secondary server starts/restarts, it pulls Static-Host, MX, Aliases and DHCP added RRs from
Primary Server. Secondary Server keeps updating its database through conventional refresh after
refresh time. When any DHCP lease is added or released at Primary Server, its serial number advances
and secondary DNS Server gets this entry/deletes expired entry ony when refresh takes place.
Secondary server keeps checking the serial of primary and if it advances, full zone is refreshed at

Dual DHCP DNS Server Manual V3 Page 25


secondary server. Similarly changing the Static Entries at Primary Server (followed by restart) also
advances its serial and secondary is refreshes automatically.

7.9.3 Dual Server with DNS and DHCP as Primary Server and third party DNS server
as Secondary Server.

This arrangement too works similar to 2. Dual Server supports only full zone transfer. Dual Server do not
send NOTIFY message and do not send increment zone transfer. The secondary server needs to pull the
full zone after refresh time. When using third party server, please do not specify it as Secondary Server
but add as AXFRClient. The advantage of using Dual Server as Primary is that all DHCP allotted RRs too
are also transferred with zone transfer to third party secondary server. If third party secondary server
supports multiple zones you can use this arrangement and pull zones form multiple Dual Server
instances operating in different zones.

7.9.4 Dual Server as secondary server and third party server as primary server.

This arrangement too works similar to 2. However third party primary DNS Server need to update its
database through DHCP Dynamic update or some other mechanism. Secondary Dual Server would get
updated full zone after refresh time.

7.9.5 Dual Server with only DHCP Service as Primary and Secondary Server.

This arrangement provides backup DHCP Server operation. As both the DHCP Servers are in operation,
new lease may be allotted by any server on a Client Request. However special DHCP INFORM message
keep the database of both servers in synch. When any DHCP lease is added or renewed or released by
Primary Server or Secondary Server, the DHCP Entry is automatically duplicated in other server. Under
this arrangement, if any DHCP server goes down, other is available and will renew the lease
straightaway (without a DICOVER or OFFER).

7.9.6 Dual Server with DNS and DHCP as Primary Server and Dual Server with DNS
and DHCP as Secondary Server

This is the recommended arrangement. When Primary Server starts, it reads MX, Hosts and CNAMEs
from ini file. Secondary server pulls Static-Host, MX, Aliases and DHCP added RRs from Primary Server
when it starts and also periodically by zone transfer. When any DHCP lease is added or released at
Primary Server or Secondary Server, the DHCP Entry is duplicated in other server, through unicast DHCP
inform messages. Also the corresponding RR is added to the zone of Primary Server, which is replicated
in Secondary Server. Dual Server do not modify zone in secondary server directly. Even if address is
allotted by secondary server, the host is added in the zone of Primary Server only and replicated in
secondary server using axfr.

This arrangement provides fully synchronized, load shared, fail safe duplicated DNS and DHCP Server,
with replication and hence highly recommended over any other arrangement.

Dual DHCP DNS Server Manual V3 Page 26


7.9.7 Dual Server with only DNS (or third party DNS) as Primary and Dual Server
with DHCP as Secondary.

This arrangement is not recommended, as Primary will not be updated of changes to Secondary due to
DHCP changes.

7.9.8 Conditional Forwarding


This can be configured under section [CONDITIONAL_FORWARDERS]. Before forwarding to default
FORWARDING_SERVERS, DualServer will first check if the query’s last part matches with any of the
entries under [CONDITIONAL_FORWARDERS]. If so, the query will be forwarded to DNS Server specified
against that entry.

Dual Server is basically single zone server, that means it only supports one forward zone and one reverse
zone. This may be enough for all small organizations, who normally have just one zone. If the
organization has multiple zones in their domain, Dual Server can still be used as explained under
following sections.

7.9.9 Domain with child Zones


Domain name (for example Myzone.com) may be a domain name for the organization as whole. But a
DNS domain may be divided into multiple DNS zones. (for example marketing.myzone.com and
development.myzone.com are zones of Myzone.com domain).

Dual Server basically supports only one zone but can still be used in multizone domain. If you have a
domain with multiple child zones, each child zone can have it’s own set of DualServers (1 or 2 replicated
DualServers).

Now another DualServer can be put as Domain Server (for main domain). Here Domain Server will
forward queries belonging to child zones to child zones and will also catch results. In our example say we
have zone 10.10 for main domain and zones 10.10.1 and 10.10.2 are child zones for
marketing.myzone.com and development.myzone.com and have respectively, we will configure main
Domain Name Server for Domain Myzone.com:-

Entries in Main DNS Servers of zone:-


[CONDITIONAL_FORWARDERS]
marketing.myzone.com = 10.10.1.1, 10.10.1.2
1.10.10.in-addr.arpa = 10.10.1.1, 10.10.1.2
development.myzone.com 10.10.2.1, 10.10.2.2
2.10.10.in-addr.arpa = 10.10.2.1, 10.10.2.2

Here 10.10.1.1, 10.10.1.2 are DNS Servers of zone marketing.myzone.com/1.10.10.in-addr.arpa while


10.10.2.1, 10.10.2.2 are DNS servers of zone development.myzone.com/2.10.10.in-addr.arpa.

For both Child Servers 10.10.1.1, 10.10.1.2, 10.10.2.1, 10.10.2.2 the forwarding servers will be Main
Domain Servers (Say 10.10.3.1 and 10.10.3.2).

Dual DHCP DNS Server Manual V3 Page 27


Entries in Servers 10.10.1.1 and 10.10.1.2 :-
[FORWARDING_SERVERS]
10.10.3.1
10.10.3.2

[DOMAIN_NAME]
marketing.myzone.com = 10.10.1.in-addr.arpa

Entries in Servers 10.10.2.1 and 10.10.2.2 :-


[FORWARDING_SERVERS]
10.10.3.1
10.10.3.2

[DOMAIN_NAME]
development.myzone.com = 10.10.2.in-addr.arpa

Now any query to both Child Servers will be forwarded to Main Domain Server which will resolve it from
other server is needed or it’s own forwarding servers.

Dual DHCP DNS Server Manual V3 Page 28


8 DHCP OPTIONS

8.1 Specifying options and values in Dual DHCP DNS Server


DHCP Options, also called Vendor Options, are also sent to client along with DHCP Offer and DHCP Ack.
These are various other setting of client like DNS Server, Router/Gateway, various other default servers
like WINS, HTTP Server, Linux Windows Manager etc. There are about 150+ various standard options are
available, some of these are Vendor Specific or Server Specific. Each option has an option tag (1 to 254)
and the value of option which can be upto 254 bytes.

Dual Server stores DHCP Options at three different levels. These can be stored under
[GLOBAL_OPTIONS], [RANGE_SET] or Static Client sections. Option Tag and Option Value are separated
by = sign. Global Options are added to each DHCP Offer and DHCP Acknowledgement going out of
server, Range specific options are added to each DHCP OFFER/ACK when offered IP falls in DHCP_RANGE
and Client specific option sent with DHCP Offer/Ack specific to Static Client.

Options are only supplemented but never replaced. This means if an option has already been specified
under Static Client level, value is taken only from Client Specific option; it will not be replaced by value
of such option from either RANGE_SET or GLOBAL_OPTIONS. Similarly if an option has value specified
under RANGE_SET, value is not replaced in GLOBAL_OPTIONS. However if option is not specified under
Client Specific, it will be augmented from RANGE_SET and if RANGE_SET has no such option and Global
Options has it, it will be added from Global Options. Global Options are stored as attributes in
Configuration entry, Range Specific Options under DHCP Range Entries and Client Specific options are
attributes to Static Client Entries.

DHCP Options are specified in all above sections as OptionTag=value syntax. Option tags can be number
or standard mnemonic text for that Option tag. Mnemonic text is used as remembering numbers is
difficult. Dual Server now uses text names (less spaces) stipulated by IANA in document at
http://www.iana.org/assignments/bootp-dhcp-parameters/bootp-dhcp-parameters.xml. The server
translates these mnemonic text (will be called option names) back to option tags when sending options
to clients. List of all option name are listed in next section.

For example Sub Net Mask can be specified as:

1=255.255.255.0
or
SubNetMask=255.255.255.0

Similarly DNS Servers can be specified as:-

6=192.168.0.1, 192.168.0.2
DNSServers=192.168.0.1, 192.168.0.2

Dual DHCP DNS Server Manual V3 Page 29


Now the values of these options can be specified in multiple ways. String values can be a quoted string
or colon separated hex values or comma separated byte array like:-

DomainName=”MyDomain.com”
or
15=”MyDomain.com”
or
DomainName=4d:79:44:6f:6d:61:69:6e:2e:63:6f:6d
or
15=4d:79:44:6f:6d:61:69:6e:2e:63:6f:6d
or
DomainName=77,121,68,111,109,97,105,110,44,99,111,109
or
15=77,121,68,111,109,97,105,110,44,99,111,109

All of the above Option Entries work same way for string values. For IP address values, you can use both
dot separated values or hex string or byte array like:-

Router = 192.168.0.1
or
3 = 192.168.0.1
or
Router = 192,168,0,1
or
3 = 192,168,0,1
or
Router = c0:a8:00:01
or
3 = c0:a8:00:01

If you have multiple values for an Option you can specify like:-

DomainServer=192.168.0.2, 192.168.0.3
or as 8 consecutive bytes for 2 addresses
DomainServer=192,168,0,2,192,168,0,3
or as 8 consecutive hexbytes for 2 addresses
DomainServer=c0:a8:00:01:c0:a8:00:02

Numerical values can be simply stated as:-


LeaseTime=360
or
51=360

Dual DHCP DNS Server Manual V3 Page 30


Boolean Options should be specified as:-
AutoConfig=yes
or
AutoConfig=no
or
116=yes
or
116=1
or
AutoConfig=off

DHCP Range can only be specified as:-


DHCPRange=10.0.0.5-10.0.0.10

8.2 Filtering DHCP Ranges


You can select RANGE_SETs based on filter conditions. If any entry in a RANGE_SET has matched the
filter condition then only that RANGE_SET will be available to client (in fact all RANGE_SETs which has
matched the filter condition will be available to client). Remaining RANGE_SETs will no more be
available to that client. These filters although looks like options, but are not actual options but filter
based on client sent values. Hence these filters never go to client with DHCPOFFER or DHCPACK
messages. Dual Server supports 4 type of filters as described below:-

8.2.1 Mac Range Filters


Mac Range Filters Enable a RANGE_SET (All the ranges within a RANGE_SET) for a given Mac Range.
Like:-

FilterMacRange=00:0d:60:c5:4e:00-00:0d:60:c5:4e:ff

(above entry means Mac Address from 00:0d:60:c5:4e:00 to 00:0d:60:c5:4e:ff). If above filter is
specified, the range of this RANGE_SET will be only be selected if Mac Address falls in this range. You
can add upto 32 Mac Range filters in each RANGE_SET. Multiple entries work like “or” operation. In
other words, RANGE_SET will be available to all clients having Addresses falling in any of
FilterMacRanges specified.

8.2.2 Vendor Class and User Class Filters


Vendor Class and User Class Filters require exact match to value specified. However multiple values can
be added to each RangeSet. If the client sent values match with any one of specified values, DHCP
ranges in this RANGE_SET will be available to this client. The values can be Strings, byte array or hex
bytes. For example:-

Dual DHCP DNS Server Manual V3 Page 31


[RANGE_SET]
DHCPRange=192.168.1.171-192.168.1.180
FilterVendorClass="MSFT 4.0"
FilterVendorClass="MSFT 5.0"
FilterVendorClass="MSFT 6.0"

Vendor Class is set by manufacturer and has limited use of segregating the DHCP Range for say
Windows and Linux computers. User Class can be set manually for a computer and can be very
effectively used to segregate computers. For example you may segregate your computers and customer
computers; you can set the User Class for all your computers to some value. Now Filter the DHCP Range
with this value. Now a particular range will be available to your computers and remaining ranges will
only be available to customer’s computers. Using User Class, you can even use different range for each
of your departments. As you can see different RANGE_SET can be selected for different User Class, you
can also set other options for filtered RANGE_SET. You can have different DNS Server, Proxy Server, and
Gateway Server etc. You can deny internet access to some computers based on User Class.

[RANGE_SET]
DHCPRange=192.168.12.231-92.168.12.240
FilterVendorClass="MSFT 5.0"
FilterUserClass="HomeComputer"
DomainServer=192.168.12.1
Router=192.168.12.1

Above example can be used to differentiate between home office computers and third party computers.
Home different computers will use different RANGE_SET and different options.

Blank option values ensure these options never sent to host, not even complimented even from
GLOBAL_OPTIONS.

[RANGE_SET]
DHCPRange=192.168.12.1-92.168.12.230
DomainServer= #Blank option values ensure this option is never sent
Router= #Blank option values ensure this option is never sent

8.2.3 Subnet Selection Filters


When the DHCPDISCOVER arrives from local subnet, the listening interface’s IP address/SubnetIP is used
to find matching DHCP Range. If DHCPDISCOVER comes from another subnet, Relay Agent’s IP address is
also put in the DHCPDISVCOVER by Relay Agent. Now this IP is used to find matching DHCP Range. If
subnetselection IP (option 118) is sent by client, this IP is used to find the matching DHCP Range. The
preference goes like:-

1. Subnet Selection IP (option 118)


2. Relay Agent IP
3. Listening Interface’s IP

Dual DHCP DNS Server Manual V3 Page 32


This is built in logic and no special filter is required for DHCP Range Selection when using Relay Agent.
However you can override this feature and force a particular range set using the filter
FilterSubnetSelection. Using this filter will force a RANGE_SET based on matching of IP against
FilterSubnetSelection. Now the RANGE_SET is matched against IP (Subnet Selection/Relay Agent IP)
specified against this filter. It is done in same sequence as above. If option 118 is sent by client this IP
value is matched to filter value. If option 118 is not sent and relay agent IP is available, then relay agent
IP is matched against FilterSubnetSelection value.

[RANGE_SET]
DHCPRange=192.168.12.1-92.168.12.230
DomainServer=192.168.12.1
Router=192.168.12.1
FilterSubnetSelection=192.168.12.125
FilterSubnetSelection=192.168.13.125
TargetRelayAgent=192.168.11.2

The last item TargetRelayAgent above, forces the DHCPOFFER/DHCPACCEPT to be routed to another
Relay Agent 192.168.11.2. Normally the DHCPOFFER will be routed to Relay Agent, from where it came,
but can be overridden with this. However TargetRelayAgent will be used only when the DHCPDISCOVER
and DHCPREQUEST has SubnetSelection IP or RelayAgent IP. If the DHCPDISCOVER and DHCPREQUEST
come without these values, TargetRelayAgent will be ignored. This will permit unicast messages to
renew DHCP Address.

8.3 List of DHCP Options Names (in Dual DHCP DNS Server)
These are option names used in Dual DHCP DNS Server. These are based on IANA names less spaces and
dashes. Please refer to http://www.iana.org/assignments/bootp-dhcp-parameters/bootp-dhcp-
parameters.xml for more info. You can also use options not listed here using tag names directly.

These are mnemonic option names used in Dual Server. These are based on IANA names less spaces and
dashes. Please refer to http://www.iana.org/assignments/bootp-dhcp-parameters/bootp-dhcp-
parameters.xml for more info. You can also use options not listed here using tag numbers directly.

Tag Option Name in IANA Name Meaning


Dual Server
1 SubnetMask Subnet Mask Subnet Mask Value
2 TimeOffset Time Offset Time Offset in Seconds from UTC (note: deprecated by
100 and 101)
3 Router Router Default Gateway is called Router by IANA
4 TimeServer Time Server N/4 Timeserver addresses
5 NameServer Name Server N/4 IEN-116 Server addresses
6 DomainServer Domain Server N/4 DNS Server addresses
7 LogServer Log Server N/4 Logging Server addresses
8 QuotesServer Quotes Server N/4 Quotes Server addresses
9 LPRServer LPR Server N/4 Printer Server addresses
10 ImpressServer Impress Server N/4 Impress Server addresses
11 RLPServer RLP Server N/4 RLP Server addresses
12 Hostname Hostname Hostname string
13 BootFileSize Boot File Size Size of boot file in 512 byte chunks
14 MeritDumpFile Merit Dump File Client to dump and name the file to dump it to
15 DomainName Domain Name The DNS domain name of the client

Dual DHCP DNS Server Manual V3 Page 33


16 SwapServer Swap Server Swap Server address
17 RootPath Root Path Path name for root disk
18 ExtensionFile Extension File Path name for more BOOTP info
19 ForwardOn/Off Forward On/Off Enable/Disable IP Forwarding
20 SrcRteOn/Off SrcRte On/Off Enable/Disable Source Routing
21 PolicyFilter Policy Filter Routing Policy Filters
22 MaxDGAssembly Max DG Assembly Max Datagram Reassembly Size
23 DefaultIPTTL Default IP TTL Default IP Time to Live
24 MTUTimeout MTU Timeout Path MTU Aging Timeout
25 MTUPlateau MTU Plateau Path MTU Plateau Table
26 MTUInterface MTU Interface Interface MTU Size
27 MTUSubnet MTU Subnet All Subnets are Local
28 BroadcastAddress Broadcast Address Broadcast Address
29 MaskDiscovery Mask Discovery Perform Mask Discovery
30 MaskSupplier Mask Supplier Provide Mask to Others
31 RouterDiscovery Router Discovery Perform Router Discovery
32 RouterRequest Router Request Router Solicitation Address
33 StaticRoute Static Route Static Routing Table
34 Trailers Trailers Trailer Encapsulation
35 ARPTimeout ARP Timeout ARP Cache Timeout
36 Ethernet Ethernet Ethernet Encapsulation
37 DefaultTCPTTL Default TCP TTL Default TCP Time to Live
38 KeepaliveTime Keepalive Time TCP Keepalive Interval
39 KeepaliveData Keepalive Data TCP Keepalive Garbage
40 NISDomain NIS Domain NIS Domain Name
41 NISServers NIS Servers NIS Server Addresses
42 NTPServers NTP Servers NTP Server Addresses
44 NETBIOSNameSrv NETBIOS Name Srv NETBIOS Name Servers
45 NETBIOSDistSrv NETBIOS Dist Srv NETBIOS Datagram Distribution
46 NETBIOSNodeType NETBIOS Node Type NETBIOS Node Type
47 NETBIOSScope NETBIOS Scope NETBIOS Scope
48 XWindowFont X Window Font X Window Font Server
49 XWindowManager X Window Manager X Window Display Manager
51 AddressTime Address Time IP Address Lease Time
58 RenewalTime Renewal Time DHCP Renewal (T1) Time
59 RebindingTime Rebinding Time DHCP Rebinding (T2) Time
62 NetWare/IPDomain NetWare/IP Domain NetWare/IP Domain Name
63 NetWare/IPOption NetWare/IP Option NetWare/IP sub Options
64 NIS-Domain-Name NIS-Domain-Name NIS+ v3 Client Domain Name
65 NIS-Server-Addr NIS-Server-Addr NIS+ v3 Server Addresses
66 TFTPServerName Server-Name TFTP Server Name
67 BootFileOption *Bootfile-Name see note Boot File Name
68 HomeAgentAddrs Home-Agent-Addrs Home Agent Addresses
69 SMTPServer SMTP-Server Simple Mail Server Addresses
70 POP3Server POP3-Server Post Office Server Addresses
71 NNTPServer NNTP-Server Network News Server Addresses
72 WWWServer WWW-Server WWW Server Addresses
73 FingerServer Finger-Server Finger Server Addresses
74 IRCServer IRC-Server Chat Server Addresses
75 StreetTalkServer StreetTalk-Server StreetTalk Server Addresses
76 STDAServer STDA-Server ST Directory Assist. Addresses
78 DirectoryAgent Directory Agent directory agent information
79 ServiceScope Service Scope service location agent scope
83 iSNS iSNS Internet Storage Name Service
85 NDSServers NDS Servers Novell Directory Services
86 NDSTreeName NDS Tree Name Novell Directory Services
87 NDSContext NDS Context Novell Directory Services
95 LDAP LDAP Lightweight Directory Access Protocol
100 PCode PCode IEEE 1003.1 TZ String
101 TCode TCode Reference to the TZ Database
112 NetinfoAddress Netinfo Address NetInfo Parent Server Address
113 NetinfoTag Netinfo Tag NetInfo Parent Server Tag
114 URL URL URL

Dual DHCP DNS Server Manual V3 Page 34


116 AutoConfig Auto-Config DHCP Auto-Configuration
117 NameServiceSearch Name Service Search Name Service Search
118 SubnetSelectionOption Subnet Selection Option Subnet Selection Option
119 DomainSearch Domain Search DNS domain search list
120 SIPServersDHCPOption SIP Servers DHCP Option SIP Servers DHCP Option
121 ClasslessStaticRouteOption Classless Static Route Option Classless Static Route Option
122 CCC CCC CableLabs Client Configuration
128 TFTPPhoneServer TFTP Server IP address (for IP Phone
software load)
129 CallServerIPaddress Call Server IP address
130 Discriminationstring Discrimination string (to identify vendor)
131 RemotestatisticsserverIPaddress Remote statistics server IP address
135 HTTPProxyPhone HTTP Proxy for phone-specific
applications
141 SIPUAServiceDomains SIP UA Service Domains SIP UA Service Domains
150 TFTPserverAddress TFTP server address
176 IPTelephone IP Telephone (Tentatively Assigned -
2005-06-23)
209 ConfigurationFile Configuration File Configuration file
210 PathPrefix Path Prefix Path Prefix Option
211 RebootTime Reboot Time Reboot Time
255 End End None

8.4 Dual Server specific DHCP Header Field Options


There are some Dual Server special options, although specified like Options in ini file, which do not go as
vendor options but are used to fill the DHCP Header fields only.

BootFileName *Boot File Field in DHCP Header 126 Bytes Max


NextServer PXE TFTP Server Field in DHCP Header N/4 IP
TargetRelayAgent **Can be used to send broadcast messages to alternative relay agent. N/4 IP
*Option BootFileName only fills DHCP Request header field the bp_file while BootFileOption adds the boot file name as DHCP option.
** When DHCPDISCOVER and DHCPREQUEST come from Relay Agent (or has subnetseletion option) the DHCPOFFER and DHCPACK are sent
back to Relay Agent or subnetselection IP. This is normal operation and wor k correctly. However you can override where these messages go,
you can specify as TargetRelayAgent.

Dual DHCP DNS Server Manual V3 Page 35


9 Debugging
9.1 Windows
 Check network hardware and ensure that client machines have different host names from
server and each other.
 No other service should be running on Server on ports 53 and 67. If you get error like port 67
already in use means some other DHCP program or proxy server with DHCP service is running. If
you get error port 53 already in use means some other DNS Server or proxy server with DNS
Service is already running. Use any port scanner program like Active Ports to detect which
program is listening on these ports. It is also possible that another copy of dualserver itself is
running or Microsoft connection sharing (ICS) is running, which uses these ports. How to
disable ICS DNS/DHCP Service on your target networks, see INTERNET CONNECTION SHARING in
ReadMe.txt file.
 If you still get error Static Interfaces/Listening Ports not available, it may be because of 1)
Another DHCP/DNS Server is running or Interfaces specified on [LISTEN_ON] section are not
available. If your interface may not be ready when your computer/Service starts and due to this
service fails to start, use Window's recovery option in Services applet to try starting service at
later time.
 Look at DualServer.log (if running as service) or Run in standalone mode, it will provide all debug
information as it verbatim the activities.
 If you use Broadband router, which also has DHCP Server, this program may still run, but some
hosts configured by other DHCP Server may not use this DNS or DHCP Service.
 Often you will find that other machines can resolve each other and server, but server resolves
nothing. This is because server's DNS Server may be different. To resolve machines from server,
specify (forwarding) DNS Servers in ini file and set server's DNS Server to itself.
 Zone Transfer and Replication, if used on multihomed servers, make sure the IPs for Primary and
Secondary server can be pinged from Each Other.
 Dualserver.state file backs up current leases and is read back when server restarts. If you want
to clean previous leases, you may delete this file and restart the server.
 If you are not able to receive DHCP Discover messages from clients, make sure that Dual DHCP
DNS Server and client are on same physical network (not separated by routers). If it is separated
by routers and it is same subnet, please allow routers to pass broadcast messages to Server on
Port 67. If these are different subnets, use the BOOTP relay agents.

9.2 Linux
 Ensure that you run this program as root only.
 Check network hardware and ensure that client machines has different host names from server
and each other.
 No other service should be running on Server on ports 53 and 67 If you get error like port 67
already in use means some other DHCP program or proxy server with DHCP service is running. If

Dual DHCP DNS Server Manual V3 Page 36


you get error port 53 already in use means some other DNS Server or proxy server with DNS
Service is already running. Use netstat command to detect which program is listening on these
ports. It is also possible that another copy of dualserver itself is running.
 If you get error Static Interfaces/Listening Ports not available, it may be because of 1) Another
DHCP/DNS Server is running or Interfaces specified on [LISTEN-ON] section are not available or
you have just restated the server and TCP port is not yet closed, then wait for some time.
 Look at log file (if running as service) or Run in standalone mode, it will provide all debug
information as it verbatim the activities.
 If you use Broadband router, which also has DHCP Server, this program may still run, but some
hosts configured by other DHCP Server may not use this DNS Service.
 Often you will find that other machines can resolve each other and server, but server resolves
nothing. This is because server's DNS Server may be different. To resolve machines from server,
specify (forwarding) DNS Servers in ini file and set server's DNS Server to itself.
 Zone Transfer and Replication, if used on multihomed servers, make sure the IPs for Primary and
Secondary server can be pinged from Each Other.
 dualserver.state file backs up current leases and is read back when server restarts. If you want
to clean previous leases, you may delete this file and restart the server.
 Errors like "libstdc++.so.?: cannot open shared object file: No such file or directory" are possible
in some Linux flavors. Please recompile the program or create symbolic links:-
ln -s /usr/local/lib/libstdc++.so.? /usr/lib/libstdc++.so.?
ln -s /usr/local/lib/libgcc_s.so.? /usr/lib/libgcc_s.so.?
? is library version as reported in error. Or add the library path (directory where above file is) to
env variable LD_LIBRARY_PATH.
 If you are not able to receive DHCP Discover messages from clients, make sure that Dual DHCP
DNS Server and client are on same physical network (not separated by routers). If it is separated
by routers and it is same subnet, please allow routers to pass broadcast messages to Server on
Port 67. If these are different subnets, use the BOOTP relay agents or let routers provide this
functionality.

Dual DHCP DNS Server Manual V3 Page 37


10 Other Recommended Software

10.1 Open DHCP Server

Open DHCP Server is very similar to Dual DHCP DNS Server, but do not provide the DNS Sevice. It is pure
high performing DHCP Server.

Dual DHCP DNS Server is single zone server but Open DHCP Server can be used in multi domain mode.

10.2 Open TFTP Server

It is MultiThreaded TFTP Server, Open Source Freeware for both Windows and Unix for
PXEBOOT, firmware load. It support tsize, blksize, timeout Server Port Ranges, Block Number
Rollover for Large Files. Runs as Service/daemon.

Single Port version also available. Single Port version communicates through single port 69 to
all clients. It can serve multiple client from single port. Very useful for firewalled networks.

The salient feature of this software is that it can be installed as Windows Service or Unix
Daemon.

Dual DHCP DNS Server Manual V3 Page 38

You might also like