Xref: utzoo comp.unix.admin:67 comp.unix.misc:25 comp.unix.questions:25354 Path: utzoo!attcan!utgpu!news-server.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!uc!cs.umn.edu!ux.acs!aaron From: aaron@ux.acs.umn.edu (Aaron Y.T. Cheung) Newsgroups: comp.unix.admin,comp.unix.misc,comp.unix.questions Subject: Re: name server Keywords: hostname, reverse-mapping, ptr, nslookup, nameservers Message-ID: <2210@ux.acs.umn.edu> Date: 10 Sep 90 08:33:48 GMT References: <90252.231430TOMIII@MTUS5.BITNET> Reply-To: aaron@ux.acs.umn.edu (Aaron Y.T. Cheung) Followup-To: comp.unix.questions Organization: University of Minnesota, Academic Computing Services Lines: 28 | Does anyone know how to obtain the hostname of a machine given the IP | address using a name server (the nslookup feature of unix?) ? Try the reverse mapping -- nslookup with the PTR type: Eg, to get the hostname of IP address 128.101.63.2, nslookup> set q=ptr nslookup> 2.63.101.128.in-addr.arpa. (note that the IP is supplied reversed) for the convenience of querying multiple IP's, nslookup> set q=ptr nslookup> set do=in-addr.arpa. nslookup> 2.63.101.128 nslookup> 1.63.101.128 etc. Works only if the IP address is connected to the Internet and someone did register his corresponding network.in-addr.arpa domain with Nic and someone actually put in the ptr records for their hosts and their primary and secondary nameservers are not down and.... :-) Hope it helps. /aaron.