dns resolve for ipv4 domain name

433 views
Skip to first unread message

li jiang

unread,
Nov 20, 2018, 1:44:05 PM11/20/18
to openthread-users


hello
i try to use dns resolve domain name. For ipv6 domain name, i can resolve it, but i can't ping directly the resolved ipv6 address. For ipv4 domain name, even i can't resolve it.
For my configuration, i followed the steps in openthread border router for configuration NAT64 steps(https://openthread.io/guides/border-router/access-point#configure-dnsmasq). i use beaglebone black. After this configuration of NAT64, i can ping external ipv4 and ipv6 address from MTD device. i also can resolve ipv6 domain name from MTD device. but i can't resolve ipv4 domain name.
After i investigated some documents, it seems like i need to configure DNS64. so i install bin9, and set the named.conf.options file under /etc/bind folder.
options {
        directory "/var/cache/bind";

        // If there is a firewall between you and nameservers you want
        // to talk to, you may need to fix the firewall to allow multiple
        // ports to talk.  See http://www.kb.cert.org/vuls/id/800113

        // If your ISP provided one or more IP addresses for stable
        // nameservers, you probably want to use them as forwarders.
        // Uncomment the following block, and insert the addresses replacing
        // the all-0's placeholder.

        // forwarders {
        //      0.0.0.0;
        // };

        //======================================================================
==
        // If BIND logs error messages about the root key being expired,
        // you will need to update your keys.  See https://www.isc.org/bind-keys
        //======================================================================
==
        dnssec-validation auto;

        auth-nxdomain no;    # conform to RFC1035
        listen-on-v6 { any; };
         allow-query { any; };
        dns64 2001:db8:1:ffff::/96 {
                clients { any; };
        };

};
However, it still doesn't work after i configure DNS64. i still can't resolve ipv4 domain name. it always show Error 23 notfound or Error28 timeout. Did someone meet same case? i want to send data to server which is the ipv4-only domain name. so i need resolve ipv4 domain name. Thank a lot.
The interface is as followings.

Screenshot from 2018-11-20 13-29-54.png





Jonathan Hui

unread,
Nov 20, 2018, 3:49:43 PM11/20/18
to li jiang, openthre...@googlegroups.com
The "NotFound" error indicates that the DNS client could not find an appropriate AAAA record in the response.

Can you use tcpdump and capture packets both on the WAN interface (e.g. en0) and Thread interface (e.g. wpan0) and provide the pcap files?

Thanks.

--
Jonathan Hui

--
You received this message because you are subscribed to the Google Groups "openthread-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openthread-use...@googlegroups.com.
To post to this group, send email to openthre...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openthread-users/18442252-0f0b-47f8-95cd-88f8ac233b87%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

li jiang

unread,
Nov 21, 2018, 10:29:26 AM11/21/18
to openthread-users
Hello Jonathan
i do tcpdump and capture packets in WAN interface(eth0) and thread interface(wpan0).
i still have three boards,one MTD, one FTD and one NCP with beagle bone black platform. when i reset three borders, MTD become child,FTD become leader and ncp become the router. i can ping external ipv4 and ipv6 address from MTD and FTD.
When i do "dns resolve", i monitor the eth0 and wpan0 interface.  i can resolve ipv6 domain name, but i still can't resolve ipv4 domain name. The command and the pcap file are as followings. Thank a lot.
The command which i send is as followings from MTD:
> ipaddr                                                                                                   
2001:dead:beef:cafe:3048:818d:b025:ac9e                                                                    
fd11:22:0:0:d5e2:a143:e361:776d                                                                            
fdde:ba7a:b1e5:0:0:ff:fe00:4401                                                                            
fdde:ba7a:b1e5:0:10df:d689:fc42:bab0                                                                       
fdde:ad00:beef:0:0:0:0:10                                                                                  
fe80:0:0:0:3cde:1b02:377b:5a9c                                                                             
Done                                                                                                       
> ping 2001:db8:1:ffff::0808:0808                                                                          
> 16 bytes from 2001:db8:1:ffff:0:0:808:808: icmp_seq=1 hlim=35 time=805ms                                 
ping 2001:db8:1:ffff::c0a8:165                                                                             
> 16 bytes from 2001:db8:1:ffff:0:0:c0a8:165: icmp_seq=2 hlim=61 time=487ms                                
dns resolve ipv6.google.com 2001:db8:1:ffff::0808:0808                                                     
> DNS response for ipv6.google.com - [2607:f8b0:4020:807:0:0:0:200e] TTL: 299                              
dns resolve ipv4.google.com 2001:db8:1:ffff::0808:0808                                                     
> DNS response for ipv4.google.com - Error 23: NotFound                                                    
dns resolve ipv6.google.com 2001:db8:1:ffff::0808:0808                                                     
> DNS response for ipv6.google.com - [2607:f8b0:4020:807:0:0:0:200e] TTL: 299                              
dns resolve ipv4.google.com 2001:db8:1:ffff::0808:0808                                                     
> DNS response for ipv4.google.com - Error 23: NotFound                                                    
dns resolve ipv6.google.com 2001:db8:1:ffff::0808:0808                                                     
> DNS response for ipv6.google.com - Error 28: ResponseTimeout             
ipaddr                                                                                                     
2001:dead:beef:cafe:3048:818d:b025:ac9e                                                                    
fd11:22:0:0:d5e2:a143:e361:776d                                                                            
fdde:ba7a:b1e5:0:0:ff:fe00:4401                                                                            
fdde:ba7a:b1e5:0:10df:d689:fc42:bab0                                                                       
fdde:ad00:beef:0:0:0:0:10                                                                                  
fe80:0:0:0:3cde:1b02:377b:5a9c                                                                             
Done                                                                                                       
> dns resolve ipv6.google.com 2001:db8:1:ffff::0808:0808                                                   
> DNS response for ipv6.google.com - [2607:f8b0:4020:807:0:0:0:200e] TTL: 299                              
dns resolve ipv4.google.com 2001:db8:1:ffff::0808:0808                                                     
> DNS response for ipv4.google.com - Error 23: NotFound   


The eth0.pcap file from eth0 interface is as followings:
reading from file eth0.pcap, link-type EN10MB (Ethernet)                                         
2018-11-21 15:02:23.219043 IP 192.168.1.101.49152 > 8.8.8.8.53: 0+ AAAA? ipv6.google.com. (33)   
2018-11-21 15:02:23.246790 ARP, Request who-has 192.168.1.101 tell 192.168.1.1, length 46        
2018-11-21 15:02:23.246853 ARP, Reply 192.168.1.101 is-at 1c:ba:8c:ec:93:18, length 28           
2018-11-21 15:02:23.246940 IP 8.8.8.8.53 > 192.168.1.101.49152: 0 2/0/0 CNAME ipv6.l.google.com.,)
2018-11-21 15:02:28.391946 ARP, Request who-has 192.168.1.1 tell 192.168.1.101, length 28        
2018-11-21 15:02:28.392095 ARP, Reply 192.168.1.1 is-at 64:66:b3:34:94:98, length 46             
2018-11-21 15:02:29.498908 IP 192.168.1.1.1025 > 239.255.255.250.1900: UDP, length 282           
2018-11-21 15:02:29.510829 IP 192.168.1.1.1025 > 239.255.255.250.1900: UDP, length 300           
2018-11-21 15:02:29.527689 IP 192.168.1.1.1025 > 239.255.255.250.1900: UDP, length 354           
2018-11-21 15:02:29.544389 IP 192.168.1.1.1025 > 239.255.255.250.1900: UDP, length 346           
2018-11-21 15:02:29.561110 IP 192.168.1.1.1025 > 239.255.255.250.1900: UDP, length 276           
2018-11-21 15:02:29.577748 IP 192.168.1.1.1025 > 239.255.255.250.1900: UDP, length 318           
2018-11-21 15:02:29.594335 IP 192.168.1.1.1025 > 239.255.255.250.1900: UDP, length 350           
2018-11-21 15:02:29.611042 IP 192.168.1.1.1025 > 239.255.255.250.1900: UDP, length 296           
2018-11-21 15:02:29.627522 IP 192.168.1.1.1025 > 239.255.255.250.1900: UDP, length 348           
2018-11-21 15:02:29.644369 IP 192.168.1.1.1025 > 239.255.255.250.1900: UDP, length 342           
2018-11-21 15:02:30.051273 IP 10.214.56.52.5353 > 224.0.0.251.5353: 0 PTR (QM)? _scanner._tcp.loc)
2018-11-21 15:02:31.053001 IP 10.214.56.52.5353 > 224.0.0.251.5353: 0 PTR (QM)? _scanner._tcp.loc)
2018-11-21 15:02:46.490651 IP 192.168.1.101.49152 > 8.8.8.8.53: 1+ AAAA? ipv4.google.com. (33)   
2018-11-21 15:02:46.517016 IP 8.8.8.8.53 > 192.168.1.101.49152: 1 1/1/0 CNAME ipv4.l.google.com. )
2018-11-21 15:02:49.499076 IP 192.168.1.1.1025 > 239.255.255.250.1900: UDP, length 282           
2018-11-21 15:02:49.510864 IP 192.168.1.1.1025 > 239.255.255.250.1900: UDP, length 300           
2018-11-21 15:02:49.527877 IP 192.168.1.1.1025 > 239.255.255.250.1900: UDP, length 354           
2018-11-21 15:02:49.544411 IP 192.168.1.1.1025 > 239.255.255.250.1900: UDP, length 346           
2018-11-21 15:02:49.561071 IP 192.168.1.1.1025 > 239.255.255.250.1900: UDP, length 276           
2018-11-21 15:02:49.577545 IP 192.168.1.1.1025 > 239.255.255.250.1900: UDP, length 318           
2018-11-21 15:02:49.594351 IP 192.168.1.1.1025 > 239.255.255.250.1900: UDP, length 350           
2018-11-21 15:02:49.611082 IP 192.168.1.1.1025 > 239.255.255.250.1900: UDP, length 296           
2018-11-21 15:02:49.627563 IP 192.168.1.1.1025 > 239.255.255.250.1900: UDP, length 348           
2018-11-21 15:02:49.644612 IP 192.168.1.1.1025 > 239.255.255.250.1900: UDP, length 342 

