The Distributed DNS/DHCP Utility (DDU) is used to manage IP addresses throughout the University. This web based system is a frontend to ISC’s BIND and DHCP. DNS/DHCP data is stored in a Unix database (dbm) and distributed to the Solaris based internal and external servers anytime a change is made. DDU will also perform basic load balancing functions by monitoring configured host TCP ports and adjusting the DNS entries if no response. This system was written in PERL and HTML
Overview
- The master server, in this case csu-z, is where the dbm database resides. Changes to the DDU system take place on the master server only, either through the GUI (web interface) or through the CLI. At an interval that you can set (default 1 min), if there were changes to the database, the master server builds all necessary DNS/DHCP files and FTPs them to all slave servers, then forces a DNS/DHCP reload on all servers.
- The DDU is made up of 3 PERL programs that do all the work and a bunch of configuration files. Also, each internal server has 2 defined userids (bind and dhcp) and the external servers just have userid (bind) defined. These userids are used to distribute the DNS/DHCP data from the master to the slaves.
- Also, as part of its 1 minute interval tasks, the DDU will act as a poor person’s DNS load balancer. It will test prefigured servers TCP ports for reach-ability. If it determines that the TCP port on a particular server is unreachable, then will adjust the server’s DNS entries and remove that failing server.
Details
-
Programs
- dns.pl: This programs runs in the background and wakes up every 1 minute to check for database changes. If changes are detected, it will call dnsload.pl to build all necessary DNS/DHCP files and then distribute them to all servers. Then it will force a reload of the DNS/DHCP files on the slave servers.
- dnsedit.pl: This programs handles the GUI portion of the system and is run as a cgi on the http server
- dnsload.pl: This program is the CLI portion of the system and perform many functions. Here are the option that this program will accept:
# ./dnsload.pl
Usage: ./dnsload.pl [-h] -[iavdmnsl] [namedfile] [vlanfile] [macfile] [descfile]
-i namedfile vlanfile = initial load
-a namedfile vlanfile = add to existing database
-b namedfile vlanfile = initial MX load
-v vlanfile = load new vlan info
-m macfile = add to existing mac info
-n macfile = load new mac info
-l descfile = add to existing description info
-s descfile = load new description info
-c creatorfile = add to existing creator info
-e creatorfile = load new creator info
-u ttlfile = add to existing ttl info
-t ttlfile = load new ttl info
-f ipv6file = add to existing ipv6 info
-g ipv6file = load new ipv6 info
-d = dump database into files for CMU & ISC server
-
Configuration Files (that you will change)
- subnets.load: This file controls pretty much the system. This where we would define users, internal servers, external servers, DHCP failover pairs, shared networks, special user privileges, security and menu options, load balancind and finaly the subnets. Here is a sample:
; group definitions (always start with 0.0.0.9,255.255.255.255,)
;
0.0.0.9,255.255.255.255,GRP0:user1:user2:rfryeGRP1:user3:user4
;
; dhcp servers to use 0 (default),1,2,….
0.0.0.8,255.255.255.255,csu-z,csu-y,csu-x,csu-o,csu-s
;
; external dns servers
0.0.0.7,255.255.255.255,ns1,ns2,ns3,ns4
;
; failover pairs 0 1 2
0.0.0.6,255.255.255.255,0:1,2:0,1:2
;
; shared networks
;0.0.0.5,255.255.255.255,mc-cb-wireless:10.1.246.0:10.1.248.0
;
; which users can override host names
0.0.0.1,255.255.255.255,GRP0:user4
;
; which users can manage other users’ entries
0.0.0.2,255.255.255.255,GRP0:GRP1:user5:GRP5
;
; security and menu options
0.0.0.0,255.255.255.255,ALL,GRP0:GRP1:GRP2:dhcp,GRP0:GRP1:GRP2:dhcp,,,,,,,GRP0:dhcp
;
; load balance
0.0.1.0,255.255.255.255,acs.csuohio.edu.:tcp:2002:FONP:acs-wow.csuohio.edu.:acs-backup.csuohio.edu.
0.0.1.1,255.255.255.255,csu-z.csuohio.edu.:tcp:22:RR:10.1.5.27:10.1.49.12
0.0.1.2,255.255.255.255,csu-x.csuohio.edu.:tcp:22:RR:10.1.49.10:10.1.5.25
0.0.1.3,255.255.255.255,csu-y.csuohio.edu.:tcp:22:RR:10.1.49.11:10.1.5.26
0.0.1.4,255.255.255.255,cisco-lwapp-controller.csuohio.edu.:tcp:22:FO:ws-03-01.netman.csuohio.edu.:ws-02-01.netman.csuohio.edu.:ws-11-01.netman.csuohio.edu.
0.0.1.5,255.255.255.255,cisco-capwap-controller.csuohio.edu.:tcp:22:FO:ws-03-01.netman.csuohio.edu.:ws-02-01.netman.csuohio.edu.:ws-11-01.netman.csuohio.edu.
;
; network defs start here
10.1.29.0,255.255.255.0,rc-02-01:rc-02-01 admin vlan 50:10:100:GRP0:GRP1,rc-02-01:rc-02-01 admin – dhcp:101:175:dhcp:F1
;
10.1.58.0,255.255.255.0,rc-01-01:rc-01-01 admin vlan 300:10:100:GRP0:GRP1,rc-01-01:rc-01-01 admin – dhcp:101:175:dhcp:1,rc-01-01:rc-01-01 admin – dhcp:176:999:dhcp:2
;
-
- named.misc: In this file, you will place all miscellaneous entries that the GUI will not accept
- isc.glog: This file has all global DHCP configuration
Here a basic diagram showing relationship of Master/Slave design
a screen shot of the main menu

