|
||||||||
|
|
|||||||
![]() |
|
|
Thread Tools | Display Modes |
|
#1
|
|
Consider I have a host in my LAN called "foo", and it ip address is
172.16.0.1, how can I get the hostname (i.e. foo) from the ip address??? nslookup 172.16.0.1 won't work. TIA Neroku |
|
#2
|
|||
|
|||
|
Neroku <(E-Mail Removed)> writes:
> Consider I have a host in my LAN called "foo", and it ip address is > 172.16.0.1, how can I get the hostname (i.e. foo) from the ip > address??? > > nslookup 172.16.0.1 won't work. Then 172.16.0.1 isn't in the reverse DNS lookup tables. If it were, nslookup would work. So, for instance, I can get: snowball:603$ nslookup 192.168.0.13 Server: 192.168.0.2 Address: 192.168.0.2#53 13.0.168.192.in-addr.arpa name = zoya.wb.comcast.net. |
|
#3
|
|||
|
|||
|
Neroku <(E-Mail Removed)> wrote in news:1176936630.382899.161850
@d57g2000hsg.googlegroups.com: > Consider I have a host in my LAN called "foo", and it ip address is > 172.16.0.1, how can I get the hostname (i.e. foo) from the ip > address??? > > nslookup 172.16.0.1 won't work. Maybe your DNS server is missing the PTR record. Klazmon > > TIA > |
|
#4
|
|||
|
|||
|
Neroku wrote:
> Consider I have a host in my LAN called "foo", and it ip address is > 172.16.0.1, how can I get the hostname (i.e. foo) from the ip > address??? > > nslookup 172.16.0.1 won't work. > > TIA Try host 172.16.0.1 On my Centos 5 installation, that shows the hostname as the last word on the line of output. Mark |
|
#5
|
|||
|
|||
|
On Sat, 21 Apr 2007, in the Usenet newsgroup comp.os.linux.networking, in
article <PsgWh.490$Fc1.21@trnddc05>, Mark wrote: >Neroku wrote: >> Consider I have a host in my LAN called "foo", and it ip address is >> 172.16.0.1, how can I get the hostname (i.e. foo) from the ip >> address??? >> >> nslookup 172.16.0.1 won't work. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >Try > >host 172.16.0.1 [compton ~]$ whatis dig dnsquery host nslookup dig (1) - send domain name query packets to name servers dnsquery (1) - query domain name servers using resolver host (1) - look up host names using domain server nslookup (8) - query Internet name servers interactively [compton ~]$ All four ask a name server for data. If nslookup won't work, neither will any of the others. These tools don't look in the /etc/hosts files, or try to use some microsoft name resolution service or the equally insecure Apple mDNS (implemented as Avahi in Linux service). Trying any form of network connection will cause the resolver to look through the available name resolution services defined in /etc/nsswitch.conf, but if they don't know the name either, you're just as bad off as you were to start with. Old guy |
![]() |
| Tags |
| address, hostname |
| Thread Tools | |
| Display Modes | |
|
|