LinuxQuestions.org
Review your favorite Linux distribution.
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 04-03-2010, 09:42 PM   #1
Jezzirolk
LQ Newbie
 
Registered: Sep 2009
Posts: 21

Rep: Reputation: 0
Post BIND9 fails with specific setup


when i try to set up bind9 to resolve the top level of the name it cant do it.
for current sake of arguement i have 4 servers on the network

192.168.0.200 diana.undernets.lan
192.168.0.201 jen.undernets.lan
192.168.0.202 amanda.undernets.lan
192.168.0.203 alex.undernets.lan

those are the IP addresses of the servers and their respective hostnames
so if i send a request for anything to just undernets.lan it will fail because there is no record for that. so i added this to the bottom of the zone record
Code:
               IN      CNAME   amanda
thinking that a blank would refer to the top of the zone

here is my named.conf.local which is called in my named.conf

Code:
zone "undernets.lan" {
        type master;
        file "/etc/bind/undernets.db";
};

zone "0.168.192.in-addr.arpa" {
        type master;
        file "/etc/bind/192.rev";
};
and here is undernets.db that works
Code:
@       IN      SOA     undernets.lan. root.undernets.lan. (
                            206         ;serial
                         604800         ;refresh
                          86400         ;retry
                        2419200         ;Expire
                         604800 )       ;TTL


        IN      NS      amanda.undernets.lan.

diana           IN      A       192.168.0.200
jen             IN      A       192.168.0.201
amanda          IN      A       192.168.0.202
alex            IN      A       192.168.0.203
;               IN      CNAME   amanda
if i remove the ; and make that not a comment then the whole server fails to resololve anything

is there a way to achieve what i am trying to do?
i want to be able to lookup undernets.lan and it give me the IP address of amanda.undernets.lan
 
Old 04-04-2010, 03:27 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,164
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Hi,

A blank space in the beginning of a Resource Record gets replaced by the $ORIGIN (in your case undernets.lan). So what you actually do is:
Quote:
undernets.lan IN CNAME amanda
that is not correct.
What you can do is:
Code:
   IN A 192.168.0.202
Regards
 
Old 04-04-2010, 09:05 AM   #3
Jezzirolk
LQ Newbie
 
Registered: Sep 2009
Posts: 21

Original Poster
Rep: Reputation: 0
i tried what you suggested and put an entry in as

Code:
    IN A 192.168.0.202
and commented out the other entry with 192.168.0.202

but that fails to do anything i changed it in the zone file and in the reverse lookup file and restarted bind and still when i dig undernets.lan i get nothing in return. it says it has 0 answers. any ideas? my bind server is running on debian 5 if that is at all relevant
 
Old 04-04-2010, 09:22 AM   #4
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,164
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Have you increased the serial:
Quote:
206 ;serial
before restarting named?

You can also use, if you want, the whole zone name instead of a blank space:
Code:
undernets.lan.  IN A 192.168.0.202
 
  


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
bind9 server fails to resolve locally Vimuth Linux - Enterprise 5 12-14-2009 10:55 AM
how to setup dns server on ubuntu by bind9 renuaseri Linux - Newbie 1 11-18-2009 02:15 AM
I setup Bind9 for my own hostname/website, but can't see it on the web... rtoney5 Linux - Server 8 02-25-2009 06:50 AM
Simple chroot Bind9 setup? canegames Linux - Software 1 06-30-2006 05:08 AM
Backup fails on specific files tcamp Linux - General 3 12-19-2004 05:56 AM

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

All times are GMT -5. The time now is 11:33 AM.

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