On 04-Nov-04 Paul Ryan wrote:
On Thu, 2004-11-04 at 16:54, Ted.Harding@nessie.mcc.ac.uk wrote:
On 04-Nov-04 Paul Ryan wrote:
On Thu, 2004-11-04 at 15:17, James Knott wrote:
Paul Ryan wrote:
How can I determing the IP address of a server, when I use ping and then the ftp:// address I get the response unknown host.
I'm just trying to get the IP for a ftp install. When I use the browser or Gftp I conect with no problem but I can't determin the IP for a ftp install.
You can try (you may need to do this as root):
dig -a the.host.name
If it can be found, then this will tell you the IP address, as in:
# dig -a dns1.btinternet.com
; <<>> DiG 2.2 <<>> -a dns1.btinternet.com ;; res options: init recurs defnam dnsrch ;; got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 6 ;; flags: qr rd ra; Ques: 1, Ans: 1, Auth: 4, Addit: 4 ;; QUESTIONS: ;; dns1.btinternet.com, type = A, class = IN
;; ANSWERS: dns1.btinternet.com. 35182 A 194.73.73.172
If this too fails, then you should look to your /etc/resolv.conf file, which should include the IP address of at least one reachable DNS server, on the lines of
nameserver 194.73.73.94
as well as a suitable "search" line.
Hoping this helps, Ted.
dig is interesting and confusing at the same time check this out I'm not sure if Suse redirects or what. I cann't see how two sites could have the same IP address. Sorry that I didn't cut some of this but I wasn't sure as to what is important.
************ I'll break into the message here because it's the most logical place. The first clue is "ANSWER: 0" in each case. This means that 'dig' got no answers, i.e. DNS couldn't resolve your query. The second clue is that the "same IP address" for the "two sites" is given as "SERVER: 217.237.151.161#53(217.237.151.161)". This means that 217.237.151.161 is the IP address of the DNS server which 'dig' went to (and which couldn't return an answer to your query). The *BIG* clue, however, is the fact that you asked it to resolve the "host" ftp://ftp.gwdg.de/pub/linux/suse/. This isn't a host: it's a net protocol (ftp://) glued to a machine name "ftp.gwdg.de" glued to a directory (/pub/linux/suse). In fact it's a complete URL, which is a composite object (as described), and will not be recognised as a machine name by the DNS server. What you need to do is dig ftp.gwdg.de and you should get it. Clearly all is in order with your DNS setup, since you are getting a DNS server IP address returned. [See also at end regarding "-a"]
papa@linux:~> dig ftp://ftp.gwdg.de/pub/linux/suse/
; <<>> DiG 9.2.3 <<>> ftp://ftp.gwdg.de/pub/linux/suse/ ;; global options: printcmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 36365 ;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0
;; QUESTION SECTION: ;ftp://ftp.gwdg.de/pub/linux/suse/. IN A
;; AUTHORITY SECTION: . 3600 IN SOA a.root-servers.net. nstld.verisign-grs.com. 2004110400 1800 900 604800 86400
;; Query time: 84 msec ;; SERVER: 217.237.151.161#53(217.237.151.161) ;; WHEN: Thu Nov 4 20:48:26 2004 ;; MSG SIZE rcvd: 126
papa@linux:~> dig ftp://ftp.rz.uni-ulm.de/pub/mirrors/suse
; <<>> DiG 9.2.3 <<>> ftp://ftp.rz.uni-ulm.de/pub/mirrors/suse ;; global options: printcmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 16003 ;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0
;; QUESTION SECTION: ;ftp://ftp.rz.uni-ulm.de/pub/mirrors/suse. IN A
;; AUTHORITY SECTION: . 3600 IN SOA A.ROOT-SERVERS.NET. NSTLD.VERISIGN-GRS.COM. 2004110400 1800 900 604800 86400
;; Query time: 155 msec ;; SERVER: 217.237.151.161#53(217.237.151.161) ;; WHEN: Thu Nov 4 20:48:38 2004 ;; MSG SIZE rcvd: 133
papa@linux:~>
I get the same results as root and with -a I get Invalid option: -a
interesting
It seems that 'dig' has changed recently. "-a" used to be accepted. 'dig' on its own should work fine anyway.
Thanks for all of the answers
Best wishes,
Ted.
--------------------------------------------------------------------
E-Mail: (Ted Harding)