Notes on NCSA Telnet
--------------------

NCSA Telnet is a suite of Internet applications for DOS, including:
telnet, ftp, finger, and whois; Berkeley rsh, rexec, and rcp; and remote
printing programs lpr, lpq, and lprm.  rcp and ftp operate in server mode
when connected by telnet, for exchanging files with a mainframe.
TEL23ASC.ZIP contains the documentation for NCSA Telnet (q.v.);
TEL2308B.ZIP contains the programs themselves.	The telnet application is
very good and offers a complete, configurable VT100 emulation including
Tektronics 4014 graphics mode on supported video cards (Hercules, CGA, EGA,
and VGA are supported cards).  Multiple simultaneous telnet sessions are
supported.

Most of the above features (except for the Berkeley commands and whois) are
supported by CUTCP Telnet (q.v.), which is based on NCSA.  CUTCP generally
works better and is preferred.  Most of the documentation in TEL23ASC.ZIP
applies to CUTCP Telnet as well.

NCSA Telnet requires an Ethernet packet driver or supported Ethernet card,
which needs to be installed and connection made before these programs can be
used (you do not need to be connected to configure NCSA Telnet).  Packet
drivers such as Dospppd or Etherppp that emulate Ethernet (class 1) can be
used with NCSA Telnet.  This package cannot be used with Umslip over a SLIP
link, though a SLIP packet driver that emulates class 1 could be used.

NCSA Telnet uses several configuration files, only one of which, CONFIG.TEL,
needs to be modified before the program can be used.  The documentation
accompanying the programs is newer than the documentation in TEL23ASC.ZIP,
so in case of conflict go by the former.  The following items in CONFIG.TEL
need to be set.  There is a *lot* of stuff in the file, and if I don't list
an item here, you can leave it alone.

The first thing to set is your PC's IP address.  If you have static IP, fill
in the IP address you were given:

    myip=204.117.9.33

If you have dynamic IP, you can use either RARP or BOOTP, depending on which
your packet driver supports.  BOOTP is probably preferable:

    myip=BOOTP

Otherwise, if your packet driver doesn't support BOOTP, use RARP:

    myip=RARP

