I have domain hostdomain.com which I use as NS on my server1. Also I have second server2 and I want to use hostdomain.com as it's NS too. OS of both servers is CentOS. I have 2 IPv4 on server1 and 1 IPv4 and 1 IPv6 on server2. NS records of hostdomain.com at the registrar are:

ns1.hostdomain.com IPv4-of-server1-here
ns2.hostdomain.com IPv4-of-server1-here
ns3.hostdomain.com IPv4-of-server2-here
ns4.hostdomain.com IPv6-of-server2-here

Domain is delegated.

The problem is ping ns3.hostdomain.com and ping ns4.hostdomain.com says Ping request could not find host ns3.hostdomain.com. Please check the name and try again. In the meantime ping ns1.hostdomain.com works fine. I guess that I need to setup DNS at my server2 somehow, because DNS of hostdomain.com on the server1 is setted up.

Currently hostdomain.com zone record on server2 is

$TTL 14400
@   IN  SOA ns3.hostdomain.com. ns4.hostdomain.com. (
                            180 )

@   14400   IN  NS  ns3.hostdomain.com.
@   14400   IN  NS  ns4.hostdomain.com.
@   14400   IN  A   IPv4-of-server2-here
mail    14400   IN  A   IPv4-of-server2-here
ns3 14400   IN  A   IPv4-of-server2-here
ns4 14400   IN  AAAA    IPv6-of-server2-here
www 14400   IN  A   IPv4-of-server2-here
pop 14400   IN  A   IPv4-of-server2-here
ftp 14400   IN  A   IPv4-of-server2-here
@   14400   IN  MX  10  mail.hostdomain.com
@   14400   IN  TXT "v=spf1 a mx ip4:IPv4-of-server2-here ?all"
_dmarc  14400   IN  TXT "v=DMARC1; p=none"
_domainkey  14400   IN  TXT "t=y; o=~;"

The zone type in named.conf on server2 is master.

What is the right way to set it up? Can there be any problems because of mixing IPv4 and IPv6? Maybe there is some better solution for this task (for example if I will want to have 3,4,5 servers with the same domain as NS)?

  • Do not use ping to troubleshoot DNS problems, this is the wrong tool. dig is the appropriate tool to debug DNS problems. – Patrick Mevzek Jul 29 at 0:13

Name your servers ns1 and ns2 and make A and AAAA records accordingly; the same hostname can have both A for IPv4 connectivity and AAAA for IPv6 connectivity.

$ORIGIN example.com.
@    IN   SOA   ns1.example.com. hostmaster.example.com. 2020050600 7200 3600 1209600 3600
@    IN   NS    ns1.example.com.
@    IN   NS    ns2.example.com.

ns1  IN   A
ns1  IN   AAAA  2001:0db8::c0f:fee
ns2  IN   A
ns2  IN   AAAA  2001:0db8::abba:acdc
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.