0

I am testing bind9 dns server for AAAA records. I would like to disable IPv4 to stop dns requests going to my default ipv4 dns server.

In the resolv.conf i have added

domain mydomain.com
nameserver xxxx:xxxx:xxxx:xxxx:xxxx::xxxx
search mydomain.com

When I try to call getaddrinfo("mydomain.com",NULL,&hints,&res); to resolve the domain name to IPv6 address , I see error message "No Route to Host".

The same program can resolve to IPv6 address when i run on the Ubuntu PC.

I have tried to test

nslookup mydomain.com
server:    10.1.xx.xx
address 1: 10.1.xx.xx    dnsserver.com
nslookup: can't resolve 'mydomain.com'

The nslookup command works correctly on Linux PC.

The linux kernel is enabled with IPv6 and has local link address wth fe80::xxxx in the eth0 and lo ::1 and able to ping6 address. The issue is see is mainly about name resolution of my domain name listed in the bind9 server.

Is there any thing additional I need to do in the /etc/network. or else where?

1 Answers1

0

it's a bit unclear what you are trying to do but let me see.

If you want to test the dns resolution of AAAA records you do not need to disable ipv4, you can just query the dns server for the AAAA record:

dig -t AAAA yourdomain.com

if the server has the record it will return it successfully with ipv4 as well.

If you want to test the dns client with ipv6 on a dual stack host, then you can use

dig -6 -t AAAA yourdomain.com

and if your host and the dns server both can communicate using ipv6, then you should see the right result as well.

natxo asenjo
  • 5,641
  • 2
  • 25
  • 27
  • Thanks for the reply. Actually my issue is I have IPv4 dns server on my ARM target , ipv6 dns request is going to IPv4 DNS server. To overcome this problem I have created a new bind9 ipv6 server on Ubuntu Linux Host. I have deleted in ipv4 dns server from resolv.conf in the arm linux target . But that doesnt solve the problem. We I called getaddrinfo() I have "No Route to Host". the dhcp often rewrites the resolv.conf file back to the original settings. – VamsiKrishna Neelam Feb 17 '20 at 02:32
  • maybe you should modify the dhcp server settings to point ipv6 clients to the ipv6 dns server. Another option is to dual stack the first dns server. – natxo asenjo Feb 17 '20 at 06:23