376 lines
14 KiB
HTML
376 lines
14 KiB
HTML
<!--startcut ==========================================================-->
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
|
|
<HTML>
|
|
<HEAD>
|
|
<title>Where Nothing Else Will Do LG #28</title>
|
|
</HEAD>
|
|
<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#A000A0"
|
|
ALINK="#FF0000">
|
|
<!--endcut ============================================================-->
|
|
|
|
<H4>
|
|
"Linux Gazette...<I>making Linux just a little more fun!</I>"
|
|
</H4>
|
|
|
|
<P> <HR> <P>
|
|
<!--===================================================================-->
|
|
|
|
<center>
|
|
<H1><font color="maroon">Where Nothing Else Will Do</font></H1>
|
|
<H4>By <A HREF="mailto:chris.gonnerman@usa.net">Chris Gonnerman</A></H4>
|
|
</center>
|
|
<P> <HR> <P>
|
|
|
|
<H3>Introduction</H3>
|
|
|
|
<P>
|
|
Long, long ago I was hired for my first paying job, working on a Tandy 16B running XENIX.
|
|
It had about a meg of RAM (if I remember right), a total of 30 Mb of hard drive
|
|
(two 15 Mb SCSI-1 external drives), and it actually served three users at the same time!
|
|
|
|
<P>
|
|
Some years later I joined the Air Force, and because I knew Unix (and liked it),
|
|
I was assigned to program and administer a pair of Unix-based Motorola computers.
|
|
Wow! Four meg of RAM, 60 Mb of hard disk, and 32 serial ports each,
|
|
running Unix System V Release 3. I thought I was in heaven!
|
|
(Note, Windows 3.0 was just about to be released...)
|
|
|
|
<P>
|
|
Well, to make a long story short, several years later I have my own company,
|
|
New Century Computers, selling and servicing Intel and compatible PC equipment.
|
|
Most of these computers run Windows 95, and while I
|
|
have always liked the interface, I have always missed Unix.
|
|
The Motorola's I worked with were shut down every six months
|
|
(whether they needed it or not) and cleaned and serviced.
|
|
Crashes? Only in the early stages, when we were debugging the vendor's tape drivers.
|
|
|
|
<P>
|
|
I don't remember when I first heard of Linux, but after browsing the book section at WaldenBooks
|
|
I bought "Linux SECRETS" by Naba Barkakati (printed by IDG Books).
|
|
I installed Linux on a spare 486 and played around with it.
|
|
Still, my customers want Windows, so I sell them Windows.
|
|
|
|
<P>
|
|
But sometimes, Linux is the only choice. Nothing else will do.
|
|
|
|
<P>
|
|
<HR>
|
|
|
|
<H3>Evil DOS Programs</H3>
|
|
|
|
<P>
|
|
One of my oldest customers is the Juvenile Office in Adair County, Missouri.
|
|
When the chief Juvenile Officer called me one day and said he needed to run
|
|
Lotus Notes on his network, I started sweating bullets.
|
|
|
|
<P>
|
|
A few years ago (before I started doing business with them),
|
|
the JO purchased a custom written DOS program called "Juvenile Court Records."
|
|
The programmer wrote it using the Clarion database manager, and he was not much of a programmer.
|
|
They ran it on a LANtastic network.
|
|
|
|
<P>
|
|
This "evil DOS program" <EM>requires</EM> 615Kb of conventional memory.
|
|
It actually only runs right in 620 or more Kb. They did this under DOS using a QEMM
|
|
(the Quarterdeck Expanded Memory Manager) feature called VIDRAM.
|
|
VIDRAM remaps the color text screen to the monochrome address range,
|
|
and adds the color text memory region to the conventional memory pool,
|
|
resulting in 784 Kb of total conventional RAM.
|
|
After DOS boots and the LANtastic TSR's load, they still had 630 Kb or so.
|
|
|
|
<P>
|
|
Anyway, this program <EM>will not</EM> run under Windows 95.
|
|
No way, no how.
|
|
Windows 95 will never allow enough conventional RAM, and VIDRAM won't work there
|
|
(blows up very nicely). I knew this, and so I began to sweat bullets.
|
|
What Mike (the chief Juvenile Officer) expected to see was a Windows 95 window with JCR
|
|
in it on the same screen as a Lotus Notes window.
|
|
|
|
<P>
|
|
Why is keeping JCR running so important?
|
|
First, because all of their records regarding the disposition of juvenile cases
|
|
for the last five or six years are in it.
|
|
We can't get the Clarion source code; the programmer has evaporated.
|
|
We could probably rewrite the program from scratch, but the State of Missouri
|
|
(Office of State Courts Administrator, or OSCA) has stated that they will be providing
|
|
a case-management program "in about two years."
|
|
Spending to rewrite the program would cost more than keeping it running (at this point),
|
|
and would be wasted money when OSCA delivers their solution.
|
|
So, they are stuck with this boat-anchor program.
|
|
|
|
<P>
|
|
Enter Linux.
|
|
I had been searching for an answer for most of a month when I remembered
|
|
<a href="http://www.dosemu.org">DOSEMU</a>.
|
|
I fired up XDOS on my Linux box and looked at the conventional RAM total.
|
|
|
|
<P>
|
|
627Kb free. Hallelujah!
|
|
|
|
<P>
|
|
We sold them a new file server, a Pentium 166 with 16 Mb RAM, running Debian Linux.
|
|
I installed DOSEMU 0.66.7, straight from the CD, and then configured it with Windows 95 DOS.
|
|
While OpenDOS is supposed to get an extra K free (628 Kb),
|
|
since Windows 95 comes with a new system, I just used it.
|
|
After SYSing the diskimage with Win95, I basically installed the minimum DOS commands
|
|
needed to run the JCR program and work with the filesystem.
|
|
I copied the EXITEMU command to the names LOGOUT and LOGOFF.
|
|
I also set up "conventional" file sharing via
|
|
<a href="http://samba.anu.edu.au/samba">Samba</a>.
|
|
Then the work began.
|
|
|
|
<P>
|
|
First, several DOS machines had to be upgraded to Windows 95,
|
|
which of course required RAM for most, hard drives for some,
|
|
and new mainboards for a few.
|
|
To access the server from these Windows 95 machines,
|
|
we elected to use
|
|
<a href="http://www.ncd.com">NCD</a> <a href="http://www.ncd.com/ppcx/ppcx.html">PC-Xware</a>.
|
|
Of all the commercial X Servers for Windows 95, it is the simplest (and cheapest) I have found.
|
|
It makes "shortcut" icons for connections automatically
|
|
after you go through the Connection Wizard, and it works well with XDM.
|
|
|
|
<P>
|
|
As an aside, telnet would have worked, but getting a usable color telnet is hard.
|
|
The JCR program is written like many DOS programs, using a broad range of colors.
|
|
XDOS over PC-Xware also makes all the function keys work.
|
|
|
|
<P>
|
|
Now, Mike (and the other JO employees) can see Lotus Notes and the JCR program at the same time,
|
|
on the same system. No rebooting.
|
|
The total price tag for PC-Xware was higher than the cost of the equipment,
|
|
but the customer is happy.
|
|
|
|
<P><HR>
|
|
|
|
<H3>Unexpected ISP Problems</H3>
|
|
|
|
<P>
|
|
The Paris R-II School District (in Paris, Missouri; I'm not international yet)
|
|
is another regular customer.
|
|
In the High School, they have a well-stocked lab of Windows 95 computers
|
|
with a Windows NT 3.51 server.
|
|
<a href="http://www.more.net">MORENet</a>,
|
|
a state contractor, provides them Internet service at a subsidized rate,
|
|
and the High School and Elementary are connected via fiberoptics.
|
|
The whole Internet connection setup was a bargain (as these things go)
|
|
since the school district received a lot of donated labor and discounted materials.
|
|
|
|
<P>
|
|
Unfortunately, the Junior High is across town.
|
|
After looking into leasing a line between the two locations,
|
|
and considering even radio frequency networking,
|
|
the Superintendent hit upon a better idea.
|
|
He approached several ISP's in neighboring towns (Paris had no ISP at that time)
|
|
and offered them co-location on school district property.
|
|
One of them,
|
|
<a href="http://www.mcmsys.com">MCM Systems</a> in Moberly, Missouri agreed:
|
|
In return for unlimited free rent of a closet,
|
|
the Junior High would receive unlimited free Internet access.
|
|
MCM Systems installed a dial-up router in the closet of the Band Room
|
|
and we ran Ethernet cable from there to the Computer Lab.
|
|
MCM is providing Internet access in the Paris area
|
|
for the cost of the leased line and equipment only,
|
|
and they are happy (as far as I can tell).
|
|
|
|
<P>
|
|
So, I arrived one day to set up the Computer Lab.
|
|
After installing all the net cards and connecting everything,
|
|
I called MCM Systems to get the IP address range we were to use.
|
|
|
|
<P>
|
|
The tech I spoke to informed me that we had a range of ten IP addresses available.
|
|
Oops. In the Junior High they already had about 25 computers to connect to the Internet.
|
|
We had a problem.
|
|
|
|
<P>
|
|
This time it took me only a few minutes to decide on Linux.
|
|
My mandate was to "make it work," and outside of the costs
|
|
already bid the district didn't have a lot of money to spend to do it.
|
|
I selected a computer in the Junior High lab with a Pentium 75 mainboard,
|
|
transferred a larger (1.6 Gb) hard drive from another computer,
|
|
and started installing Slackware Linux.
|
|
I copied a full install set from the Internet to a DOS partition on the 1.6 Gb drive,
|
|
created and booted from the boot/root set, and got to work setting everything up.
|
|
|
|
<P>
|
|
Naturally the whole purpose of this exercise was to use IP Masquerade,
|
|
and this was my first time using this feature.
|
|
I installed a second NE2000 compatible,
|
|
set up a private network address (10.0.0.1) on the "inside" network adapter,
|
|
and the first assigned Internet address on the "outside" adapter.
|
|
So far, so good.
|
|
I tested the installation from a Windows 95 computer using 10.0.0.2
|
|
(assigned through the network control panel), and it worked great!
|
|
|
|
<P>
|
|
The problem started when I installed
|
|
<a href="http://www.isc.org">ISC (Internet Software Consortium)</a>
|
|
dhcpd and tried to set it up.
|
|
It configured and compiled fine, and I set the broadcast route as described in the README,
|
|
but when I tried to start it I got an error message:
|
|
|
|
<p>
|
|
|
|
<table border=0>
|
|
<tr><td width=30> </td>
|
|
<td>
|
|
|
|
<table>
|
|
<tr>
|
|
<td>
|
|
<samp>
|
|
The standard socket API can only support hosts<br>
|
|
with a single network interface. If you must run<br>
|
|
dhcpd on a host with multiple interfaces, you must<br>
|
|
compile in BPF or NIT support. If neither option<br>
|
|
is supported on your system, please let us know.<br>
|
|
</samp>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
|
|
</td></tr>
|
|
</table>
|
|
|
|
<P>
|
|
I did some research, and learned that in this version of dhcpd,
|
|
any system lacking Berkley Packet Filter and Network Interface Tap technology
|
|
(such as Linux) can't run dhcpd with more than one network interface (PPP and SLIP excepted).
|
|
I examined the program closely,
|
|
and hacked it to hard-code the interface name I wanted to support.
|
|
After all, I didn't <STRONG>want</STRONG> to support both interfaces;
|
|
the outside interface doesn't need DHCP.
|
|
|
|
<P>
|
|
Later, in the privacy of my office, I tore apart another copy of dhcpd.
|
|
Instead of hard-coding the interface name, I added a command to the dhcpd.conf file.
|
|
I also refined the lease-time format. Here is a sample:
|
|
|
|
<p>
|
|
|
|
<table border=0>
|
|
<tr><td width=30> </td>
|
|
<td>
|
|
|
|
<table>
|
|
<tr>
|
|
<td>
|
|
<U><STRONG>dhcpd.conf</STRONG></U>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<samp>
|
|
server-identifier 10.0.0.10;<br>
|
|
interface "eth0";<br>
|
|
<br>
|
|
subnet 10.0.0.0 netmask 255.0.0.0 {<br>
|
|
option domain-name "paris.mcmsys.com";<br>
|
|
default-lease-time 3 days 12 hours;<br>
|
|
max-lease-time 7 days;<br>
|
|
option subnet-mask 255.0.0.0;<br>
|
|
range 10.0.1.20 10.0.1.250;<br>
|
|
}</samp>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
|
|
</td></tr>
|
|
</table>
|
|
|
|
<P>
|
|
Previously, the *-lease-time commands used a single number, as seconds, as in:
|
|
|
|
<p>
|
|
<table border=0>
|
|
<tr><td width=30> </td>
|
|
<td>
|
|
|
|
<table>
|
|
<tr>
|
|
<td>
|
|
<samp>
|
|
default-lease-time 302400;
|
|
</samp>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
|
|
</td></tr>
|
|
</table>
|
|
|
|
<P>
|
|
I think my way is more readable.
|
|
|
|
<P>
|
|
Later still I took this code to the school and implemented it.
|
|
It worked fine, so I called the installation done.
|
|
For the cost of labor and one extra net card,
|
|
we converted a workstation into a capable server and solved an Internet connection problem.
|
|
|
|
<P>
|
|
We are running <a href="http://www.apache.org">Apache</a>
|
|
on that system now, not so much for web services as for its web proxy.
|
|
Twenty-five students on a single 56Kbps line is kind of slow,
|
|
but with the proxy the performance is acceptable.
|
|
It is also used as a file server via Samba.
|
|
|
|
<P>
|
|
I submitted my dhcpd patches to ISC,
|
|
and received an email back from Ted Lemon telling me that my patch
|
|
doesn't do what I think it does.
|
|
Hmm.
|
|
So I studied his explanation and concluded that my patch is not a good all-around solution.
|
|
However, the BPF/NIT problem with Linux has apparently been fixed somewhere along the line,
|
|
and ISC's version 2.0 dhcpd (now in final beta) handles it.
|
|
I highly recommend ISC's dhcpd; it seems solid (even the pre-1.0.0 beta I originally used).
|
|
|
|
<P>
|
|
I have also uploaded my patches to Sunsite, as dhcpdpatch-1.0.0.tar.gz,
|
|
in case someone would like to try the *-lease-time feature.
|
|
|
|
<P><HR>
|
|
|
|
<H3>When Linux is the Best Choice</H3>
|
|
|
|
<P>
|
|
I love Linux.
|
|
I am addicted to the features, the power, and the configurability.
|
|
I especially like that I can work directly with the source for almost any program,
|
|
fixing bugs and adding features as I need or want to.
|
|
|
|
<P>
|
|
The power of Linux is flexibility, stability, and economy...
|
|
the ability to run a <STRONG>real</STRONG> OS on older or inexpensive hardware.
|
|
|
|
<P>
|
|
For my average customer (home users and small businesses with a single computer),
|
|
Linux is not presently the best choice.
|
|
These users don't have the depth of understanding to work with Linux as we do.
|
|
(Frankly, few of them have any real understanding of Windows 95 either).
|
|
The average user expects to be able to purchase <STRONG>anything</STRONG>
|
|
off the shelf at Wal-Mart and have it work for them.
|
|
Someday, maybe, Linux will be a good choice for these users,
|
|
if we (the entire Linux community) keep supporting and improving it.
|
|
|
|
<!--===================================================================-->
|
|
<P> <hr> <P>
|
|
<center><H5>Copyright © 1998, Chris Gonnerman <BR>
|
|
Published in Issue 28 of <i>Linux Gazette</i>, May 1998</H5></center>
|
|
|
|
<!--===================================================================-->
|
|
<P> <hr> <P>
|
|
<A HREF="./index.html"><IMG ALIGN=BOTTOM SRC="../gx/indexnew.gif"
|
|
ALT="[ TABLE OF CONTENTS ]"></A>
|
|
<A HREF="../index.html"><IMG ALIGN=BOTTOM SRC="../gx/homenew.gif"
|
|
ALT="[ FRONT PAGE ]"></A>
|
|
<A HREF="./vermeer2.html"><IMG SRC="../gx/back2.gif"
|
|
ALT=" Back "></A>
|
|
<A HREF="./lg_backpage28.html"><IMG SRC="../gx/fwd.gif" ALT=" Next "></A>
|
|
<P> <hr> <P>
|
|
<!--startcut ==========================================================-->
|
|
</BODY>
|
|
</HTML>
|
|
<!--endcut ============================================================-->
|