BASIC dhcp server – piece of cake!

Wanted to set up dhcp so that I had more granular control since my router kept screwing up and giving the same IP to different hosts.

On Ubuntu 6, I just installed it:
apt-get install dhcp3-server

Then edited the /etc/dhcp3/dhcpd.conf (ddns-update-style was initially set to none):

ddns-update-style interim;
option domain-name “shocknetwork.com”;
option domain-name-servers chunli.shocknetwork.com, resolver1.opendns.com;
default-lease-time 600;
max-lease-time 7200;
log-facility local7;
subnet 192.168.0.0 netmask 255.255.255.0 {
range 192.168.0.100 192.168.0.200;
option domain-name-servers chunli.shocknetwork.com, resolver1.opendns.com;
option domain-name “shocknetwork.com”;
option routers 192.168.0.1;
option broadcast-address 192.168.0.3;
default-lease-time 600;
max-lease-time 7200;
}

[ad#ad-1]

Bind 9 DNS logging of just queries

Recently, set up logging on the DNS server so I can see which hosts clients are resolving. Pretty cool. i commented out a bunch of stuff that I didn’t need.

This is the stuff that goes into the named.conf file or in my case for Ubuntu 6, /etc/bind/named.conf.options

logging {
// category “default” { “debug”; };
// category “general” { “debug”; };
// category “database” { “debug”; };
// category “security” { “debug”; };
// category “config” { “debug”; };
// category “resolver” { “debug”; };
// category “xfer-in” { “debug”; };
// category “xfer-out” { “debug”; };
// category “notify” { “debug”; };
// category “client” { “debug”; };
// category “unmatched” { “debug”; };
// category “network” { “debug”; };
// category “update” { “debug”; };
category “queries” { “debug”; };
// category “dispatch” { “debug”; };
// category “dnssec” { “debug”; };
// category “lame-servers” { “debug”; };
channel “debug” {
file “/tmp/nameddbg” versions 2 size 50m;
print-time yes;
print-category yes;
};

[ad#ad-1]

damn slave DNS server!

http://www.dummies.com/WileyCDA/Dummies … USING.html You can provide DNS redundancy in two ways: * Master/slave: In the traditional master/slave DNS relationship, (one or more) DNS slave servers load zone data from the master server on startup and at intervals specified in the start of authority (SOA) record for each zone. This method of redundancy has one huge advantage: When a zone file is changed, the changes are automatically propagated to the slave servers. This process normally happens as soon as the changes are made if the NOTIFY DNS feature is supported, and it happens after the time interval in the SOA record if NOTIFY is not supported. The master/slave DNS server relationship has a disadvantage also: If the master goes down, the slave is restarted, and the zone data cannot be transferred. Also, if the master goes down and isn’t restored by the time the DNS record becomes stale (because it cannot update from the master server), the zone is no longer accessible.]]>