LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-19-2007, 09:25 AM   #1
Seventh
Member
 
Registered: Dec 2003
Location: Boston, MA
Distribution: Redhat / Debian
Posts: 269

Rep: Reputation: 30
Question DNS / resolv.conf newbie question


I'm setting up a NAT network behind my main domain for one of my labs. The domain is setup as labnet.domain.com.

In resolv.conf, I have:

search domain.com
1.2.3.4
1.2.3.4

Do I need to add a second line for the subdomain? EG I'm pinging machines as machinename.labnet.domain.com. I can't get the bugger to resolve normally - for example, just pinging the hostname without the full domain name, 'ping machine1' doesn't work, while 'ping machine1.labnet.domain.com' does.

Any insight would be appreciated. Thanks!
 
Old 03-19-2007, 09:29 AM   #2
nx5000
Senior Member
 
Registered: Sep 2005
Location: Out
Posts: 3,307

Rep: Reputation: 55
Quote:
Originally Posted by Seventh

Do I need to add a second line for the subdomain?
If the machine from where you ping is not in *.labnet.domain.com then yes.

man resolv.conf
 
Old 03-19-2007, 09:38 AM   #3
Seventh
Member
 
Registered: Dec 2003
Location: Boston, MA
Distribution: Redhat / Debian
Posts: 269

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by nx5000
If the machine from where you ping is not in *.labnet.domain.com then yes.

man resolv.conf
Thanks. I'm trying to run my own DNS internal to my lab so I can just 'ping machinename' within my lab domain, but at the same time use my DNS server as a gateway to the main domain. Everything works (wahoo) other than the fact that I just can't ping the hostname only.
 
Old 03-19-2007, 09:42 AM   #4
Seventh
Member
 
Registered: Dec 2003
Location: Boston, MA
Distribution: Redhat / Debian
Posts: 269

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by nx5000
If the machine from where you ping is not in *.labnet.domain.com then yes.

man resolv.conf
Thanks. I'm trying to run my own DNS internal to my lab so I can just 'ping machinename' within my lab domain, but at the same time use my DNS server as a gateway to the main domain. Everything works (wahoo) other than the fact that I just can't ping the hostname only.

/me dives back into the man page.
 
Old 03-19-2007, 10:38 AM   #5
Seventh
Member
 
Registered: Dec 2003
Location: Boston, MA
Distribution: Redhat / Debian
Posts: 269

Original Poster
Rep: Reputation: 30
Here's my resolv.conf:
0.254 is my internal nameserver, the other two are the domain nameservers outside my lab network.

Code:
search cotlabnat.mitre.org
nameserver 192.168.0.254
nameserver 129.83.20.47
nameserver 129.83.20.134
And my named.conf:

Code:
//
// named.conf for Red Hat caching-nameserver
//

options {
        directory "/var/named";
        dump-file "/var/named/data/cache_dump.db";
        statistics-file "/var/named/data/named_stats.txt";
        /*
         * If there is a firewall between you and nameservers you want
         * to talk to, you might need to uncomment the query-source
         * directive below.  Previous versions of BIND always asked
         * questions using port 53, but BIND 8.1 uses an unprivileged
         * port by default.
         */
         // query-source address * port 53;
        recursion yes;
        forwarders {
                129.83.20.47;
                };
        forward first;
};

//
// a caching only nameserver config
//
controls {
        inet 127.0.0.1 allow { localhost; } keys { rndckey; };
};

zone "." IN {
        type hint;
        file "named.ca";
};

zone "localdomain" IN {
        type master;
        file "localdomain.zone";
        allow-update { none; };
};

zone "localhost" IN {
        type master;
        file "localhost.zone";
        allow-update { none; };
};

zone "0.0.127.in-addr.arpa" IN {
        type master;
        file "named.local";
        allow-update { none; };
};

zone "0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa" IN
 {
        type master;
        file "named.ip6.local";
        allow-update { none; };
};

zone "255.in-addr.arpa" IN {
        type master;
        file "named.broadcast";
        allow-update { none; };
};

zone "0.in-addr.arpa" IN {
        type master;
        file "named.zero";
        allow-update { none; };
};



include "/etc/rndc.key";
server 129.83.20.47 {
        };
server 129.83.20.134 {
        };
zone "cotlabnat.mitre.org" {
        type master;
        file "/var/named/cotlabnat.mitre.org.hosts";
        };
 
Old 03-19-2007, 06:19 PM   #6
Seventh
Member
 
Registered: Dec 2003
Location: Boston, MA
Distribution: Redhat / Debian
Posts: 269

Original Poster
Rep: Reputation: 30
Bump. I can't seem to figure this out, I know it has to be something simple too.
 
Old 03-20-2007, 06:15 AM   #7
TigerOC
Senior Member
 
Registered: Jan 2003
Location: Devon, UK
Distribution: Debian Etc/kernel 2.6.18-4K7
Posts: 2,380

Rep: Reputation: 49
open /etc/hosts for each box on the network and try;
ip_address hostname alias
eg 192.168.0.1 machine1.labnet.domain.com machine1
see; http://www.samspublishing.com/librar...eqNum=123&rl=1

Last edited by TigerOC; 03-20-2007 at 08:23 AM.
 
Old 03-20-2007, 07:47 AM   #8
nx5000
Senior Member
 
Registered: Sep 2005
Location: Out
Posts: 3,307

Rep: Reputation: 55
I'm sorry Seventh, I think I can't help you reliably. It's been a while I didn't play with DNS configuration. It's probably a little thing to change..?
Maybe you could open a new thread with another title (it's not anymore a resolv.conf problem and not a newbie question)
I'm sure there are some skilled members on DNS on LQ.

Good luck!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
resolv.conf won't hold dns johngrinham Linux - Networking 9 07-05-2006 11:39 AM
DNS Hosts.conf or resolv.conf problem mac_casey SUSE / openSUSE 0 03-26-2006 10:21 AM
resolv.conf dns issues billbob Linux - Software 3 09-30-2005 01:20 PM
dns server and /etc/resolv.conf freeosfreesoul Linux - Laptop and Netbook 2 09-02-2005 07:45 PM
DNS & resolv.conf robeb Linux - Networking 1 06-25-2002 10:15 PM


All times are GMT -5. The time now is 01:32 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration