LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   configure DNS issue (https://www.linuxquestions.org/questions/linux-server-73/configure-dns-issue-564533/)

tanveer 06-26-2007 03:57 AM

configure DNS issue
 
Hi all,

I want to clarify some issues regarding DNS.
I want to setup a domain name for my office which is small size. I will setup DNS for the domain name valley.com
In that domain I want to divide them department wise like marketing.valley.com, finance.valley.com etc. and inside them will be hosts like host1.marketing.valley.com, host2.marketing.valley.com as well as for others.
Now what will be my dns server configuration and zone files?
I have added this in my /etc/named.conf
Code:

// named.conf file fragment
....
options {
    ....
    // stop everyone
    allow-transfer {"none";};
    ....
};
zone "valley.com" in{
  type master;
  file "valley.com.fr";
  allow-transfer {none;};
};

I have made valley.com.fr and valley.com.rev.
Code:

; zone fragment for 'zone name' valley.com
; name servers in the same zone
$TTL 2d ; zone default TT = 2 days
@              IN      SOA  ns1.valley.com. root.valley.com. (
              2003080800 ; serial number
              2h        ; refresh =  2 hours
              15M        ; update retry = 15 minutes
              3W12h      ; expiry = 3 weeks + 12 hours
              2h20M      ; minimum = 2 hours + 20 minutes
              )
; main domain name servers
              IN      NS    ns1.valley.com.

; A records for name servers above
ns1          IN      A      192.168.0.3

; other domain level hosts and services
marketing      IN      A    192.168.0.6
finance                IN        A    192.168.0.8                       
....

; sub-domain definitions
$ORIGIN marketing.valley.com.

; A record for subdomain mail server
host1          IN      A      10.10.0.28
host2          IN      A      10.10.0.32

Now, should I have to make entry in named.conf for marketing.valley.com or for host1.marketing.valley.com or where should I put these entries for these subdomains? Is that ok?
Waiting for your kind response.

ramram29 06-27-2007 02:08 PM

You need to create a zone file for each zone. market.valley.com and finance.valley.com are two separate zones. valley.com is another separate zone. otherwize market.valley.com would look like a record in the zone instead of a zone that provides records.

tanveer 06-29-2007 09:20 PM

Thanks for your reply.
Does that mean I have to create one zone entry in /etc/named.conf for each department as well as create their forward and reverse zone files?

What to put in those departmental zone files?
Code:

; zone fragment for 'zone name' market.valley.com
; name servers in the same zone
$TTL 2d ; zone default TT = 2 days
@            IN      SOA  ns1.valley.com. root.valley.com. (
              2003080800 ; serial number
              2h        ; refresh =  2 hours
              15M        ; update retry = 15 minutes
              3W12h      ; expiry = 3 weeks + 12 hours
              2h20M      ; minimum = 2 hours + 20 minutes
              )
; main domain name servers
              IN      NS    ns1.valley.com.

; A records for name servers above
ns1          IN      A      192.168.0.3

; other domain level hosts and services
marketing      IN      A    192.168.0.6

Something like this?

ramram29 07-03-2007 10:56 AM

You have to create a zone file for each zone. marketing.example.com and sales.example.com can be hosts of the example.com zone or they can be individual zones.

If marketing.example.com is a host then the marketing host record belongs in the example.com zone. If marketing.example.com is a zone then it has to have records of hosts within it's zone file, such as server1.marketing.example.com, johnpc.marketing.example.com. You need to understand the DNS hierarchy. I would suggest to pick up a good DNS book and do your homework.

tanveer 07-15-2007 12:04 PM

Hi thanks for your replies.

One more thing, Say if there are huge lists of hosts under marketing.example.com 192.168.100.20-50, 172.10.10.34-78, ..etc then in marketing.example.com.fr file I have to put all the A records and do I have to create reverse records based on per netowork like 100.168.192.rev, 10.10.172.rev....etc.

Also if a new host is added in the marketing zone then will the slave get automatically updated or for that I have to do DDNS?

Thanks in advance.


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