Using a DOS box on a TCP/IP LAN
Up 5/03
How to connect a plain DOS machine to a Windows / Linux Network (using TCP/IP of course)
What we were using (a few years ago) was the networking and TCP/IP add-ons for Windows for Workgroups (Win 3.11) onm a DOS machine. My local network consists of WfW machines, DOS machines, Win95/98 machines, and a Linux box. The Linux box runs the SAMBA system, and an SMB file system. The Linux box also is the connection to the internet, has the modem, fetchmail, sendmail, etc. We connect from the Win boxes with a telnet session, using the very small and solid sptnet16.exe.
Linux runs ipfwd, and ipchains. The graphical browsers on the win boxes (and ftp and ssh) connect to the outside world without any knowledge that there is a router in between. With the exception of a single ip address, no other connections are allowed in. Mail goes to an MX machine.
I have no idea what files to steal from a W95/98 OS for use by DOS. Probably things by the same names. But since most of them prolly run in 32 bit mode, they might be useless on a DOS box.
WfW networking files, however, work fine. Note that the SAMBA set of files on the Linux box need to be version 1.9.18 to allow connecting through to WFW machines. Otherwise (for Win95/etc) it's 1.9.20 or better.
The following files were moved from the windows directory of another machine to a local directory called "network" on the DOS machine. I have no idea what all these files are used for or why there are so many, all I did was remove files from the directory one by one until the networking capability broke. These are what I ended up with (plus a documentation additions): ({} means fill in as appropriate)
I should note that it's up to the reader to find the files they need. I do not have them.
- connect.dat (binary info on what "shares" to connect to at startup)
- emsbfr.exe
- ether.dos (prolly my ethernet card's driver)
- hosts (the file listing IP addresses and machine names, which can also include external IP addresses.)
- ifshlp.sys (needed in config.sys)
- ifwsys.cfg
- jno.pwl (a password file - just make sure that passwords either are blank or not required. Makes things much easier.)
- lmhosts (a Windows version of "hosts" which lists IP addresses and machine names (without the domain name).)
- ncdinfo.ini (lists the ethernet card configuration.)
- ndishlp.sys (this is needed)
- ne2000.dos (some network card file)
- nemm.dos
- net.doc (I just made this up - it is the totallity of help topics from net.exe)
- net.exe (this is the executable which does _everything_ net wise.)
- net.msg
- netdde.exe
- netddex.exe
- neth.msg
- networks
- nmtsr.exe
- protman.dos
- protman.exe
- protocol.ini
- services (similar to Unix file of same name, I am not sure it is ever needed)
- shares.bat (a batch file to find out what share is assigned to what hard drive letter; just the following two statements.. "c:\network\net use; pause")
- share000.pwl
- shares.pwl
- system.ini
- tcpdrv.dos
- tcptsr.exe
- tcputils.ini
- tinyrfc.exe
- umb.com
- wfwsys.cfg
I persume that you use the same configuration for all the networking cards on your network, otherwise you might run into problems with some files, cause some of that stuff is recorded as binary by the WfW files, and using these on a DOS box with differing netcards may cause a problem. My use is (always): IRQ 10, I/O port 300h.
A few of the above files need to be altered once they are installed, so that two things are corrected: (1) any references to paths have to be changed from "c:\windows\{filename}" to "c:\network\{filename}" -- and, (2) the new IP number and machine name for the new DOS machine has to be identified in a few places.
Just look through the text files to find them.
Here is a list of most of the items:
- HOSTS
- Looks otherwise the same as a Unix host file. (Have a blank line at the end or WfW fails to read the complete file) Sample (the local network is called "Spaces.org"):
127.0.0.1 localhost 192.168.1.1 gw.spaces.org gw 192.168.1.23 ginger.spaces.org gin 192.168.1.34 heradotus.spaces.org her 192.168.1.45 scheherazade.spaces.org dos etc... # aliased ip numbers for direct connections 66.114.221.37 Outflux.net lucien etc... # web server addresses 66.114.220.101 www.spaces.org 66.114.220.100 muralart.org 66.114.220.100 www.muralart.org- LMHOSTS:
- (Have a blank line at the end or WfW fails to read the complete file) This is the translation for a LanMan server/client, uses only computer names, not the workgroup or domain. For example...
192.168.1.1 gw # linux box 192.168.1.23 gin # win 192.168.1.34 her # win/98 192.168.1.45 sch # dos box etc ..- PROTOCOL.INI:
- NetFiles=C:\NETWORK
Assuming that is where you have relocated these files.DefaultGateway0=192 168 1 1
Need to know this if you have a gateway machine (no dots) (Windows is _so_ weird).IPAddress0=192 168 1 45
(no dots) this is the assigned ip number for the Dos box.SubNetMask= 255 255 255 0
(no dots) We are using network 192.168.1.0 through 193.168.1.255 here (an IP set of numbers used for local networks) the net mask is all of the IP quads except the last quad. You also need "loopback 127" in this file.TcpRetries=1
this reduces the endless time-out to 5 seconds (I think)INTERRUPT=10
whatever IRQ you use for the ethernet cardIOADDRESS=0x300
Also for the ethernet card, I have 0x300 (300 hex)- SYSTEM.INI:
- ComputerName=SCHEHERAZADE
or whatever name you want for the the Dos box.Workgroup=spaces.org
should be the same as the network you are linking tonetwork.drv=wfwnet.drv
under the heading of [boot] - this is for WfW.[boot-desciption] ...
I dont know if you need any of this[386Enh] ...
There are some lines for "netcard" "netMisc"..[network] ...
[network drivers] ...
[Password Lists] ...
Look through all of these sectionYou will not need any of the other sections in SYSTEM.INI which obviously deal only with Windows stuff.
- NETWORKS:
- The file needs the domain name and base ip, plus "localhost" as follows:
loopback 127 spaces.org 192.168.1- TCPUTILS.INI:
- [tcpglobal] hostname=SHEHERAZADE
Username, file location, hostname.- CONFIG.SYS:
- DEVICE=C:\NETWORK\IFSHLP.SYS
- AUTOEXEC.BAT:
- (at the very start)
C:\NETWORK\NET START C:\NETWORK\UMB C:\NETWORK\TCPTSR C:\NETWORK\TINYRFC C:\NETWORK\NMTSR.EXE C:\NETWORK\EMSBFR.EXE c:\network\net logon /yesThe "logon" parameter for the net.exe file will do the initial connection to all the shared drives and printers on your network, but will initially use the info from the connect.dat file, which may cause some connections to be attempted which do not exist -- which means you need to wait for it to time out.
There is a possibility of this screwing up if any of the boxes are off line, and the internally set share letters do not match, but changes can be made with the file "net.exe".
In fact, learn a few things about net.exe - it is an undocumented MS executable. Most important is "net use" - which tells you the current connections. It can be used at any time to check what shared drives are connected, and what drive letters they are assigned to.
To connect to a new client, type "net" just by itself. A box will pop up. type the name of the box you want a connection to, and the harddrive letter as "\\{boxname}\c" and select "enter" and "exit" (I think).
To save the current connections so that they will be remade next time you boot up, type "net use /persistent:save".
Once set up, you can access the shared drives as if they are local, alter files, look at things, move them around to other drives, use the network printer.
Only thing is, no-one else will be able to see _your_ local hard drive, because there is no way to offer it as a share - I am stumped on that.
If some box knows what time it really is, you can do:
"c:\network\net time \\gw /set /yes"
Here "gw" is the Linux box; the smb deamon is set up to serve time.Also try "shares.bat" (batch file) to find what is connected.
Rev Nov 2001 /jno
Website Provider: Outflux.net, www.Outflux.net
URL:http://jnocook.net/geek/dos-net.htm