MVP 2023 Joe Tauser Posted May 27, 2014 MVP 2023 Report Share Posted May 27, 2014 We recently did a tank status project where the customer wanted to type in the name of his mail server for the email block. Working through the DNS Resolver function block revealed a couple of errors in the Help (this is very rare - I'm guessing not too many people have used this block). Unitronics has been notified of the Help errors and they will be corrected in the next release. In the meantime, the biggest problem is the protocol must be UDP_RAW, not UDP. The other issue is the Help shows sequential addresses in the IP configuration blocks, which anyone who's worked with these blocks knows they must be separated by at least four addresses to leave room for the whole IP address. I have attached an example program for anyone who wants to look at it. Joe T. DNS Resolver Test.vlp Link to comment Share on other sites More sharing options...
linxchas Posted May 29, 2014 Report Share Posted May 29, 2014 Joe, have not find anything wrong in your test, I have similar code and it works without any problems. Only 2 advises: 1. try to avoid binding UDP sockets to ports 20000-20255 2. initiate socket every time prior to calling DNS server and bind it to different port. By using same source port you may hit "Unidirectional Link Detection" implemented in the most of switches Link to comment Share on other sites More sharing options...
TT_ZX Posted May 30, 2014 Report Share Posted May 30, 2014 Thanks for the info. I've tried to use this in past (long time ago) and couldn't get it to work. I think I just used a static IP in the end. Link to comment Share on other sites More sharing options...
selfbuilding Posted September 10, 2014 Report Share Posted September 10, 2014 Hello everyone !! Usually read everything that appears in the forum and this afternoon was over 3 hours trying to use the "dns resolver function" and could not reply from the DNS server. The solution was this forum topic. It was enough to make the change of protocol "udp" to "udp raw" and it worked perfectly. Many thanks Joe Tauser. Now I will try the solution from "linxchas", because I used one of the specified ports. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now