If using BOOTP, comment out the netmask line.  Otherwise, set it to zeros
(don't use your real netmask over a SLIP or PPP link):

    netmask=0.0.0.0

Leave these three lines alone:

    hardware=packet
    interrupt=0
    ioaddr=0

All the lines pertaining to various hardware Ethernet cards should be left
commented out (do not change them).

If using BOOTP, leave the broadcast line commented out.  Otherwise, set it
to your gateway's IP address:

    broadcast=199.191.1.70

(For Agate's Bangor gateway.)  You might also try the broadcast address your
provider gave you.  At any rate, *don't* leave it commented out if you're
not using BOOTP.

Change the path of the keyboard remapping file to match the directory where
you installed NCSA Telnet:

    keyfile="e:\internet\tel2308b\keymap.tel"

KEYMAP.TEL is used by NCSA Telnet to convert PC keys into VT100 key codes.
You can modify KEYMAP.TEL later if you want to, but it should be OK as it
is.

Change the path of the services file to match the directory where you
installed NCSA Telnet:

    services="e:\internet\tel2308b\services.tel"

SERVICES.TEL is used to display the status of the network.  You do not need
to modify it.

If you want to enable Tektronics graphics mode, set tek=yes:

    tek=yes

Select your video card type:

    video=cga

If you select ega43 or vga50, telnet will display text in 43- or 50-line
mode.  (You need to leave tek=no if you have MDA - the original video of the
IBM PC, monochrome with no graphics capabilities.)

If you have an old CGA card with a snow problem, use BIOS for screen writes:

    bios=yes

Otherwise, leave it at bios=no (Tandy CGA does not have a snow problem).

Set rcp=yes if you want to be able to do rcp file transfers between the
mainframe and your PC during a telnet session.	Set rcp=no if you don't -
if you enable incoming ftp or rcp, anybody can use it to access your PC,
not just you.  You will need to create a password file if you enable rcp or
ftp - see the docs.

Set ftp=yes if you want to be able to do ftp file transfers between the
mainframe and your PC during a telnet session.	Set ftp=no if you don't
(for security reasons, as noted above).	 You will need to create a password
file if you enable rcp or ftp - see the docs:

    ftp=yes

Set ftpwrt=yes if you want to be able to download files from the mainframe
to your PC during a telnet session.  Set it to no if you only want to be
able to upload files (again for security reasons).  Note:  if you set
ftp=no, ftpwrt=yes has no effect.  You will need to create a password file
if you enable rcp or ftp - see the docs:

    ftpwrt=yes

Change the path of the ftp/rcp password file to match the directory where
you installed NCSA Telnet:

    passfile="e:\internet\tel2308b\password.tel"

Note:  there is no default for this file; you need to create it (see the
docs).  If you don't have ftp or rcp enabled, you can comment this line out.

You might want to increase the number of domain retries:

    domainretry=4

Leave the domain line commented out; it will only mess up domain name
lookups.

Increase the timeout for domain name lookups; 4 seconds is not long enough
over a modem link:

    domaintime=20

Set the filename to use for screen captures.  You probably don't want this
to be a full path; if you make it just a file, the capture file will go in
the current directory:

    capfile="capfile.tel"

If you would like to be able to save Tektronics 4014 graphics in postscript
format for later printing, specify the filename with this.  If you have a
postscript printer, you could use "prn".  Not used if you set tek=no above:

    psfile="ps.out"

The default machine entry can be left alone.

After the default machine entry come the default screen colors.	 If you have
CGA, EGA, or VGA, you can leave these alone.  If you have MDA or Hercules,
you will probably want to change them.  Here are some settings for mono
("blue" is underline in mono):

    nfcolor=white
    nbcolor=black
    bfcolor=white
    bbcolor=BLACK
    rfcolor=black
    rbcolor=white
    ufcolor=blue
    ubcolor=black

erase=delete says to send a <delete> code rather than a <backspace> code
when you hit <backspace> during a telnet session.  Default is <backspace>. 
Unix systems like <delete> better, if you are telnetting to them:

    erase=delete

You might want to increase the connection timeout to allow for slow hosts:

    contime=60

The following might help connect to some telnet sites by preventing packet
fragmentation.  NCSA Telnet cannot reassemble fragmented packets:

    mtu=512
    maxseg=512
    rwin=512

Finally, at the bottom of the file are a bunch of example machines.  Comment
them *all* out.  If you are not using BOOTP, you need to make entries for
your nameserver and gateway here, like this:

    name=mygateway ; hostip=199.191.1.70 ; gateway=1
    name=mynameserver ; hostip=199.191.1.80 ; nameserver=1

Problem:  NCSA Telnet seems to have problems with DNS (domain name lookup to
convert hostnames to IP addresses).  I found that telnet itself could resolve
them, but the other applications (ftp, finger, etc.) could not.  Marc said
that for him, none of the applications (including telnet) could resolve a
random domain name.  Others have told me that all the applications work fine
for them.

If everything works for you, great.  Otherwise, if telnet or the other
applications don't resolve domain names correctly, you will need to do one
of two things: (1) put the host you want to reach in CONFIG.TEL, giving its
IP address, or (2) specify an IP address rather than a domain name on the
command line.

For example, if ftp.coast.net were not in my CONFIG.TEL, I could not enter
this at the DOS prompt:

    ftp ftp.coast.net	  <------ only works if ftp.coast.net in CONFIG.TEL

Or:

    ftp simtel		  <------ only works if name=simtel in CONFIG.TEL

I would have to do it like this instead:

    ftp 129.15.2.40	  <------ this will always work

You should put these sites in CONFIG.TEL so that whois will work:

    name=whois ; host=rs.internic.net ; hostip=198.41.0.5
    name=whoismil ; host=nic.ddn.mil ; hostip=192.112.36.5

Here are some ftp sites you might want to put in:

    name=agate ; host=ftp.agate.net ; hostip=199.191.1.80
    name=oak ; host=oak.oakland.edu ; hostip=198.111.3.158
    name=wuarchive ; host=wuarchive.wustl.edu ; hostip=128.252.135.4
    name=garbo ; host=garbo.uwasa.fi ; hostip=193.166.120.5
    name=simtel ; host=ftp.simtel.net ; hostip=165.113.121.81

Here is a finger that might be fun to look at:

    # finger cocacola@columbia - a Coke machine (funny!)
    name=columbia ; host=cunix.cc.columbia.edu ; hostip=128.59.35.11

You can finger @site to get the IP address of a site.  Note:  finger won't
actually finger the site (unless it's in CONFIG.TEL already), but it will
display the site's IP address, then some error messages.  For example, if I
wanted to ftp to ftp.coast.net, but it wasn't in my CONFIG.TEL and I didn't
know its IP address, I could do this at the DOS prompt:

    finger @ftp.coast.net

Finger would display:

    [129.15.2.40]
    received event [4]
    connect_sock returned -1, exiting

Command-line (outgoing) ftp will still work even if you set ftp=no in
CONFIG.TEL.  The setting in CONFIG.TEL only relates to server-mode
(incoming) ftp requests.

Finger and whois can timeout when receiving long responses over a slow
modem link.  Use the -t parameter to increase the timeout if this happens.

The documentation says to edit the batch file TELNET.BAT to specify the
locations of CONFIG.TEL and TELBIN.EXE and move TELNET.BAT to a directory
in the path.  That is not really the best way to do it, since it gets
telnet working but not ftp, finger, etc.

A better solution is to edit your AUTOEXEC.BAT file to add the directory
where you installed NCSA Telnet to the path and set the environment
variable CONFIG.TEL to specify the location of CONFIG.TEL.  For example, if
I installed Telnet in directory E:\INTERNET\TEL2308B, I might have the
following in my AUTOEXEC.BAT:

    PATH C:\;C:\DOS;C:\QC2\BIN;C:\ASM;C:\MISCPROG;C:\PKZIP;C:\QMODEM
    PATH %PATH%;E:\INTERNET\TEL2308B;C:\FILTERS
    SET CONFIG.TEL=E:\INTERNET\TEL2308B\CONFIG.TEL

Now you can delete TELNET.BAT and FTP.BAT.  Just rename TELBIN.EXE to
TELNET.EXE and FTPBIN.EXE to FTP.EXE.  If you want to keep the .BAT files
for some reason, you can make them just one line.  For example, here is a
TELNET.BAT file for the above arrangement:

    telbin %1 %2 %3 %4 %5 %6 %7

FTP.BAT would be (if you wanted it):

    ftpbin %1 %2 %3 %4 %5 %6 %7

This way, all the other programs (ftp, finger, rsh, etc.) will know how to
find CONFIG.TEL and not just telnet itself.