Multiple DNS server configuration
<yambe:breadcrumb>Bind_DNS_server_configuration|Bind DNS</yambe:breadcrumb>
Multiple DNS server configuration
Different DNS for different zone
It is possible for an organization to have many internal DNS servers serving different domains. Assume the domains to be example.com and example.org. Now if a client requests example.com DNS server for example.org address resolution then the request may be resolved as a public request, because example.com server will treat example.org same as yahoo.com or google.co.in. To ensure that such requests also get resolved locally both example.com and example.org servers should have both example.org and example.com zones. Now example.com server should have following entry in its 'named.conf' file:
zone "example.org." { type forward; forwarders { <IP>; }; };
where <IP> should be IP address of example.org DNS server which would resolve all example.org requests.
Primary and secondary DNS servers
Primary server zone configuration
Multiple DNS servers are most commonly created for backup so that if primary server is down secondary server can resolve all queries. To configure a primary server zone use:
zone "sbarjatiya.com." { type master; file "sbarjatiya.com.forward"; allow-transfer {192.168.2.114; 127.0.0.1; }; also-notify {192.168.2.114; }; allow-update {}; };
and replace 192.168.2.114 with actual secondary server IP. Multiple secondary servers can also be specified.
Secondary server zone configuration
To configure a secondary server zone use:
zone "sbarjatiya.com." { type slave; file "sbarjatiya.com.forward"; masters {192.168.2.106; }; allow-notify {192.168.2.106; }; allow-transfer {127.0.0.1; }; };
and replace 192.168.2.106 with actual primary server IP. Multiple primary servers can also be specified.
Editing zone records
To edit zone records use following steps:
- Log into primary server
- Edit zone file
- Use commands:
- rndc freeze sbarjatiya.com
- rndc reload sbarjatiya.com
- rndc thaw sbarjatiya.com
- Verify new serial number is reflected in primary server
- dig -t AXFR sbarjatiya.com @127.0.0.1
- Verify new serial number is reflected in secondary server using same dig command.
<yambe:breadcrumb>Bind_DNS_server_configuration|Bind DNS</yambe:breadcrumb>