Resolving zones inside two different views
Posted: 2017/10/11 12:37:01
Hi,
I've two DNS servers, one is at DC1 (192.1.1.1) and another one is at DC2 (172.2.2.1)
I've a zone "example.com" under a view "DC1"
the zone example.com is pointing to a webserver 192.1.1.11
Another view "DC2" with same zone name "example.com" is pointing to a web server 172.2.2.22
named.conf
view "DC1"
{
match-clients { 192.1.1.0/24; }
zone "example.com"{
type "master";
file "db.example.dns1"; --> 192.1.1.11
}
};
view "DC2"
{
match-clients { any; };
zone "example.com"{
type master;
file "db.example.dns2"; --> 172.2.2.22
}
};
everything is working good when I use "dig example.com" from the dns1 server (192.1.1.1)
It is returning the IP address 192.1.1.11
When I shut down the machine (192.1.1.11) I should get the IP address of webserver (172.2.2.22) located at DC2 i.e, DNS 2 (172.2.2.2)
but it is not happening now, it is returning the IP 192.1.1.11 because the first view (DC1) is resolving the query since I made a request from the local subnet/Data center 1 (192.1.1.1)
How to get the IP address of webserver at DC2 (172.2.2.22) when the web server of DC1 (192.1.1.11) is down?
Please share your ideas..
Thank you.
Hari
I've two DNS servers, one is at DC1 (192.1.1.1) and another one is at DC2 (172.2.2.1)
I've a zone "example.com" under a view "DC1"
the zone example.com is pointing to a webserver 192.1.1.11
Another view "DC2" with same zone name "example.com" is pointing to a web server 172.2.2.22
named.conf
view "DC1"
{
match-clients { 192.1.1.0/24; }
zone "example.com"{
type "master";
file "db.example.dns1"; --> 192.1.1.11
}
};
view "DC2"
{
match-clients { any; };
zone "example.com"{
type master;
file "db.example.dns2"; --> 172.2.2.22
}
};
everything is working good when I use "dig example.com" from the dns1 server (192.1.1.1)
It is returning the IP address 192.1.1.11
When I shut down the machine (192.1.1.11) I should get the IP address of webserver (172.2.2.22) located at DC2 i.e, DNS 2 (172.2.2.2)
but it is not happening now, it is returning the IP 192.1.1.11 because the first view (DC1) is resolving the query since I made a request from the local subnet/Data center 1 (192.1.1.1)
How to get the IP address of webserver at DC2 (172.2.2.22) when the web server of DC1 (192.1.1.11) is down?
Please share your ideas..
Thank you.
Hari