TCP/IP on the PC, Tips and Tricks, Part 1


B-1. What do I need to know before setting up SLIP or PPP?

Before setting up your SLIP or PPP connection, you should have available the following information:

Do not attempt to connect to your host before you have this information, since it will just waste your time and money, and may cause problems for the network. In particular, do not attempt to initiate a connection using a made up TCP/IP address! It is possible that your made-up address may conflict with an existing address. This is probably the quickest way to get people very angry at you.

Static addressing means that your TCP/IP address will always be the same. This makes it easy to configure your setup files. Dynamic addressing means that the host will send you a message containing your TCP/IP address when you log on. This can be problematic if your software doesn't support grabbing the address and inserting it into the setup files. If not, then you may have to edit your setup files every time you log on. Yuck!

The scripting language of Trumpet Winsock now supports dynamic addressing. Chameleon NFS includes a version of SLIP which can handle dynamic addressing. The most recent version of Novell's Lan Workplace for DOS does as well.

If your software supports Bootstrap Protocol (BOOTP), then you can also determine your address by retrieving it from the BOOTP server. PPP also supports server assignment of TCP/IP addresses.

B-2. How do I configure PHONE?

From Ashok Aiyar, ashok@biochemistry.cwru.edu:

PHONE comes with several scripts (for various modems) and for the University of Minnesota Terminal server built into it. The command PHONE WRITE writes these scripts to an ASCII file called PHONE.CMD, which can be edited to your needs (modem and slip server)

The documentation that accompanies PHONE, provides good instructions on writing script files to get PHONE to dial SLIP servers other than the University of Minnesota server. For example here is a script that I use to dial a CISCO server at the University that I attend.

Background: To start a SLIP connection, I dial our terminal server, and login with a username and password. After doing so, I start a SLIP session with the following command "slip username-slip.dialin.cwru.edu", followed by my password -- again. Here then is the relevant portion of the PHONE.CMD script file:

#
# CWRU-TS2 SLIP login script by Ashok Aiyar 3/26/93
# Last revised 3/28/93
Procedure    Host.CWRU.Login
TimeOut 60      'CWRU-TS2 terminal server is not responding'
Message         "CWRU-TS2 SLIP login script -- Version 1.1"
Message         'Waiting for SLIP server to respond'
Quiet ON
Expect 'Verification'
Message         'Request for User Verification Received from CWRU-TS2'
Message         'Sending your user name and password'
Quiet OFF
Expect   'Username:'
Send '%u<'

Expect   'Password:'
Private
Send '%p<'
Reject    'Access denied'   'Your user name or password was not accepted'
TimeOut 30    'SLIP server did not respond to your validation request'
Expect 'CWRU-TS2>'

Send 'SLIP<'

TimeOut 10    'SLIP server did not respond to SLIP command'
Expect 'IP hostname or address:'
Send '%u-slip.dialin.cwru.edu<'
TimeOut 10 'SLIP server did not respond to hostname'
Reject    'Bad IP address'   'Incorrect Hostname'
Expect 'Password:'
Send '%p<'
Reject    'Access denied'    'Password not accepted.'
TimeOut 10
Expect 'Header Compression will match your system'
Message 'Login to CWRU SLIP server successful'
Wait 1.0
EndProcedure   Host.CWRU.Login
#
#
Procedure      Host.CWRU.LogOut
# Nothing special needs to be done to logout
EndProcedure   Host.CWRU.LogOut
#
#   End of Script file
#

How do I use packet drivers other than UMSLIP with PHONE?

From Ashok:

The quick answer - there is no "clean" way. Below is a batch file hack that I wrote to use PHONE with other packet drivers. In this example, the packet driver is Peter Tattam's CSLIPPER. To use a batch file like this, you must know the parameters with which you plan to use the packet driver - i.e interrupt vector, baud rate, port address, and IRQ. This batch file requires UMSLIP.COM, CSLIPPER.EXE, and TERMIN.COM to be in the same directory or in your path ...

All that the BATCH file does is to let you dial the SLIP connection using PHONE, load the appropriate packet driver, hangup the connection, and unload the driver when you are done ...

-- begin CWRUSLIP.BAT --
@echo off
rem   this batch file is an ugly hack of U. of Minn. "SLIP.BAT"
rem   awaiting a version of C/SLIPPER that can directly interact
rem   with PHONE
rem   CWRUSLIP.BAT file is used with PHONE.EXE to start a SLIP
rem   connection on CWRU-TS2
rem   last modified 3/28/93 -- Ashok Aiyar

@echo off
cls
goto start

:start
if %1. == ?.         goto help
if %1. == help.      goto help
if %1. == setup.     goto setup
if %1. == dial.      goto forceD
if %1. == hangup.    goto forceH
if %1. == quit.      goto forceH
if %1. == HELP.      goto help
if %1. == SETUP.     goto setup
if %1. == DIAL.      goto forceD
if %1. == QUIT.      goto forceH
goto bogus
goto unload

:forceH
termin 0x60
umslip >nul
phone force hangup
goto unload

:slipper
termin 0x60
REM  the following line must be changed to reflect the COM port,
REM  IRQ, baud rate, and software interrupt
lh c:\packet\cslipper com1 vec=60 baud=57600 ether
goto end

:forceD
termin 0x60
umslip >nul

phone force dial
goto slipper

:setup
termin 0x60
umslip >nul

phone setup
goto help

:unload
termin 0x60
goto end

:bogus
echo %1 is not a valid command.
echo Try "cwruslip help" for a list of valid commands
echo.

:help
echo --------------------------------------------------------------
echo           Case Western Reserve University SLIP Setup
echo                  using Univ. of Minnesota PHONE
echo --------------------------------------------------------------
echo cwruslip setup     modem settings, phone number, username etc.
echo.
echo cwruslip dial      DIAL and establish the SLIP connection
echo cwruslip quit      HANGUP the phone and unload the driver
echo cwruslip help      this screen
echo.

:end
-- end CWRUSLIP.BAT --

B-3. What version of KA9Q should I use and where do I get it?

Version 1.0b is the latest and greatest, being based on the N1BEE 0.85-beta which is based on PA9GRI 2.0m NOS. Version 10b includes support for NTP, CSO, gopher, FTP, and SMTP/POP2/POP3 servers, plus VT102 and packet filtering support. Base code is by Ashok Aiyar (ashok@biochemistry.cwru.edu).

Available as:

file://biochemistry.bioc.cwru.edu/pub/nos/nos10b.exe file://biochemistry.bioc.cwru.edu/pub/nos/nos10b.txt file://biochemistry.bioc.cwru.edu/pub/nos/nos10b.map file://biochemistry.bioc.cwru.edu/pub/nos/nos_1229.man file://biochemistry.bioc.cwru.edu/pub/nos/vt102.zip file://biochemistry.bioc.cwru.edu/pub/nos/filter.txt file://biochemistry.bioc.cwru.edu/pub/nos/autoexec.nos From mike@childsoc.demon.co.uk (Michael Bernardi):

Demon Internet Services have a dialin Internet service in the UK. They also support a customised version of KA9Q optimised for dialup, they also support the PCElm mailer, SNEWS news reader and a customised front end. There is also a combined NEWS and MAIL program called CPPNEWS and an alternative MAIL program called VIEW, these last are unsupported by Internet@demon.co.uk but other DIS users do support them. All these programs can be found on ftp.demon.co.uk in the pub/ibmpc/ directory, and are written to work with KA9Q (specifically the DIS version).

Anthony McCarthy has added a multi-windowing system to KA9Q that supports the mouse, which has been recommended. See Resource listings for info.

What do I need to run KA9Q? Why won't it do VT-100 emulation?

KA9Q is usually run from a startup script, such as my script startnos.bat:

\nos\drivers\8003pkdr
\nos\net -d \nos
Here I first load the packet drivers for my 8003 Ethernet card, then run KA9Q (known as net.exe).

The KA9Q package then reads commands from a configuration file, called AUTOEXEC.NOS.

For VT100 emulation with KA9Q, try using Giles Todd's VT102.COM, available via ftp from ftp.demon.co.uk, cd /pub/ibmpc/DIS.

B-4. How do I configure KA9Q as a SLIP connection?

Here is a sample CSLIP only configuration file:

