LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 10-28-2009, 10:12 AM   #1
quasi3
Member
 
Registered: Mar 2006
Posts: 41

Rep: Reputation: 16
Setting up a DNS Sub Domain


I've tried to set up a subdomain but unsuccessfully. I've been reading 'DNS and BIND' along with numerous online tutorials.
First I would like to make sure I understand how the configuration works:

a.dom parent
b.a.dom delegated subdomain

1.In all texts I've read there is an assumption the reader knows what the resolv.conf of the CLIENTS within the subdomain contains. Does this contain the address of the parent NSs or the subdomain NSs as it's primary/secondary?

2.Does the resolv.conf on CLIENTS search a.dom or b.a.dom? I'm assuming the latter but just making sure.

3.If a client 'lou.b.a.dom' wants to lookup 'joe.a.dom' can he ping 'joe' or does he have to ping 'joe.a.dom'?

4. The reverse of #3. Can 'joe.a.dom ping'lou' or does he have to ping 'lou.b.a.dom'?

5. If 3&4 require the longer name is there a way to use only the short name?


With my current test configuration I can point a subdomain client to either the parent or child nameservers and only get what is listed in their domains.

Last edited by quasi3; 10-28-2009 at 10:32 AM.
 
Old 10-28-2009, 03:05 PM   #2
janoszen
Member
 
Registered: Oct 2009
Location: Budapest
Distribution: Mostly Gentoo, sometimes Debian/(K)Ubuntu
Posts: 143

Rep: Reputation: 22
Delegated subdomain?

I'm not sure, I'm getting you right. Do you want to set up a subdomain for a registered domain in a way, that the subdomain is managed under a different zone?

If yes: you need to know nothing about resolv.conf, your DNS resolver takes care of all that. Just make sure, the resolver knows about your domain. (If you have officially registered it, this is allready the case.)

Let's take example.com az a zone, ns1.provider.com and ns2.provider.com as NS servers and 1.2.3.4 as the IP address of your NS server for the subdomain. Your zone file for example.com. would look like this:

Code:
$TTL 600
example.com. IN SOA ns1.provider.com. hostmaster.provider.com. (
 2009102601
 86400
 7200
 604800
 600 )
example.com. IN NS ns1.provider.com.
example.com. IN NS ns2.provider.com.
example.com. IN A 1.3.5.7
example.com. IN MX 5 mx.provider.com
home.example.com. IN NS ns.home.example.com.
ns.home.example.com. IN A 1.2.3.4
Note the last line. This is called a glue record. Without this, the recursor has no way of resolving ns.home.example.com. If you have done this correctly, you should now be able to create a new zone called home.example.com in your DNS server at 1.2.3.4 with all the glory and pain of a grown-up zone. If should look like this:

Code:
$TTL 600
home.example.com. IN SOA ns.home.example.com. me.example.com (
 2009102601
 86400
 7200
 604800
 600 )
home.example.com. IN NS ns.home.example.com.
ns.home.example.com. IN A 1.2.3.4
home.example.com. IN A 1.2.3.4
I hope this helps. If you try it out, please try on a domain you don't care about. Messing with the DNS can easily result in your e-mail or website not working. You have been warned.
 
Old 10-28-2009, 03:48 PM   #3
quasi3
Member
 
Registered: Mar 2006
Posts: 41

Original Poster
Rep: Reputation: 16
First, this is a private non-registered domain within a company.

We are a division in a separate location from our main office and are trying to create a delegated subdomain. Currently everyone is in one domain between two states.

When referring to the resolv.conf file I was speaking of the individual computers within the subdomain, not the nameservers.

Here's my current attempt:
Parent Domain:
Code:
$ORIGIN domain.nonreg.
$TTL 3600   ; 1 hour
@       IN SOA  ns1.domain.nonreg. hostmaster.domain.nonreg. (
                41982      ; serial
                900        ; refresh (15 minutes)
                600        ; retry (10 minutes)
                86400      ; expire (1 day)
                3600       ; minimum (1 hour)
                )
            NS  ns1.domain.nonreg.

$TTL 900    ; 15 minutes
apps2           A   193.xx.xx.xxx
apps3           A   193.xx.xx.xxx
apps4           A   193.xx.xx.xxx

; sub-domain definitions

child.domain.nonreg.  IN      NS     ns2.child.domain.nonreg.
; sub-domain address records for name server only - glue record
ns2.child.domain.nonreg.   IN      A      202.xx.xx.xx3 ; 'glue' record
Subdomain:
Code:
$TTL 3600   ; 1 hour
@       IN SOA  ns2.child.domain.nonreg. hostmaster.child.domain.nonreg. (
                1      ; serial
                900        ; refresh (15 minutes)
                600        ; retry (10 minutes)
                86400      ; expire (1 day)
                3600       ; minimum (1 hour)
                )
