Hostname: naic.nasa.gov
Directory path: files/general_info/
Filename: basic-tcpip-commands.txt
Updated: July 12, 1993 (mks)


            BASIC TCP/IP (INTERNET) COMMANDS FOR DECNET/VMS USERS
            =====================================================

Listed below are (fairly basic) descriptions of the TCP/IP-based commands 
TELNET, FTP, FINGER, WHOIS, and NSLOOKUP.  In each of the examples, boldface
type indicates user input.  Also, please note that the examples shown below use
the syntax for a MultiNet-equipped VAX VMS system; your own system command
syntax may vary slightly. 

TELNET
------
This is the remote login command.  You can telnet to a simple hostname (e.g.
"telnet foo"), a full domain name ("telnet foo.gsfc.nasa.gov"), or to a TCP/IP
address ("telnet 128.183.10.3"). Telnet works very much like the "set host"
command; you need a valid account on the remote node to log into! 

Example:   $ TELNET 128.183.112.2  <CR>


FTP
---
FTP (File Transfer Protocol) is roughly the equivalent of COPY.  You can FTP to
a machine in much the same way you can telnet to it, as in the following
example: 

Example:  $ FTP dftnic  <CR>
          (misc. system messages)
          DFTNIC.GSFC.NASA.GOV> user lev  <CR>
          Password: xxxxxx  <CR>
          DFTNIC.GSFC.NASA.GOV>  (the remote system is now ready for your
                                  command) 

Once connected, you can move files around with the following commands: 

        PUT -- moves files onto the remote node
        GET -- pulls files from the remote node
        LS, DIR -- lists contents of the remote directory
        LDIR -- lists contents of the local directory
        CD xxxx -- changes to the remote directory xxxx
        LCD xxxx -- changes to the local directory xxxx

Since you can move different types of files, you sometimes have to change the
mode used in transfers.  Do so with these commands: 

ASCII -- good for moving text and binhexed (".hqx") files (note that ASCII is
         the default format!). 
BINARY -- use for moving just about anything else!
HASH -- doesn't affect mode, but lets you visually track the progress of your
        transfer by printing a series of hash marks (#) for every few bytes 
        transferred. Note that the default is no hash.  You toggle hashing
        on/off by simply re-issuing the command. 

A number of Internet sites allow "Anonymous FTP"; instead of needing an account
of your own, you log in as "anonymous" and supply your electronic mail address
as password. 

Example:   $ FTP nsinic.gsfc.nasa.gov
           NSINIC.GSFC.NASA.GOV> user anonymous
           Password:  lev@amarna.gsfc.nasa.gov  (not visible on-screen) 
           NSINIC.GSFC.NASA.GOV> cd [.SOFTWARE.CRUSH.UNIX_VERSION] 
           NSINIC.GSFC.NASA.GOV> bin
           NSINIC.GSFC.NASA.GOV> get CRUSH_TAR.Z
           NSINIC.GSFC.NASA.GOV> exit   (some systems use BYE instead of EXIT!) 

FINGER
------
The finger command lets you see who's who on a machine; if someone has a plan
file (.plan in UNIX, you can create a PLAN.TXT in your account), you can find
out a lot about them.  As a minimum, finger will tell you the real-life name
attached to the userid you supply, what process they're currently running (or
"not logged in"), the time of their last login, and whether or not they have
any unread mail .  If you finger just a userid, your system will try to tell
you who that is; if you finger user@node, you get that specific user's informa-
tion; and if you just finger @node, you get a list of everyone currently logged
onto that system. 

Examples:  $ FINGER LEV  (gives details about the named user on the same node
                          you're logged into) 
           $ FINGER lev@dftnic.gsfc.nasa.gov   (gives details about the named
                         user on the named node -- try this example to see the
                         author's plan file!) 
           $ FINGER @foo.bar.glub.com   (shows everyone currently logged onto
                         the named node) 


WHOIS
-----
This command searches the registration database on NIC.DDN.MIL and returns
whatever info has been listed there.  Since registration is voluntary, you may
or may not find what you're looking for!  You can do a whois on a TCP/IP
address, a (whole or partial) nodename, a userid, or just  about any string;
see the examples for details.  (Since registration is optional, not all users
or machines are in this data base!) 

Examples:  $ WHOIS LEV  (returns list of every occurrence of the string "lev"
                         in the database for you to choose from) 
           $ WHOIS FOO.BAR.   (returns any info found on the partial string
                         "foo.bar" -- the trailing period tells the NIC to seek
                         a partial address) 
           $ WHOIS HOST xxxxx   (returns info on the host xxxxx)


NSLOOKUP
--------
This is the nameserver address lookup function.  If you supply a (complete)
hostname, it will tell you that machine's address.  You can do the reverse, but
it takes special steps which are detailed below. 

-- To find the TCP/IP address associated with a (host)name:

        $ MU NSLOOKUP uc780.umd.edu  <CR>
        Server:  dftsrv.gsfc.nasa.gov
        Address: 128.183.10.134

        Name:    uc780.umd.edu
        Address: 131.171.129.10
        > ^Z       (CTRL-Z exits the nslookup, or just keep entering hostnames)

-- To find the TCP/IP address associated with a (host)name:

        $ MU NSLOOKUP  <CR>
        Default Server:  dftsrv.gsfc.nasa.gov
        Address:  128.183.10.134

        >  SET QUERY=PTR
        >  10.129.171.131.IN-ADDR.ARPA   (NOTE: type in the address in reverse 
                                          order and attach the suffix
                                          "in-addr.arpa" to the end) 
        Server:  dftsrv.gsfc.nasa.gov
        Address: 128.183.10.134

        10.129.171.131.in-addr.arpa     host name=uc780.umd.edu
        > ^Z       (CTRL-Z exits the nslookup, or just keep entering addresses)

