Dual DHCP DNS Server: Installation and Configuration Manual
Dual DHCP DNS Server: Installation and Configuration Manual
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
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.
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.
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.
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:-
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).
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
[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
[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.
[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:-
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
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
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.
[TIMINGS]
AddressTime=3600 #This is DNS host expiry time for all local hostnames also Lease Time for DHCP
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
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
[RANGE_SET]
DHCPRange=192.168.0.1-192.168..254 #Actual DHCP Range
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
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
Following example below is simple most section where only IP is specified. Other options will be
supplemented from [DHCP_RANGE] and [GLOBAL_OPTIONS].
Open DHCP Server will never allot any address to 00:41:42:41:42:76 as 0.0.0.0 IP has been specified
#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
[HTTP_INTERFACE]
HTTPServer=192.168.0.3:6789
[HTTP_INTERFACE]
HTTPServer=192.168.55.254
HTTPClient=192.168.0.11
HTTPClient=192.168.23.123
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.
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.
You can also include just %m and %Y if you want monthly log file like:-
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:-
/opt/dualserver/rc.dualserver start
/etc/rc.d/dualserver start
/opt/dualserver/rc.dualserver stop
/etc/rc.d/dualserver stop
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 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.
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.
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.
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.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 Server has been designed for well-coordinated replicated operation. Following features make it
unique among other DHCP Servers available.
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.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
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.
This arrangement is not recommended, as Primary will not be updated of changes to Secondary due to
DHCP changes.
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.
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:-
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).
[DOMAIN_NAME]
marketing.myzone.com = 10.10.1.in-addr.arpa
[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 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.
1=255.255.255.0
or
SubNetMask=255.255.255.0
6=192.168.0.1, 192.168.0.2
DNSServers=192.168.0.1, 192.168.0.2
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
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.
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
[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.
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
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.
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.