post image is Old Modem Front by Rex Roof

DOS Networking

Now that we've got MS-DOS installed and booting properly, we need to copy a few things from our previously prepared dist/ directory somewhere onto our machine's system drive.  Since DOS is DOS, the beautiful thing is we can put them wherever and nothing will care.

So, first we'll need the bare bones of the DOS networking stack, a strange little program called the packet driver (from the crynwr collection, Qemu emulates the venerable NE2000 card) and something known to everybody who ever ran a BBS: the FOSSIL driver (rlfossil):

C:\> mkdir packet
C:\> cd packet
C:\PACKET> copy d:pktd11ne2000.com .
C:\PACKET> copy d:rlfossil*.* .

Now we've got that finished, we need to move on to the one thing that used to make everyone's skin crawl:

TCP/IP Configuration

Since we're not going to have the luxury of DHCP or anything automatic here (we're working with tools old enough to be in high school, remember) we need to figure out how our virtual machine's going to interact with the world.  This is the IP address that we'll consider in the TAP interface we create further along.  I stuck with an internal address on a subnet out in the grass, and here's how:

C:\PACKET> edit wattcp.cfg

It's really not as intimidating as it looks as you can see from my settings.

This should be fairly obvious my_ip is the virtual machine's IP as it would appear to the outside world, netmask for that IP, the gateway to outside and a name server.  The hostname and domainslist don't really matter, nothing we're going to do uses domain names.

Did it work?

Let's find out.  Execute the following commands in the following order and see what it says:

C:\PACKET> ne2000 0x60 11 0xc100
C:\PACKET> rlfossil

Top to bottom: FOSSIL driver error output, ne2000 initializing, rlfossil finding driver

The first command is only an example to show what happens when the FOSSIL driver tries to load before the packet driver.  This will be avoided by finishing our DOS setup in the next step:

Making It Automatic

To make our changes automatic, we edit autoexec.bat, blank out what's there and replace it with this:

@echo off
path c:\dos
cd \packet
ne2000 0x60 11 0xc100

And we also have to make a few simple changes to config.sys as well, so edit config.sys, blank it and:


After these changes, it we restart our system (Ctrl-Alt-2, system_reset at the (qemu) prompt, Ctrl-Alt-1) we should see something mostly like the image above.

Heads Up

If you're not interested in the whole BBS aspect of this tutorial and were only interested in getting the internet working on a DOS machine, this is where we part ways.  90% of DOS based internet applications use packet drivers so it's just a matter of configuring the application's TCP/IP stack to use the same information we put in wattcp.cfg.

If you're running in a virtualized environment, you might want to check out the next section (Host Setup: Networking) to get your DOS machine talking to and accessible by the outside world.