[plug] Dynamic DNS updates through DHCP

Simon Duff bastett at meowers.net
Sun Nov 7 16:33:20 WST 2004


Hey all,

I'm using dhcp to update local dns, and all works well, except for one 
annoyance:

I have a laptop here, which is used at someone's work, as part of a 
domain, so has its own domainname. When it does dhcp, it seems to tell 
the dhcp server its own domainname and then bind attempts to update the 
records with this instead of my local domainname. So I end up with 
reverse lookup entry for the wrong domain and no forward lookup entry.
dhcpd.conf follows.

Not a huge problem, just annoying, any help appreciated :D

Simon

ddns-update-style interim;
key mykey {
        algorithm hmac-md5;
        secret "<secret keydata>";
};
zone localdomain. {
        primary 192.168.0.1;
        key mykey;
}
zone 0.168.192.in-addr.arpa {
        key mykey;
}
subnet 192.168.0.0 netmask 255.255.255.0
{
        option subnet-mask 255.255.255.0;
        option domain-name "localdomain";
        option routers 192.168.0.1;
        option domain-name-servers 192.168.0.1;
        range dynamic-bootp 192.168.0.5 192.168.0.60;
        default-lease-time 3600;
        max-lease-time 7200;
        ddns-ttl 7200;
        ddns-hostname = pick (option fqdn.hostname, option host-name, 
concat ("dhcp-", binary-to-ascii (10, 8, "-", leased-add
ress)));
        ddns-domainname "localdomain";
        option host-name = config-option server.ddns-hostname;
        host silver {
                hardware ethernet <MAC data>;
                fixed-address 192.168.0.97;
        }
}




More information about the plug mailing list