Dear,
I tried to add a second and third DNS server address, but it seems not to work.
As understood in this thread, I can not use LWDNS, so I used DNS instead of LWDNS
(I use MQX3.8.1 on a K70 device)
// User_config.h :
// #define RTCSCFG_ENABLE_LWDNS 0
// #define RTCSCFG_ENABLE_DNS 1
// #define RTCSCFG_ENABLE_LOOPBACK 1
_ip_address DNS_server_ipaddr;
| DNS_server_ipaddr = inet_addr("8.8.8.8"); | | | | | | | | | | // Open dns server1 |
if (ipcfg_add_dns_ip(ENET_DEVICE,DNS_server_ipaddr) == TRUE) {printf("DNS added ok");}
| DNS_server_ipaddr = inet_addr("208.67.222.222"); | | | | | | | | | | // Open dns server1 |
if (ipcfg_add_dns_ip(ENET_DEVICE,DNS_server_ipaddr) == TRUE) {printf("DNS added ok");}
| DNS_server_ipaddr = inet_addr("208.67.220.220"); | | | | | | | | | | // Open dns server2 |
if (ipcfg_add_dns_ip(ENET_DEVICE,DNS_server_ipaddr) == TRUE) {printf("DNS added ok");}
| printf("DNS0 | : %d.%d.%d.%d",IPBYTES(ipcfg_get_dns_ip(ENET_DEVICE,0))); |
| printf("DNS1 | : %d.%d.%d.%d",IPBYTES(ipcfg_get_dns_ip(ENET_DEVICE,1))); |
| printf("DNS2 | : %d.%d.%d.%d",IPBYTES(ipcfg_get_dns_ip(ENET_DEVICE,2))); |
The result is that it seems to add the three dns servers => 3x DNS added ok
But when I print them out, I only have the last DNS IP at the first location. (so it seems the overwrite each other ???)
DNS0 : 208.67.220.200
DNS1 : 0.0.0.0
DNS2 : 0.0.0.0
Any idea's?
Thanks in advance.
Regards,
Michris