-2

I have 3 Debian VM. 1)DNS 2)DHCP 3)Client

DHCP looks ok. I got my fixed-address on DNS and Client like I want.

When I try to ping each of them @ip it's responding. If I try to :

ping dhcp

But I got a :

unknown host dhcp

Same for nas.

I don't know where it come from because I have set my zone and db file correctly.

named.conf.local

//
// Do any local configuration here
//
zone "pro.lan" {
     type master;
     file "/etc/bind/db.pro.lan";
};

zone "84.168.192.in-addr.arpa" {
     type master;
     file "/etc/bind/db.pro.lan.inv";
};


// Consider adding the 1918 zones here, if they are not used in your
// organization
//include "/etc/bind/zones.rfc1918";

db.pro.lan

$TTL 604800
@ IN SOA dns.pro.lan. root.pro.lan. (
  2015052401
  604800
  86400
  2419200
  604800
)

pro.lan IN NS   dns.pro.lan.

dns     IN A    192.168.84.50
dhcp    IN A    192.168.84.51
nas     IN A    192.168.84.10

db.pro.lan.inv

$TTL 604800
@ IN SOA dns.pro.lan. root.pro.lan. (
  2015052401
  604800
  86400
  2419200
  604800
)

IN      NS      dns.pro.lan.
50      IN PTR  dns
51      IN PTR  dhcp
10      IN PTR  nas

Edit : I modified the file thanks to @Eric Renouf

named-checkconf 

it's looks good but

named-checkzone pro.lan db.pro.lan
zone pro.lan/IN: has no NS records

same for rDNS file.

aseq
  • 4,550
  • 1
  • 22
  • 46
Ragnar
  • 113
  • 7
  • 3
    You still have [one question open](http://serverfault.com/questions/694156/rdns-zone-xxx-has-no-address-record-a-or-aaaa) regarding the configuration of this zone file. Please make sure to click on the check box next to the answer that provided the solution that helped you so that the question does not show up in searches as unanswered. – Andrew B May 25 '15 at 17:08

2 Answers2

2

I think the problem may be with your NS record in db.pro.lan. Your line starts with pro.lan which does not end in a . so will have the pro.lan automatically appended by bind so your domain there will become pro.lan.pro.lan. which isn't what you want.

If you just remove the pro.lan you should get what you want from that zone. So your NS record will now look like:

    IN NS dns.pro.lan.

Make sure you increment the counter (2015052401 in your case, should probably become 2015052501) then do rndc reload

Eric Renouf
  • 939
  • 8
  • 19
  • Thanks. I know the thing with the . at the end. I fixed for both files, incremented the serial and restart the service. Unfortunately same problem. – Ragnar May 25 '15 at 15:03
  • I assume you're using your server for DNS in `/etc/resolv.conf`? Just to eliminate the basic thing first – Eric Renouf May 25 '15 at 15:16
  • yes on each vm resolv.conf get set automatically with my DNS conf – Ragnar May 25 '15 at 15:30
  • @Ragnar I disagree; from the looks of your edit, you added trailing dots within your `SOA` record but did not touch your `NS` record. `pro.lan IN NS dns.pro.lan.` translates to `pro.lan.pro.lan. IN NS dns.pro.lan.`. – Andrew B May 25 '15 at 17:14
  • @Andrew B Yes I had `@` instead and I read it act the same. It's working now thanks all – Ragnar May 25 '15 at 17:37
  • @Ragnar That was not reflected in your question or your edit. Your question as presented clearly has syntax problems and errors that correlate to them. :( It is getting very confusing to follow your questions and some of us are probably going to stop trying. – Andrew B May 25 '15 at 17:43
0

When you run "ping dhcp" the library code that does name lookups looks for your local domain name in /etc/resolv.conf to append to "dhcp" to make dhcp.pro.lan

if "ping dhcp.pro.lan" works and "ping dhcp" does not then you need to add:

domain pro.lan
search pro.lan

to /etc/resolv.conf

JasperWallace
  • 214
  • 1
  • 4