LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 09-04-2012, 08:11 AM   #1
morpheus78
LQ Newbie
 
Registered: Sep 2012
Location: France
Posts: 3

Rep: Reputation: Disabled
DDNS DHCP problem


Dear all,

I have a big problem to configure Dynamic DNS and DHCP with Bind9 on a debian machine.
I have no error with named-checkconf and named-checkzone.

I have a debian server with ip 192.168.1.1, and a debian host (machine-user) aquiring ip by dhcp (192.168.1.11 dhcp working).


Here my NSLOOKUP commands :

Code:
> 192.168.1.11
Server:		192.168.1.1
Address:	192.168.1.1#53

** server can't find 11.1.168.192.in-addr.arpa.: NXDOMAIN
> machine-user
;; connection timed out; no servers could be reached
>
From what you can see, nothing works...
And, of course, I don't know why.

All my DNS conf files are in /etc/bind.

Can you take a look into them?

dhcpd.conf
Code:
server-identifier       linux;
ddns-updates            on;
ddns-update-style       interim;
ddns-domainname         "utopia.net.";
ddns-rev-domainname     "in-addr.arpa.";
ignore                  client-updates;

include                 "/etc/bind/rndc.key";

zone utopia.net. {
        primary 127.0.0.1;
        key rndc-key;
}

option domain-name              "utopia.net";
option domain-name-servers      192.168.1.1;
option ntp-servers              192.168.1.1;
option routers                  192.168.1.1;
option broadcast-address        192.168.1.255;
default-lease-time              600;
max-lease-time                  7200;
authoritative;

subnet 192.168.1.0 netmask 255.255.255.0 {
        range 192.168.1.10 192.168.1.200;

        zone utopia.net. {
                primary 192.168.1.1;
                key "rndc-key";
        }

        zone 1.168.192.in-addr.arpa. {
                primary 192.168.1.1;
                key "rndc-key";
        }
}

host dc {
        hardware ethernet 00:0C:29:18:FA:90;
        fixed-address 192.168.1.2;
}
named.conf
Code:
include "/etc/bind/named.conf.options";
include "/etc/bind/named.conf.local";
include "/etc/bind/named.conf.default-zones";

controls {
        inet 127.0.0.1 allow {localhost; } keys { "rndc-key"; };
};
named.conf.local
Code:
zone "utopia.net" {
        type master;
        file "/etc/bind/db.utopia.net";
        allow-update { key "rndc-key"; };
        notify yes;
};

zone "1.168.192.in-addr.arpa" {
        type master;
        file "/etc/bind/db.utopia.net.rev";
        allow-update { key "rndc-key"; };
        notify yes;
};

include "/etc/bind/rndc.key";
named.conf.options
Code:
options {
        directory "/var/cache/bind";
        auth-nxdomain no;    # conform to RFC1035
        listen-on-v6 { none; };
};
Fichier de zone db.utopia.net
Code:
$ORIGIN .
$TTL    604800
utopia.net      IN      SOA     utopia.net. root.utopia.net. (
                              2         ; Serial
                         604800         ; Refresh
                          86400         ; Retry
                        2419200         ; Expire
                         604800 )       ; Negative Cache TTL
;
        NS      linux.utopia.net.
$ORIGIN utopia.net.
linux   A       192.168.1.1
dc      A       192.168.1.2
Fichier de zone inversé db.utopia.net.rev
Code:
$ORIGIN .
$TTL    604800
1.168.192.in-addr.arpa  IN      SOA     utopia.net. root.utopia.net. (
                              2         ; Serial
                         604800         ; Refresh
                          86400         ; Retry
                        2419200         ; Expire
                         604800 )       ; Negative Cache TTL
;
        NS      linux.utopia.net.
$ORIGIN 1.168.192.in-addr.arpa.
1       PTR     linux.utopia.net.
Fichier resolv.conf
Code:
main utopia.net
search utopia.net
nameserver 192.168.1.1
Fichier /etc/hosts
Code:
127.0.0.1       localhost
192.168.1.1     linux.utopia.net        linux

# The following lines are desirable for IPv6 capable hosts
#::1     ip6-localhost ip6-loopback
#fe00::0 ip6-localnet
#ff00::0 ip6-mcastprefix
#ff02::1 ip6-allnodes
#ff02::2 ip6-allrouters
Please help
 
Old 09-04-2012, 10:03 AM   #2
ceyx
Member
 
Registered: May 2009
Location: Fort Langley BC
Distribution: Kubuntu,Free BSD,OSX,Windows
Posts: 342

Rep: Reputation: 59
Increment the serial numbers, reboot and check the logs.

Post the output here if you like.
 
Old 09-05-2012, 02:08 AM   #3
morpheus78
LQ Newbie
 
Registered: Sep 2012
Location: France
Posts: 3

Original Poster
Rep: Reputation: Disabled
Hi,

I incremented the version of the 2 zones.
Now i got a :

server can't find 11.1.168.192.in-addr.arpa.: NXDOMAIN
server can't find machine-user: NXDOMAIN

How I can see if DHCP update my dns zones?
 
Old 09-05-2012, 10:19 AM   #4
ceyx
Member
 
Registered: May 2009
Location: Fort Langley BC
Distribution: Kubuntu,Free BSD,OSX,Windows
Posts: 342

Rep: Reputation: 59
I have to tell you that my knowledge of Bind and DHCP is limited, but perhaps we can both learn from this.

It is my understanding that Bind is used for Static IP's ; addresses that you have assigned.
DHCP is used when the server assigns the IP without your intervention.

So looks to me like we have two things going on here in confict:

You are telling BIND that the IP's are:

Quote:
Fichier de zone db.utopia.net
......
NS linux.utopia.net.
$ORIGIN utopia.net.
linux A 192.168.1.1
dc A 192.168.1.2
so how can you expect DHCP to assign 192.168.1.11 to a machine that Bind thinks is 192.168.1.2 ?
Did I misunderstand ?
Quote:
and a debian host (machine-user) aquiring ip by dhcp (192.168.1.11 dhcp working
Also, DHCP works by assigning the next available IP, not necessariy 192.168.1.11, according to the "lease" time set in DHCP,
so if it your machine is .11 today it may be .12 tomorrow, if .11's lease has not expired.

I would suggest using only static IP's on your lan only, and disable DHCP. It is more 'secure' that way too. I can't plug my laptop into your lan and get an IP !

Let us know how you are doing...

Bon Courage !
 
Old 09-05-2012, 12:30 PM   #5
morpheus78
LQ Newbie
 
Registered: Sep 2012
Location: France
Posts: 3

Original Poster
Rep: Reputation: Disabled
Hi,

192.168.1.2 is my DC (win 2K8R2) with a reserved IP as you can see on dhcpd.conf . I made a static declaration in the zone because the IP will not change.

192.168.1.11 is the IP that machine-user obtain from the DHCP.
I need to use DHCP, I can't populate DNS by myself, that why I want to use Dynamic DNS with DHCP update.

So, no idea why I obtain NXDOMAIN error in the 2 ways?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
bind and DHCP - DDNS kudos Linux - Networking 7 06-15-2008 04:12 AM
DDNS Bind 9.0 / DHCP - mule Linux - Networking 2 01-06-2006 11:55 PM
DHCP and DDNS - not working ccigmaian Linux - Networking 3 12-05-2005 11:19 PM
DHCP and DDNS garullon245136 Linux - Networking 1 06-20-2005 08:29 PM
DHCP/DDNS Troubleshooting dguy Linux - Networking 5 06-09-2002 03:27 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 07:31 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration