TCP/IP for Windows 3.1

Quick guide to Winsocks


There are roughly 3 ways of getting on to the internet (or using TCP/IP in general) for Windows 3.1 computers :

'No Sweat' Approach : Microsoft Internet Explorer

Get Microsoft Internet Explorer 2.1Run iesk.exe from the installation package. Answer the questions, click 'OK'.

When you have TCP/IP (and Internet Eplorer) installed, run 'Get on the internet'(icon in Program Manager) to configure dial-up. You might want to adjust COM settings (speed, ...) in control panel : ports.
Click on the icon of your 'connection', and choose 'properties' to set connection and TCP/IP configuration (DNS server address, etc.).
Done.

The configuration is saved - and can be edited - in the folowing .ini files.

Furthermore, the following lines are added to the autoexec.bat

More details in internet explorer readme.txt.
Here are instructions to uninstall Internet Exporer 2.1.

Trumpet

Internet Explorer for Windows 3.0 was not develloped further. For Microsoft, the way to have internet connectivity on a Windows 3.x computer, was to upgrade it to Windows 95 and start using Internet Explorer 3.0.

An alternative is Trumpet Winsocks. They already made a TCPIP suite for DOS, and are still producing TCP/IP suites for Windows. For Windows 3x, look for twsk20b.exe in the winsock folder in the download section. It can be configured in detail, and has some nice tracing functions so you can see what's going on. You may not understand what's going on, but at least there'll be something to look at :-)

twsk20b.exe is a self-extracting archive. To install Trumpet Winsocks, uou run this .exe in a suitable directory, say c:\trumpet.

You also need to add this directory to the PATH statement in your autoexec.bat, e.g.
PATH c:\dos;c:\windows;c:\trumpet

Make sure it's active by running autoexec, or reboot your computer.

Start Windows, then run tcpman.exe (from File|Run, or by clicking it in File Manager, or make an icon in Program Manager first.)
The Setup screen will appear, If it doesnt, you can find it under File : Setup. Check PPP (assuming you want a PPP dial-up connection to an internet provider), and put in the other configuration details. See readme for details.

If you'll use PPP and your internet provider will assign you an IP address dynamically, put 0.0.0.0 for you IP address. Make sure the put the number of the COM port where your modem is, in 'SLIP port' - also for PPP !

Close the configuration window. If your not prompted for a PPPP username and password (for CHAP authentication), and a telephone number, go to File : PPP Options where uou can enter password and username.

Open the menu Dialler : Edit Scripts. Scripts have .cmd extension. In the Login script you can put the dail-in telephone number of your internet provider (ATDT ...). You may also put a username and password if you internet provider uses PAP, so that your user name and password will be passed durring the login.
Replace the 'ATZ' command (a general modem initialisation string) by a modem string that matches your modem. If you don't know it, try AT&F1 or AT&F0 for the time being. Leave ATZ if this doesn't work. This may affect the performance of your modem.

Note that the script language supports controll structures such as 'if .. then ...' and 'loop' (repeat). That should let you create powerfull scripts that can deal with complex or difficucult dialing / login situations.

in the menu Dialler : Optens, you may check 'use control pannel settings for parity and ..' so that the values of your COM1 will be used as you have confogured them. You may want to check these settings again (controll panel : ports)

Next time you run tcpman.exe, it wil start ...
and execute the scripts.
note how this resembles the output of Trumpet TCP/IP for DOS.

That should do it - you should now be able to run Winsock compatible software to get surf the Web, send mail, download or upload files, etc. Most internet applications nowadays expect Winsock to take care of the internet connection, so there you go.

Trumpet with a packet driver : dial-up

Trumpet Winsocks can also read environment variables. This means you can actually use DOS TCP/IP software to make a connection to your internet provider, fill the environment variables with your dynamic IP address, netmask, etc,, and let Winsocks use those. Check TCP/IP for DOS for how this is done.
When using environment variables, they overrule the values of the Winsock configuration, so no problem there. You are now using an external PPP packet driver, so in the tcpman setup, you should uncheck 'internal PPP driver', and add the interrupt vector of your packet driver.

TCP/IP in Windows For Workgroups Network

You can configure Trumpet Winsock to add TCP/IP to Windows 3x similar to the way you add TCP/IP to DOS -- see LAN with TCP/IP for DOS. The network driver you use in this case is a packet driver. Windows for Workgroups / Windows networking, however, uses NDIS drivers. Trumpet Winsocks does not know how to deal with NDIS (or ODI) drivers - but you can use a SHIM to use both a packet driver and a NDIS driver on the same network adapter. (for a short explanation about NDOS, ODI, packet drivers and SHIM, see LAN with TCP/IP for DOS).

For starters, set up Windows for Workgroups Networking with a NDIS driver and Netbeui. See Windows for Workgroups.

As Trumpet Winsocks expects a packet driver interface, you need to install a shim : a driver that can communicate with the NDIS driver of your network card on one hand, and behaves as a packet driver on the other hand. Winsocks will talk to the shim as if it were a packet driver, the shim will translate to the NDIS driver, the NDIS driver talks to the network adapter.
In Windows, you can have multiple applications running simultanuously. To enable TCP/IP for multiple applications, you need an additional driver - winpkt.com - to interface with the packet driver.
applications <=> TCP/IP <=> winpkt.com <=> dis_pkt.dos <=> NDIS driver <=> network adapter.

The information in this paragraph (TCP/IP in Windows For Workgroups Network) is based on the readme file 'Automated Install of Trumpet Winsock TCP/IP with Windows for Workgroups 3.11' in twswfwg.zip, which can be found in the download section, under Winsocks.
CREDITS : The original OEMSETUP.INF was by B. Armstrong (armstrob@systems.ssgnet.dsto.au). Douglas W. Jones (jones@cbdb1.nimh.nih.gov) modified it and wrote the WINPKT.BAT. C. J. Sacksteder (cjs@psu.edu) compiled these notes; corrections by Douglas Jones. Of course, don't forget Peter Tattam, writing great software for reasonable cost. REGISTER IT!

The installation is based on a oemsetup.inf file which contains entries that will be included in Windows' .ini files during setup. This makes the configuration almost 100% automatic.

Instructions :

1. Extract Trumpet Winsock files to a suitable directory (eg. c:\trumpet). Then extract the files OEMSETUP.INF, WINPKT.COM, WINPKT.BAT, and DIS_PKT.DOS from twswfwg.zip to the same directory.

2. Launch Network Setup (probably in the Network group). Click [Drivers] button. Click [Add Protocol] button. Select "Unlisted or Updated Protocol" and click [OK] button. And so on (see 'Automated Install of Trumpet Winsock TCP/IP with Windows for Workgroups 3.11' in twswfwg.zip, for detailed instructions if you need those).

When you've succesfully installed Trumpet TCP/IP, You can select 'setup',

and enter the interrupt vector for the packet driver.

The dis_pkt.dos driver is added to the system.ini, so that it will be loaded when the command 'net start' is issued (typically in the autoexec.bat for a default Windows for Workgroups contect).
Other configuration settings are saved in protocol.ini.

Run TCPMAN (Trumpet), and enter your IP address,netmask, gateway, etc. Be sure to put the vector number reported by winpkt in "Packet Vector". Close TCPMAN. Test by running any and all winsock applications.

Note that both Trumpet and Microsoft TCP/IP is implemented in a Dynamic Link Library called winsock.dll. Installing both Microsoft TCP/IP (Internet Explorer 2.1) and Trumpet TCP/IP on the same machine may cause at least one of the configurations to malfunction. You'll need to choose, or figure out a way to use multiple configurations, e.g. by creating separate batch files for each configuration, or use CHOICE in autoexec.bat, and keep backup copies of the 2 winsock.dll files.

Koen Noens
July 2002