# Set the host name
#
hostname aboba.slip.netcom.com
ip address [192.187.134.3]
#
#
#
# Configure COM3 on Interrupt 5, at 38400 bps with
# RTS/CTS (c) and Van Jacobson Compression (v) and MTU = 1008
#
attach asy 0x3e8 5 VJSLIP sl0 8092 1008 38400 cv
ifconfig sl0 netmask 255.255.255.252
#
#
#
route add default sl0
# route all packets over sl0 by default (sl0 is the route to
# the Internet)
#
# Time To Live is the maximum number of hops a packet can take
# before it is thrown away.  This command prevents an inadvertent
# infinite loop from occuring with packets in the network.
#
ip ttl 400
#
#-------------------------------------------------
#
# The Maximum Segment Size is the largest single transmission that
# you care to receive.  An mss of 216 will force folks to send you
# packets of 256 characters or less (counting the overhead). 
#
tcp mss 1048
#
#-------------------------------------------------
#
# The Window parameter establishes the maximum number of bytes that
# may be outstanding before your system expects an ack.  If window is
# twice as big as mss, for example, there will be two active packets
# on the channel at any given time.  Large values of window provide
# improved throughput on full-duplex links, but are a problem on the
# air.  Keep window between mss and 2 * mss if you're on the air. 
#
#
tcp window 6888
#
#-------------------------------------------------
#
# This entry will open net.log in the \spool directory and will
# record the server activity of your system.  If you don't want a log,
# comment out this line; if you do, make sure you have a \spool
# directory!
#
log \spool\net.log
#
#-------------------------------------------------
#
# Each of the servers (services you will provide) must be turned
# on before they will be active.  The following entries turn all
# of them on.  To turn any function off use the command 'stop' after
# NET gets fired up, or just comment out the line here.
#
start ftp
start echo
start discard
#start telnet
start smtp
#
isat on
#
domain addserver 192.100.81.101
domain addserver 192.100.81.105
smtp gateway 140.174.7.1
#
#
#  Display Name and IP Address
#
hostname
ip address
#
# Just for yucks, lets try calling the other end.
comm sl0 atdt14082411528
# THE END

After executing this setup file, you should hear the modem dial out to your SLIP host. Enter TIP sl0 at the prompt to be connected to the SLIP interface. You will then see your hosts's login prompt. Give the login name and password, and when you go into SLIP mode, hit F10 to get back to the prompt. Note that newer versions of KA9Q may not be compatible with the comm command, since they support more sophisticated dialing scripts.

Type RESET 1 at the prompt. This moves session 1 from tip mode into SLIP mode. Type another RESET to kill any residual processes that may be operating.

At this point you should have a functioning connection. You might try to ping your host via the command: PING host adddress. If this works, you will then see the round trip time to your host, in milliseconds.

Other possible diagnostic commands:

B-5. How do I configure KA9Q as a router?

The KA9Q configuration that follows uses two interfaces, one a CSLIP interface to an annex terminal server (sl0), the other an Ethernet interface (lan) with another machine (a NeXT) attached.

Note the use of Van Jacobson compression (v) on the slip line, as well as the strange interrupt settings (Interrupt 5, port is COM3). One of the nice things about KA9Q is that it is flexible enough to deal with such situations. Here is a sample router configuration file:

# Set the host name
#
hostname gate.slip.holonet.net
#
#
# Configure COM3 on Interrupt 5, at 38400 bps with
# RTS/CTS (c) and Van Jacobson Compression (v)
#
attach asy 0x3e8 5 VJSLIP sl0 8092 576 38400 cv
ifconfig sl0 ipaddress [157.151.0.253] netmask 255.255.255.0
#
# FTP, Inc., compatible packet driver installed at software interrupt number
# 0x60; probably an Ethernet card of some kind.
#
attach packet 0x60 lan 2 1500
ifconfig lan ipaddress [157.151.64.1] netmask 255.255.255.0
#
route add default sl0
# The local Ethernet has a Class C network address so
# route all IP addresses beginning with 157.151.64 to it.
route add 157.151.64/24 lan
#
#
# Time To Live is the maximum number of hops a packet can take
# before it is thrown away.  This command prevents an inadvertent
# infinite loop from occuring with packets in the network.
#
ip ttl 400
#
#-------------------------------------------------
#
# The Maximum Segment Size is the largest single transmission that
# you care to receive.  An mss of 216 will force folks to send you
# packets of 256 characters or less (counting the overhead). 
#
tcp mss 576
#
#-------------------------------------------------
#
# The Window parameter establishes the maximum number of bytes
# that may be outstanding before your system expects an ack.
# If window is twice as big as mss, for example, there will be two
# active packets on the channel at any given time.  Large values of
# window provide improved throughput on full-duplex links, but are a
# problem on the air.  Keep window between mss and 2 * mss if you're on the air. 
#
#
tcp window 6888
#
#-------------------------------------------------
#
# This entry will open net.log in the \spool directory and will
# record the server activity of your system.  If you don't want a log,
# comment out this line; if you do, make sure you have a \spool
# directory!
#
log \spool\net.log
#
#-------------------------------------------------
#
# Each of the servers (services you will provide) must be turned
# on before they will be active.  The following entries turn all
# of them on.  To turn any function off use the command 'stop' after
# NET gets fired up, or just comment out the line here.
#
start ftp
start echo
start discard
#start telnet
start smtp
#
isat on
#
domain addserver 157.151.0.2
domain addserver 157.151.0.1
smtp gateway 157.151.0.2
#
#
# Use Router Information Protocol (RIP) to inform the router at
# 157.151.0.253 about the existence of the local network. Send
# RIP packets every 240 seconds.
rip add 157.151.0.253 240
#
#
# Just for yucks, lets try calling the other end...
#
comm sl0 atdt7041063
#
# THE END

