name server

Edwin Kremer edwin at praxis.cs.ruu.nl
Tue Sep 11 00:01:53 AEST 1990


In <2210 at ux.acs.umn.edu> aaron at ux.acs.umn.edu (Aaron Y.T. Cheung) writes:

   | | 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.
   | [...]

  I wrote a pretty small program just to do quick 'n easy reverse-resolving
and called it "nsl"; you can call it with either a hostname or an IP address.
Here's an example:

	% nsl nic.ddn.mil
	192.67.67.20

	% nsl 192.67.67.20
	NIC.DDN.MIL

  Some use it as a helpful aid to old-fashioned programs that won't
consult the nameserver to retrieve IP adresses but look in "/etc/hosts"
only, like in:
			ftp `nsl uunet.uu.net`


  If you think this is a useful program, feel free to pick it up by anonymous
FTP from our archive server: "archive.cs.ruu.nl" [131.211.80.5]. Look for
the file "pub/UNIX/nsl-1.0.0.tar.Z".

  If you don't have Internet access, send a message to our mail-server
program that can be reached at the address: 'mail-server at cs.ruu.nl',
containing following instructions in the message body:

	begin
	send UNIX/nsl-1.0.0.tar.Z
	end



		enjoy and thanks for your time,
						--[ Edwin ]--
--
Edwin Kremer (SysAdm), Dept. of Computer Science, Utrecht University
Padualaan 14,   P.O. Box 80.089,  3508 TB  Utrecht,  The Netherlands
Telephone: +31-30-534104  | UUCP: ...!uunet!mcsun!hp4nl!ruuinf!edwin
Telefax  : +31-30-513791  | Email: edwin at cs.ruu.nl    [131.211.80.5]



More information about the Comp.unix.questions mailing list