LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Newly added hosts to BIND... (https://www.linuxquestions.org/questions/linux-server-73/newly-added-hosts-to-bind-4175443207/)

slackware_newbie 12-28-2012 12:20 AM

Newly added hosts to BIND...
 
Newly added hosts to BIND take long for other computer beeing found.

So what do I need to "propagate" them faster to other OS?

My Zone file:
Code:

$ttl 38400
local.        IN        SOA        lamp. info.xxxxx.de. (
                        1356636207
                        10800
                        3600
                        604800
                        38400 )
local.        IN        NS        lamp.
www.zf-template.local.        IN        A        192.168.1.4


bathory 12-28-2012 02:44 AM

Hi,

If you add a new host in a zone, that host is not cached anywhere, so it can be resolved immediately from clients using your dns.
So, do you remember to increase the serial number and reload bind after adding/editing hosts?

Regards

slackware_newbie 12-28-2012 03:29 AM

Quote:

Originally Posted by bathory (Post 4858267)
So, do you remember to increase the serial number and reload bind after adding/editing hosts?

Hi,

don't know anything about a serial number (using webmin) but I definitely reloaded BIND after adding a host. Still needs approx. 15 minutes to be available.

bathory 12-28-2012 04:09 AM

Quote:

don't know anything about a serial number (using webmin) but I definitely reloaded BIND after adding a host. Still needs approx. 15 minutes to be available
In your case the serial is the number "1356636207", but since you're using webmin to administer your dns, I guess increasing is done automatically by webmin after editing the zone file..
Anyway a new host should be resolvable immediately after been added in the zone file, either from the nameserver and from the clients, because it's not cached.
Add a new host and see what gives:
Code:

dig new-host.local @x.x.x.x
(x.x.x.x is the dns IP) when you run it from the nameserver itself and from a client?

slackware_newbie 01-07-2013 02:08 AM

Problem is: After reboot of the client (and hence the server too because it's a VM) it takes approx. 15 minutes before the addresses the DNS handles can be resolved.

bathory 01-07-2013 02:38 AM

Quote:

Originally Posted by slackware_newbie (Post 4864350)
Problem is: After reboot of the client (and hence the server too because it's a VM) it takes approx. 15 minutes before the addresses the DNS handles can be resolved.

It's not possible, unless it takes 15min for bind to start, or there is some other networking problem.
Once named is up and running, the dns can resolve whatever domain it's authoritative for.

slackware_newbie 01-07-2013 02:40 AM

Hmmm...
Some other networking problem? Sounds reasonable. What comes to your mind looking at my situation?

bathory 01-07-2013 03:21 AM

Quote:

Originally Posted by slackware_newbie (Post 4864366)
Hmmm...
Some other networking problem? Sounds reasonable. What comes to your mind looking at my situation?

Doh. Since the client is also the host on which the VM is running, it could be that it takes some time for the VM to boot, get an IP (and configure its network settings) and start the services.
The fact is that once bind is up and running, the dns resolution should not be a problem

slackware_newbie 01-07-2013 03:23 AM

Quote:

Originally Posted by bathory (Post 4864392)
Doh. Since the client is also the host on which the VM is running, it could be that it takes some time for the VM to boot, get an IP (and configure its network settings) and start the services.
The fact is that once bind is up and running, the dns resolution should not be a problem

Hmmm... But using nslookup gets me the DNS server imediately. ?!?

bathory 01-07-2013 04:24 AM

Quote:

Originally Posted by slackware_newbie (Post 4864394)
Hmmm... But using nslookup gets me the DNS server imediately. ?!?

Dunno what you mean.
Try nslookup or better dig as it gives more details:
Code:

dig new-host.local @x.x.x.x
from both the server and the client, once the VM has booted and see what you get.

slackware_newbie 01-09-2013 10:12 AM

This is from dig:

Code:

; <<>> DiG 9.9.2-P1 <<>> www.zf-template.loc
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 63289
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;www.zf-template.loc.              IN      A

;; ANSWER SECTION:
www.zf-template.loc.      38400  IN      A      192.168.1.4

;; AUTHORITY SECTION:
loc.                    38400  IN      NS      lamp.

;; Query time: 1 msec
;; SERVER: 192.168.1.4#53(192.168.1.4)
;; WHEN: Wed Jan 09 13:30:40 2013
;; MSG SIZE  rcvd: 79

but I cannot ping www.zf-template.loc for approx. 15 minutes after reboot.

bathory 01-09-2013 11:37 AM

Quote:

This is from dig:
<snip>
but I cannot ping www.zf-template.loc for approx. 15 minutes after reboot
Where did you run dig from? If you ran dig from the client and you got an answer right after booting the server, then you should get the same answer from whatever application that runs on the client and uses the server as a resolver.
Also what you mean by "I cannot ping www.zf-template.loc"?
When you run:
Code:

ping www.zf-template.loc
do you see the host IP but no replies, or you get a "host unknown"?

slackware_newbie 01-09-2013 01:03 PM

Quote:

Originally Posted by bathory (Post 4866312)
When you run:
Code:

ping www.zf-template.loc
do you see the host IP but no replies, or you get a "host unknown"?

"host unknown".

Very strange.

bathory 01-09-2013 04:37 PM

Quote:

Originally Posted by slackware_newbie (Post 4866372)
"host unknown".

Very strange.

Let me see if I understand well the situation.
You can dig the host www.zf-template.loc and get its IP address from a client, but right after that pinging that host from the same client you get a "host unkown"?
What's in the client /etc/resolv.conf and /etc/nsswitch.conf?

slackware_newbie 01-10-2013 12:54 AM

In this special case the host is running on Windows 7 but dig and ping from other Linux hosts gives the same result.


All times are GMT -5. The time now is 03:55 AM.