Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
06-04-2013, 06:26 AM
|
#1
|
LQ Newbie
Registered: Aug 2011
Posts: 15
Rep: 
|
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
|
|
|
06-04-2013, 06:29 AM
|
#2
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417
|
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).
|
|
|
06-04-2013, 10:49 AM
|
#3
|
LQ Newbie
Registered: Aug 2011
Posts: 15
Original Poster
Rep: 
|
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
|
|
|
06-04-2013, 10:53 AM
|
#4
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417
|
ah, well no, that doesn't make sense to do that. the forward zone is about the name, not the addresses.
|
|
|
06-04-2013, 10:56 AM
|
#5
|
LQ Newbie
Registered: Aug 2011
Posts: 15
Original Poster
Rep: 
|
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
|
|
|
06-04-2013, 11:33 AM
|
#6
|
LQ Newbie
Registered: Aug 2011
Posts: 15
Original Poster
Rep: 
|
$INCLUDE statement does the job, splitting main zone file into subnet files.
Chris, thank you.
Leonid
|
|
1 members found this post helpful.
|
06-04-2013, 12:07 PM
|
#7
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417
|
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.
|
|
|
All times are GMT -5. The time now is 01:22 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|