I'm a CS student working on a Java DNS resolver client assignment. My DNS resolver must accept as input a DNS root server IP and a domain name. Then the program must query the DNS root server given by the user, and iteratively query any intermediate servers (which I understand will be found in "the Authority and Additional Information sections" of the reply) until I have come across the IP of the domain entered by the user. I understand that the information I am looking for is found in the RR but I am stuck on querying a specific DNS root server as well as how to get the RR in order to proceed from there. I have looked around but have not had much luck with finding any guidance to do this in Java using the standard libraries I cannot use any DNS library (DNSQuery, SimpleResolver, etc). I am hoping someone can point me in the right direction.
This is an example of what I have to do :
>java dns_resolver 202.12.27.33 cs.poly.edu
DNS server to query: 202.12.27.33
Reply received. Content overview:
0 Answers
6 Intermediate Name Servers
7 Additional Information Records
Answers section:
Authoritative Section:
Name: edu Name Server: l.edu-servers.net
Name: edu Name Server: a.edu-servers.net
Name: edu Name Server: f.edu-servers.net
Name: edu Name Server: c.edu-servers.net
Additional Information Section:
. . .
until I reach 1 in the Answer section containing the IP of the domain entered by the user.
Thanks
Aucun commentaire:
Enregistrer un commentaire