Hi,
I am running the following example from the SDK for Thread v4.1.0: IOT/DNS and followed the SDK instructions to setup the BLE devices as well as an Ubuntu VM acting as the router.
The BLE device returns an error (<info> app: DNS Response for hostname: www.google.com, with 0 IPv6 addresses and status 0x0000C440).$
Ubuntu runs on Oracle VM VirtualBox, with the network adapter attached as "Bridged" in order to effectively create a network interface
Please see the full log of the BLE device here (with log enabled):
<debug> dns6: >> dns6_query
<debug> dns6: << dns6_query
<debug> dns6: >> dns6_timeout_process
<debug> dns6: << dns6_timeout_process
<info> app: Got ICMP6 Application Handler Event on interface 0x0x20004EC8
<info> app: Source IPv6 Address:
FE80:0000:0000:0000:105B:ADFF:FE45:3B92
<info> app: Destination IPv6 Address:
2001:0DB8:0000:0000:0066:95FF:FEB5:E987
<info> app: Process result = 0x00000000
<info> app: Application in resolving state.
<info> app: Start button has been pushed.
<info> app: Got ICMP6 Application Handler Event on interface 0x0x20004EC8
<info> app: Source IPv6 Address:
2001:0DB8:0000:0000:0000:0000:0000:0001
<info> app: Destination IPv6 Address:
2001:0DB8:0000:0000:0066:95FF:FEB5:E987
<info> app: Process result = 0x00000000
<debug> dns6: >> dns6_timeout_process
<error> dns6: DNS server did not response on query for hostname www.google.com.
<info> app: DNS Response for hostname: www.google.com, with 0 IPv6 addresses and status 0x0000C440
<debug> dns6: << dns6_timeout_process
<info> app: Application in querying state.
The DNS server used is unchanged from the example code.
The ping's seem to work fine:
On Ubuntu, I can ping the DNS target from the command line:
ping6 www.google.com
PING www.google.com(zrh04s16-in-x04.1e100.net (2a00:1450:400a:808::2004)) 56 data bytes
64 bytes from zrh04s16-in-x04.1e100.net (2a00:1450:400a:808::2004): icmp_seq=1 ttl=57 time=10.2 ms
64 bytes from zrh04s16-in-x04.1e100.net (2a00:1450:400a:808::2004): icmp_seq=2 ttl=57 time=9.77 ms
64 bytes from zrh04s16-in-x04.1e100.net (2a00:1450:400a:808::2004): icmp_seq=3 ttl=57 time=8.97 ms
I can ping the BLE device with its local-link address:
ping6 -I bt0 fe80::66:95ff:feb5:e987
ping6: Warning: source address might be selected on device other than: bt0
PING fe80::66:95ff:feb5:e987(fe80::66:95ff:feb5:e987) from :: bt0: 56 data bytes
64 bytes from fe80::66:95ff:feb5:e987%bt0: icmp_seq=1 ttl=64 time=99.7 ms
64 bytes from fe80::66:95ff:feb5:e987%bt0: icmp_seq=2 ttl=64 time=134 ms
64 bytes from fe80::66:95ff:feb5:e987%bt0: icmp_seq=3 ttl=64 time=124 ms
I can ping the BLE device with its global address:
ping6 -I bt0 2001:db8::66:95ff:feb5:e987
PING 2001:db8::66:95ff:feb5:e987(2001:db8::66:95ff:feb5:e987) from 2001:db8::1 bt0: 56 data bytes
64 bytes from 2001:db8::66:95ff:feb5:e987: icmp_seq=1 ttl=64 time=164 ms
64 bytes from 2001:db8::66:95ff:feb5:e987: icmp_seq=2 ttl=64 time=139 ms
64 bytes from 2001:db8::66:95ff:feb5:e987: icmp_seq=3 ttl=64 time=173 ms
But it is unclear to me what is the expected behavior if I use the 2001:db8 prefix reserved for documentation and test ? Should the example work?
A then what is the exact procedure to use real case prefix, and how to get them ? If you could provide a specific example, that would help a lot.
I have tried other prefixes, or to extract the prefix from the IPv6 address of the ethernet interface (starts with 2a02:xxxx...) but no differences.
Many thanks for your help and suggestions.
Best regards,
H