The wpan0.pcap file from wpan0 interface is as followings:
reading from file wpan0.pcap, link-type RAW (Raw IP)                                             
2018-11-21 15:04:59.086775 IP6 2001:dead:beef:cafe:3048:818d:b025:ac9e.5683 > 2002:ad6:3835:10::61
2018-11-21 15:04:59.087005 IP6 2001:dead:beef:cafe:d450:cbd:bfc6:ef3f > 2001:dead:beef:cafe:3048:7
2018-11-21 15:05:16.285062 IP6 2001:dead:beef:cafe:3048:818d:b025:ac9e.5683 > 2002:ad6:3835:10::61
2018-11-21 15:05:16.285296 IP6 2001:dead:beef:cafe:d450:cbd:bfc6:ef3f > 2001:dead:beef:cafe:3048:7
2018-11-21 15:05:16.415426 IP6 2001:dead:beef:cafe:3048:818d:b025:ac9e.49152 > 2001:db8:1:ffff::8)
2018-11-21 15:05:16.441554 IP6 2001:db8:1:ffff::808:808.53 > 2001:dead:beef:cafe:3048:818d:b025:a)
2018-11-21 15:05:19.236318 IP6 2001:dead:beef:cafe:3048:818d:b025:ac9e.49152 > 2001:db8:1:ffff::8)
2018-11-21 15:05:19.260250 IP6 2001:db8:1:ffff::808:808.53 > 2001:dead:beef:cafe:3048:818d:b025:a)
2018-11-21 15:05:39.295992 IP6 2001:dead:beef:cafe:3048:818d:b025:ac9e.5683 > 2002:ad6:3835:10::61
2018-11-21 15:05:39.296226 IP6 2001:dead:beef:cafe:d450:cbd:bfc6:ef3f > 2001:dead:beef:cafe:3048:7
2018-11-21 15:05:49.331969 IP6 2001:dead:beef:cafe:3048:818d:b025:ac9e.49152 > 2001:db8:1:ffff::8)
2018-11-21 15:05:49.357151 IP6 2001:db8:1:ffff::808:808.53 > 2001:dead:beef:cafe:3048:818d:b025:a)
2018-11-21 15:06:07.400415 IP6 2001:dead:beef:cafe:3048:818d:b025:ac9e.49152 > 2001:db8:1:ffff::8)
2018-11-21 15:06:07.426479 IP6 2001:db8:1:ffff::808:808.53 > 2001:dead:beef:cafe:3048:818d:b025:a)

