This release 5.0 is Stable Release with Zone Replication Support.

PURPOSE

DHCP Server alots the IP addresses to local computers, while DNS server resolves
them. DHCP Server with PXE Boot support is required for Network Booting.

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. Some option can only be added through DHCP.

DNS Server is needed for resolving hostnames to their IP addresses. Normally your
ISP will provide you with DNS Server. You may have your own DNS Server, which will
resolve hostnames by forwarding them to ISP's DNS Server and cache the addresses also.
But how about resolving your local machines ?. Your ISP's DNS Server will not have
this list. Most DNS Servers cannot do this. (unless you configre dynamic updates,
or use static IP addresses).

If you have home/small office network with Unix/Linux machines, these machines will
not be resolved from each other, as Unix/Linux machines do not support NBNS protocol
and you need your own DNS Server. Normally DNS Servers can only resolve external URLs,
(unless you configre dynamic updates, or use static IP addresses). This server resolves
local machines automatically, in addition to external machines, with the added advantage
being, both DHCP and DNS Server are allways in Sync. 

You may also like to use this DNS Server as caching proxy for your IPS's server for fast
response. You can disable DHCP Server, if you use static addresses or there is another
DHCP Server being used. Even if you have only one machine you can try it.
Enable only DNS Service, specify remote DNS Servers in ini file and set DNS Server of
your machine to itself.

ENHANCEMENTS in 5.0

1) This release supports Zone Transfer and Replicaiton.

BUGS Fixed in 4.01

1) Allocating same address to different MACs fixed.

BUGS Fixed in 4.0

1) BootP Support fixed.

ENHANCEMENTS in version 4.0

1) Multiple Ranges can be specified.
2) Different physical network can be servered by this server using DCHP Relay Agent.
3) Single host can have multiple IPs and single IP can have multiple hosts.
4) Zone based DNS Query routing [DNS-PROXY] is introduced.
5) Logging added.
6) Multiple listening interfaces can be specified for multihome servers.

Other features

1) Requires little configuration and no need to create zone files.
2) Provides both DHCP and DNS Service, can also use one of them only.
3) Automatic built-in dynamic updates. DNS Server includes DHCP alotted names.
4) Unlimited no. of hosts and aliases can be specified.
5) No limit to cached external hosts.
6) Both global and client specific DHCP Options.
7) Network PXE Boot and BOOTP support.
8) Zone based DNS Query routing (DNS Proxing) to different DNS Servers.

INSTALLATION

This program if installed on a machine, which is static configured for IP Address,
DNS & router, it detects these settings from server machine (If you want diffrent
setting for clients, edit ini file) and uses them for configuring other machines
on local network.

Expand the GZ archive to any directory (say dualserver)
goto dualserver directory and test run as root:-
#./dualserver -v
You should see something similar to:-

Forwarding DNS Server: 192.168.0.1
DHCP Range[192.168.0.0] 192.168.0.1-192.168.0.254/255.255.255.0
DNS Service Permitted Hosts: 192.168.0.1 - 192.168.0.254
Expiry: 36000 (sec)
Domain Name: workgroup (authorized)
Server Name: Knoppix
Listening On: 192.168.0.2

If you are not able to run dualserver, recompile as:-
#g++ dualserver.cpp -odualserver -lpthread
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

RUNNING

This program runs in two modes:-
a) Verbatim Mode (using -v argument)
b) Daemon (using no argument)
This program should be setup to start automatically
modifying boot scripts /etc/rc.d/rc.local file or
/etc/inittab file. Never include -v (verbatim flag) while
running as Daemon from these scripts.

CONFIGURATION

1) Configuration of Server

   The program automatically picks up settings of Server computer and 
   no configuration is required if:-

   a) Server machine is configured for DNS Servers and Gateway servers.
   b) You use IP range 192.168.0.1 - 192.168.0.255 (Server is automatically excluded).
   c) Lease Time is 36000 secs/10 hours.
   
   You can change any of these settings in DualServer.ini file.
   
2) Configuration of Clients
   1. You can use windows/linux/unix mix of clients.
   2. The clients should be set to get IP Address automatically.
   3. Do not configure the clients for Dynamic DNS Update, as this server automatically
      does this.

GENERAL
   
1) This document is for guidance and is covered under GNU public license.

DEBUG

If program is not assigning addresses or resolve them check:-

1) Ensure that you run this program as root only (Linux Only)
2) Check network hardware and ensure that client machines has different host names from server and
   each other.
3) No other service should be running on Server on ports 53 and 67.
4) 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 program is running, which uses these ports.
5) 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.
6) Look at DualServer.log (if running as service) or Run in standalone mode, it will provide all debug
   information as it verbatim the activities.
7) If you use Braodband 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.
9) 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.
9) Zone Transfer and Replication, if used on multihomed servers,make sure the IPs for Primary and Secondary
   server can be pinged from Each Other.
10)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. It is in /etc directory.

UNINSTALLATION

Just remove the program directory. You should also remove entries from initialize scripts of 
your machine.

REPLICATION (for advance users only)

Release 5.0 onwards support replication. Please read the ZONE REPLICATION file.

DNS Proxy (for advance users only)

If you have multiple local zones, each having its own DNS/DHCP server, You can confure
this server as DNS Proxy and it will forward queries to specific servers based on
zone match. Queries not matching to zones specified in [DNS-PROXY] section will be forwarded to
default forwading DNS Servers. One query is forwaded only once to master server and then
cache is used to resolve unless it has expired. Please see the [DNS-PROXY] section of ini file.

BUGS

If you find any problem with this program or need more features, please send mail to achaldhir@gmail.com.
You may also send thanks email if it works fine for you.