;
;Name Servers
;
child.domain.nonreg. IN   NS  ns2.child.domain.nonreg.
child.domain.nonreg. IN    A 202.xx.xx.xx3

$ORIGIN child.domain.nonreg.
$TTL 86400  ; 1 day
rd01         A   202.xx.xx.xxx
rd02         A   202.xx.xx.xxx
rd03         A   202.xx.xx.xxx

Currently this does not work. I can only resolve one domain or the other depending on the which I choose for a name server.
Anything obvious?

Last edited by quasi3; 10-28-2009 at 03:50 PM.
 
Old 10-29-2009, 03:10 AM   #4
janoszen
Member
 
Registered: Oct 2009
Location: Budapest
Distribution: Mostly Gentoo, sometimes Debian/(K)Ubuntu
Posts: 143

Rep: Reputation: 22
Private

In case of private domains, you _MUST_ let your network's resolver know about the domain. However, since a domain is really (really) cheap, you could just buy one. Your time might cost your company more.
 
Old 10-29-2009, 09:38 AM   #5
quasi3
Member
 
Registered: Mar 2006
Posts: 41

Original Poster
Rep: Reputation: 16
This setup is mainly for programmers to easily shell into different servers to work. I don't see a reason to buy a domain. It's been working fine without an added subdomain, we just want to add the subdomain now. Everything should be resolved internally, outside of surfing the web.
 
Old 10-29-2009, 12:49 PM   #6
janoszen
Member
 
Registered: Oct 2009
Location: Budapest
Distribution: Mostly Gentoo, sometimes Debian/(K)Ubuntu
Posts: 143

Rep: Reputation: 22
Then?

I don't really understand your question then. You just need to add the subdomain to your existing zone.
 
Old 10-29-2009, 01:05 PM   #7
quasi3
Member
 
Registered: Mar 2006
Posts: 41

Original Poster
Rep: Reputation: 16
Right, and it's not working.
 
Old 10-30-2009, 04:36 AM   #8
janoszen
Member
 
Registered: Oct 2009
Location: Budapest
Distribution: Mostly Gentoo, sometimes Debian/(K)Ubuntu
Posts: 143

Rep: Reputation: 22
dig

Try the "dig" tool to query your DNS entries. First, start off with a recursion using your resolver. If that works, go into details querying records around your subdomain.
 
Old 10-30-2009, 11:05 AM   #9
quasi3
Member
 
Registered: Mar 2006
Posts: 41

Original Poster
Rep: Reputation: 16
I still haven't gotten answers to my original questions.

What nameserver should any tom, dick, or harry's resolver (in the subdomain) point to in resolv.conf? The subdomain nameserver or the parent nameserver?

Also, do my configuration files look correct?
 
Old 10-30-2009, 01:31 PM   #10
the_penguinator
Member
 
Registered: Jan 2009
Location: Canada
Distribution: slackware, OpenBSD, OSX
Posts: 233

Rep: Reputation: 25
Quote:
Originally Posted by quasi3 View Post
I've tried to set up a subdomain but unsuccessfully.
this sounds like a job for dnsmasq
 
Old 10-30-2009, 01:31 PM   #11
quasi3
Member
 
Registered: Mar 2006
Posts: 41

Original Poster
Rep: Reputation: 16
Think I found my problem.
My named.conf file in the parent had a typo.
Now trying to get my head around how the cross slaving works.
 
Old 10-30-2009, 01:43 PM   #12
janoszen
Member
 
Registered: Oct 2009
Location: Budapest
Distribution: Mostly Gentoo, sometimes Debian/(K)Ubuntu
Posts: 143

Rep: Reputation: 22
Clear text

Cleartext: the resolver needs to know about your domains. dnsmasq, bind or whatever. Your choice. You need to configure it to read from your DNS szerver FIRST, recurse afterwards.
 
  


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
Setting up domain Zeno McDohl Linux - Server 2 06-27-2008 10:27 AM
Setting up a domain name? riseinarms Linux - Newbie 2 12-06-2007 06:04 PM
setting domain name! justsimran Linux - General 4 03-13-2007 09:10 AM
setting up a domain mbvo Linux - Networking 7 10-09-2006 04:40 PM
Setting up a domain name... Sanna Linux - Newbie 2 05-02-2004 01:53 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 09:49 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