Jonathan Hui

unread,
Nov 21, 2018, 5:24:01 PM11/21/18
to li jiang, openthre...@googlegroups.com
Can you attach the pcap files so that I can view them in wireshark?

Thanks.

--
Jonathan Hui

li jiang

unread,
Nov 22, 2018, 1:39:09 PM11/22/18
to openthread-users

Hello Jonathan

The command which i send is as followings from MTD:
ipaddr                                                                         
2001:dead:beef:cafe:5e7b:fc35:5103:4e21                                        
fd11:22:0:0:b52f:c084:38f9:e24b                                                
fdde:ba7a:b1e5:0:0:ff:fe00:e801                                                
fdde:ba7a:b1e5:0:2b08:1b16:73f4:3ef2                                           
fdde:ad00:beef:0:0:0:0:10                                                      
fe80:0:0:0:181f:ed4a:7b7c:1165                                                 
Done                                                                           
> ping 2001:db8:1:ffff::0808:0808                                              
> 16 bytes from 2001:db8:1:ffff:0:0:808:808: icmp_seq=3 hlim=35 time=510ms     
ping 2001:db8:1:ffff::c0a8:165                                                 
> 16 bytes from 2001:db8:1:ffff:0:0:c0a8:165: icmp_seq=4 hlim=61 time=488ms    
dns resolve ipv6.google.com 2001:db8:1:ffff::0808:0808                         
> DNS response for ipv6.google.com - [2607:f8b0:4020:804:0:0:0:200e] TTL: 299  
dns resolve ipv4.google.com 2001:db8:1:ffff::0808:0808                         
> DNS response for ipv4.google.com - Error 23: NotFound                        
dns resolve facebook.com 2001:db8:1:ffff::0808:0808                            
> DNS response for facebook.com - [2a03:2880:f112:83:face:b00c:0:25de] TTL: 9  
The eth0.pcap file from eth0 interface and the wpan0.pcap file from wpan0 are in the attachment.Please help me to check it in wireshark. Thanks.

eth0.pcap
wpan0.pcap

Jonathan Hui

unread,
Nov 22, 2018, 4:19:03 PM11/22/18
to li jiang, openthre...@googlegroups.com
Thanks for providing the pcaps, that was helpful.

The Google Public DNS (8.8.8.8) does not provide a AAAA record for ipv4.google.com. At the same time, because the DNS query is destined for 8.8.8.8, a recursive resolver at the Thread Border Router is bypassed.

You have a couple options:
  1. If you have public IPv6 connectivity, send DNS queries to the Google Public DN64 server at 2001:4860:4860::6464.
  2. If you do not have public IPv6 connectivity, send DNS queries to the Thread Border Router to allow the Thread Border Router to perform a recursive query.
Hope that helps.

--
Jonathan Hui

li jiang

unread,
Nov 23, 2018, 11:54:51 AM11/23/18
to openthread-users
Hello Jonathan,
under your indication, i solved the dns resolve problem by second option which you give me. Thanks a lot.

Jonathan Hui

unread,
Nov 23, 2018, 4:05:22 PM11/23/18
to li jiang, openthre...@googlegroups.com
Great to hear your issue is resolved. Thanks.

--
Jonathan Hui


Reply all
Reply to author
Forward
0 new messages