Here is another routing configuration file, using proxy ARP:

# Set the host name
#
hostname gate.slip.holonet.net
#
#
# Configure COM3 on Interrupt 5, at 38400 bps with
# RTS/CTS (c) and Van Jacobson Compression (v)
#
attach asy 0x3e8 5 VJSLIP sl0 8092 576 38400 cv
ifconfig sl0 ipaddress [157.151.0.253] netmask 255.255.255.0
#
# FTP, Inc., compatible packet driver installed at software interrupt number
# 0x60; probably an Ethernet card of some kind.
#
attach packet 0x60 lan 2 1500
ifconfig lan ipaddress [157.151.64.1] netmask 255.255.255.0
#
#  Set Routing Tables
#
#
route add default sl0
# The local Ethernet has a Class C network address so
# route all IP addresses beginning with 157.151.64 to it.
route add 157.151.64/24 lan
#
#  Use Proxy ARP
#
arp publish 157.151.64.1 ether 00:00:c0:33:f3:13
arp publish 157.151.64.254 ether 00:00:c0:33:f3:13
#
#  For PC AT
#
isat on
#
# Add Domain Name Servers
#
domain addserver 157.151.0.2
domain addserver 157.151.0.1
smtp gateway 157.151.0.2
#
#
# Time To Live is the maximum number of hops a packet can take
# before it is thrown away.  This command prevents an inadvertent
# infinite loop from occuring with packets in the network.
#
ip ttl 400
#
#-------------------------------------------------
#
# The Maximum Segment Size is the largest single transmission that
# you care to receive.  An mss of 216 will force folks to send you
# packets of 256 characters or less (counting the overhead). 
#
tcp mss 576
#
#-------------------------------------------------
#
# The Window parameter establishes the maximum number of bytes
# that may be outstanding before your system expects an ack.
# If window is twice as big as mss, for example, there will be two
# active packets on the channel at any given time.  Large values of
# window provide improved throughput on full-duplex links, but are a
# problem on the air.  Keep window between mss and 2 * mss if you're on the air. 
#
#
tcp window 6888
#
#-------------------------------------------------
#
# This entry will open net.log in the \spool directory and will
# record the server activity of your system.  If you don't want a log,
# comment out this line; if you do, make sure you have a \spool
# directory!
#
log \spool\net.log
#
#-------------------------------------------------
#
# Each of the servers (services you will provide) must be turned
# on before they will be active.  The following entries turn all
# of them on.  To turn any function off use the command 'stop' after
# NET gets fired up, or just comment out the line here.
#
start ftp
start echo
start discard
#start telnet
start smtp
#
#  Display Name and IP Address
#
hostname
ip address
#
# Just for yucks, lets try calling the other end.
comm sl0 atdt7041063
# THE END

B-6. How do I get KA9Q to support BOOTP?

Steven L. Johnson (johnson@TIGGER.JVNC.NET) notes:

KA9Q does have a bootp client but it is not compiled in by default. It has a bug that truncates the returned ip address to 16 bits which must be corrected before it will work. It also complains about bootp servers that only support RFC 951 bootp without RFC 1084 (or 1048) vendor extensions. Other than that it seems to work for me.

To enable the bootp client, add the following line to config.h:

    #define BOOTP 1

To correct the ip address truncation problem, in bootp.c change:

                Ip_addr = (int) reply.yiaddr.s_addr;    /* yiaddr */
                          ^^^^^problem

at line 188 to:

                Ip_addr = (int32) reply.yiaddr.s_addr;    /* yiaddr */
                          ^^^^^^^solution

And of course, recompile.

This worked on the src1229 (1991) version and may work on the most recent version. I did check to make sure that the bug still exists, but I haven't rechecked whether there are additional problems in the new version.

B-7. How do I get DesQView X to run over the network?

V1.0 of DesQView X did not include a TCP/IP protocol stack. Surprise! It required a TCP/IP implementation such as Beame & Whiteside, PC-NFS, FTP's PC/TCP, or Novell LWP. They've corrected the situation in subsequent revisions. Contact QuarterDeck for assistance.


Bernard Aboba, aboba@internaut.com, last modified: 3/18/94