Go4Expert

Go4Expert (http://www.go4expert.com/)
-   Java (http://www.go4expert.com/forums/java/)
-   -   DNS Resolution path (http://www.go4expert.com/forums/dns-resolution-path-t23785/)

nim.izadi 7Nov2010 01:01

DNS Resolution path
 
Hello,

I'm having some issue using DNS. I have to make a program which resolves DNS paths.
In some way it would be like creating a GUI for the UNIX command "dig +trace url".

I made lot of research on internet and I only found the dnsjava library which gives me some information (see below) but I am not able to determine which root-server I am going through.

Information I can retrieve:
Quote:

;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 32345
;; flags: qr rd ra ; qd: 1 an: 2 au: 4 ad: 4
;; QUESTIONS:
;; Google., type = A, class = IN

;; ANSWERS:
Google. 133794 IN CNAME Google.
Google. 115 IN A 72.14.254.104

;; AUTHORITY RECORDS:
google.com. 207182 IN NS ns3.google.com.
google.com. 207182 IN NS ns4.google.com.
google.com. 207182 IN NS ns1.google.com.
google.com. 207182 IN NS ns2.google.com.

;; ADDITIONAL RECORDS:
ns1.google.com. 50123 IN A 216.239.32.10
ns2.google.com. 49577 IN A 216.239.34.10
ns3.google.com. 52979 IN A 216.239.36.10
ns4.google.com. 49928 IN A 216.239.38.10
Information the command dig give me:
Quote:

MBP-Nima:~ Nima$ dig +trace Google

; <<>> DiG 9.6.0-APPLE-P2 <<>> +trace Google
;; global options: +cmd
. 433874 IN NS j.root-servers.net.
. 433874 IN NS k.root-servers.net.
. 433874 IN NS l.root-servers.net.
. 433874 IN NS m.root-servers.net.
. 433874 IN NS a.root-servers.net.
. 433874 IN NS b.root-servers.net.
. 433874 IN NS c.root-servers.net.
. 433874 IN NS d.root-servers.net.
. 433874 IN NS e.root-servers.net.
. 433874 IN NS f.root-servers.net.
. 433874 IN NS g.root-servers.net.
. 433874 IN NS h.root-servers.net.
. 433874 IN NS i.root-servers.net.
;; Received 512 bytes from 203.159.0.1#53(203.159.0.1) in 1 ms

com. 172800 IN NS e.gtld-servers.net.
com. 172800 IN NS c.gtld-servers.net.
com. 172800 IN NS g.gtld-servers.net.
com. 172800 IN NS i.gtld-servers.net.
com. 172800 IN NS h.gtld-servers.net.
com. 172800 IN NS a.gtld-servers.net.
com. 172800 IN NS b.gtld-servers.net.
com. 172800 IN NS l.gtld-servers.net.
com. 172800 IN NS m.gtld-servers.net.
com. 172800 IN NS f.gtld-servers.net.
com. 172800 IN NS k.gtld-servers.net.
com. 172800 IN NS d.gtld-servers.net.
com. 172800 IN NS j.gtld-servers.net.
;; Received 504 bytes from 192.33.4.12#53(c.root-servers.net) in 211 ms

google.com. 172800 IN NS ns2.google.com.
google.com. 172800 IN NS ns1.google.com.
google.com. 172800 IN NS ns3.google.com.
google.com. 172800 IN NS ns4.google.com.
;; Received 168 bytes from 192.26.92.30#53(c.gtld-servers.net) in 293 ms

Google. 604800 IN CNAME Google.
Google. 300 IN A 209.85.132.104
;; Received 68 bytes from 216.239.34.10#53(ns2.google.com) in 207 ms
If you have any idea I will really appreciate your help.


All times are GMT +5.5. The time now is 19:58.