Discussion on:
CommandLine IP to hostname

15
Comments

Join the conversation!

Follow via:
RSS
Email Alert
Just In
CommandLine IP to hostname
pete_may@... 7th Apr 2002
The question was auto-closed by TechRepublic

Tags: windows

0 Votes
+ -
For a batch file I am writing I need a command Line utility which converts an IP address into a hostname. Superscan does this for me but with a GUI. I've tried NBSTAT but this relies on NetBios and I've also tried hostname from sysinternals but thisalso fails.
Thanks
Peter
0 Votes
+ -
This is a rough approach, but:

PING

will also try to resolve the address into the DNS name. The specific format will be something like:

PING ()

so perhaps your script can try yo parse out the name?

Like I said, rough...
0 Votes
+ -
Sorry should have mentioned that it's for an internal network with no DNS or netbios, just the computer browser service. If superscan can perform this lookup I figure a commandLine utility can.
Peter
0 Votes
+ -
Sorry to those people suggesting DNS based answers but it's for an internal network with no DNS server or netbios only computer browser. I don't know what method superscan uses for it's lookup function but I need that in a command line.
Thanks Peter
ping -a IP address

Mike
0 Votes
+ -
Poster rated this answer
0 Votes
+ -
Poster rated this answer
ping -a IP address

Mike
0 Votes
+ -
Poster rated this answer
0 Votes
+ -
Poster rated this answer
0 Votes
+ -
Try "nslookup "

If there is a dns server you want to specify use "nslookup "

In either case you'll have to extract the name from the response.
The question was auto-closed by TechRepublic
Look at these links:

"...converts the IP address to hostname..."

http://www.pix.net/staff/djm/sw/fastresolve/man/convert-ip-db.html

"convert IP address to hostname"

http://www.webattack.com/get/bbdns.shtml

http://www.sysinternals.com/ntw2k/source/misc.shtml

http://www.cs.rutgers.edu/~watrous/dns.html

(REMOVE SPACES from pasted URLs.)

Good luck,

Maxwell
The question was auto-closed by TechRepublic
This question was auto closed due to inactivity
Keyboard Shortcuts:
Prev
Next
Toggle
Join the conversation
Formatting +
BB Codes - Note: HTML is not supported in forums
  • [b] Bold [/b]
  • [i] Italic [/i]
  • [u] Underline [/u]
  • [s] Strikethrough [/s]
  • [q] "Quote" [/q]
  • [ol][*] 1. Ordered List [/ol]
  • [ul][*] · Unordered List [/ul]
  • [pre] Preformat [/pre]
  • [quote] "Blockquote" [/quote]

Join the TechRepublic Community and join the conversation! Signing-up is free and quick, Do it now, we want to hear your opinion.