LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 06-04-2013, 06:26 AM   #1
vostrushka
LQ Newbie
 
Registered: Aug 2011
Posts: 15

Rep: Reputation: Disabled
DNS with multiple zone files


I have three separate IP ranges, but I would like to keep them under one domain name (without sub-domains).
So far I've created one entry for the zone:
zone "home.net" IN {
type master;
file "home.net.zone";
allow-update { none; };
};

and keep all of my different IP tables in that one zone file.
I would like to have separate files for each IP range. Is that possible to configure?
Leonid
 
Old 06-04-2013, 06:29 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
Sure, your reverse and forward domains don't actually have anything directly in common, the would have to be defined as 4 separate zone files (1 forward, 3 reverse).
 
Old 06-04-2013, 10:49 AM   #3
vostrushka
LQ Newbie
 
Registered: Aug 2011
Posts: 15

Original Poster
Rep: Reputation: Disabled
Aha, sorry, forgot to tell that reverse zones are already separate. I wanted to split forward file into three, but let them be in one domain.
Leonid
 
Old 06-04-2013, 10:53 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
ah, well no, that doesn't make sense to do that. the forward zone is about the name, not the addresses.
 
Old 06-04-2013, 10:56 AM   #5
vostrushka
LQ Newbie
 
Registered: Aug 2011
Posts: 15

Original Poster
Rep: Reputation: Disabled
Here is how my zone file look like. See separate sections down below that represent different subnets. I wanted to separate those into different files so it will be easier to script updates.
If there is no way to split it, can I use INCLUDE operator to do this?

Leonid

# cat home.net.zone
$TTL 86400
home.net. IN SOA winter.home.net. home.net. (
2013051415 ; serial
1D ; refresh
15M ; retry
30D ; expire
1D ; minimum
)
IN NS winter.home.net.
;
; ZONE 10.10.10.0 BEGINS HERE
winter.home.net. IN A 10.10.10.1
winter10 IN CNAME winter
sulaco.home.net. IN A 10.10.10.2
sulaco10 IN CNAME sulaco
; ZONE 10.10.10.0 ENDS HERE
;
; ZONE 10.10.8.0 BEGINS HERE
winter8.home.net. IN A 10.10.8.1
sulaco8.home.net. IN A 10.10.8.2
; ZONE 10.10.8.0 ENDS HERE
;
; Zone 10.10.1.0 BEGINS HERE
winter1.home.net. IN A 10.10.1.1
sulaco1.home.net. IN A 10.10.1.2
; Zone 10.10.1.0 ENDS HERE
;
; Zone 35.15.1.0 BEGINS HERE
winter-wifi.home.net. IN A 35.15.1.1
sulaco-wifi.home.net. IN A 35.15.1.2
; Zone 35.15.1.0 ENDS HERE
 
Old 06-04-2013, 11:33 AM   #6
vostrushka
LQ Newbie
 
Registered: Aug 2011
Posts: 15

Original Poster
Rep: Reputation: Disabled
$INCLUDE statement does the job, splitting main zone file into subnet files.
Chris, thank you.
Leonid
 
1 members found this post helpful.
Old 06-04-2013, 12:07 PM   #7
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
Ahh, good catch. I think that's a fairly recent change in BIND? fundamentally that is outside the scope of the zone file itself, as that's reconstructed to comply with the DNS RFCs. The contents of the zone files are not Bind specific at all, and should be exactly the same as what you'd get from a zone transfer from any other compliant DNS server, but as they do now have the INCLUDE statement I guess you can take a small step away from that standard.
 
  


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
Which zone bind dns work either in forward zone are reverse zone sanjay87 Linux - Server 2 06-05-2012 04:21 AM
DNS Server with multiple network zone sikkalgopal Linux - Server 1 03-29-2010 12:52 PM
DNS Zone Files Swakoo Linux - Newbie 3 06-22-2005 04:54 AM
Bind and DNS information conf files and zone files aaronluke Linux - General 1 10-13-2002 09:41 AM
Get Zone files from DNS? mig Linux - General 0 02-28-2002 03:03 AM

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

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