DNS example?
Ethernet Chips
No replies yet. Be the first to reply.
Join the discussion.
Ethernet Chips
No replies yet. Be the first to reply.
Join the discussion.
Share projects and connect with makers.
Joined before the site update? first.
New to WIZnet Makers?
We sent a verification link to your address. Open it to activate your account, then log in.
Accounts from this email provider are reviewed by an administrator after verification. Approval usually takes one business day.
Already have an account?
Enter your email address. If it belongs to an account, we'll send a link to set a new password. Members who joined before the site update use this to set their password.
If an account uses that address, we sent a link to set a new password. The link works once and expires in 30 minutes.
Know your password?
Need an account?
RE: DNS example?
by Coccoliso ·
Hi,
into ioLibrary_BSD library here [url]https://github.com/Wiznet/ioLibrary_Driver[/url]
References [url]http://wizwiki.net/wiki/doku.php?id=products:w5500:driver[/url]
folder ioLibrary_Driver / Internet / DNS
RE: DNS example?
by Wizneter ·
Hi Coccoliso
Thank you, and thank you again for your help in the last thread. I have now got DNS up and running. I am noticing however that there seems to be some bugs in it. Perhaps I’ve done something wrong. Here are some website’s I’ve tried.
“www.google.com” // Works and gets correct values - is default example
“www.xe.com” // Crashes my whole program, cause unknown.
“www.news.com.au” // Fails, only get “0,0,0,0” in my IP address
“www.bbc.com” // Works and gets correct value
“www.facebook.com” // Works and gets correct value
“www.facebook.com.au” // Works and gets correct value
“www.di.fm” // Works and gets correct value
“www.honda-engines-eu.com” // Fails, only get “0,0,0,0” in my IP address
All sites work with command prompt. The PC used to with command prompt is on the same network. Results are repeatable. I’m afraid that about half of the sites I need to do a DNS on don’t work.
I have tried increasing “DNS_WAIT_TIME” and “MAX_DNS_RETRY”, but this had no effect.
Thanks again
Wizneter
RE: DNS example?
by Coccoliso ·
Hi,
clearly it depends greatly on the geographic area.
Did you try tracert to view jumps that are made in the case of those not working address?
I noticed, for example, www.xe.com loops are fast but like I said it depends on your location.
Would seem that more the node is quick to respond and greater is the probability of not resolve the address.
Some time ago I remember a problem on the DNS in case of multiple addresses endpoint (for example google in my area responds on three possible addresses based on traffic node).
Unfortunately I can not help more because I cannot do test in this regard.
RE: DNS example?
by Wizneter ·
Hi Coccoliso
Thank you again. I did not try that and can do. To be candid I simply tested the code and found it to be buggy, so after repeatedly checking I posted and moved onto another aspect of my project.
Though I did notice the multiple address aspect you mention with google.com. This did not seem to cause an issue and some sites, with a single fixed IP address didn’t work. I did not think of the timing aspect.
Am I correct in understanding that its not possible for you to test? If it is then I’m sure you can find an address that doesn’t work for you but does with command promt. I found about 50% of sites don’t work correctly.
If so, what should be my next step to sort this? I’m already in contact with Wiznet, but for technical matters they suggest I use these forums.
Thanks again
Wizneter
RE: DNS example?
by Wizneter ·
Hi Coccoliso
I’ve done some debugging on the Wiznet Stack and discovered the main issue. The function “dns_answer” in parseDNSMSG is not correctly handing parsing the IP address in all situations. On a separate issue, I think the function “parseDNSMSG” is causing the crashing to to a pointer issue. I believe this may be caused by the fact that the returned web address is longer than the web address requested. It may though be related to the fact that there’s a porting issue between 8 and the 32 bit processor I’m using. I’ve not dug too deep.
I’ve wrote some new functions that appear to fix all the bugs and issues, using Wireshark as my guide. They have only been tested with a “Type A” response, though that is of course the only one I am requesting. All the website I now try work correctly. Can you think of any reason the below function won’t work correctly in all situations? (Please note I’ve added the “len” parameter on “parseDNSMSG”)
ret = parseDNSMSG(&dhp, pDNSMSG, ip_from_dns, len);
int8_t parseDNSMSG(struct dhdr * pdhdr, uint8_t * pbuf, uint8_t * ip_from_dns, uint8_t len)
{
}
Kind regards
Wizneter
RE: DNS example?
by Wizneter ·
Hi
Just bumping this. I might have uncovered some important bugs in the DNS. I hope these can be either confirmed, or not. If they are real issues, I hope they can be fixed for everyone.
Kind regards
Wizneter