| Grabber Softwares : Enhance Your Computing |
| Router
on a floppy
Turn any old 386 or 486 into a
router and Internet gateway for your network
Installing the basic router is a piece of cake once you figure out how. The first thing you discover is that there isnt as much documentation. More importantly, there are no "step-by-step" setup instructions to get you going. There is an "Idiot" setup, which works, but you will probably need to customize it further to your needs. Additionally, several important steps in the setup, such as adding functionality (through additional packages), arent documented anywhere but on the mailing list. Setting up Creating an LRP disk doesnt require you to have a Linux system available. You can create it entirely from within DOS or Windows. You will additionally need a "zip" and "tar" utility to extract the files. WinZip (on the CD-ROM) will do both. If you choose to use the Idiot install, then it is simply a matter of using the supplied "rawrite2.exe" to copy the disk image to a floppy for an instant start. But before we start, heres a warning: Be sure to have brand new, freshly formatted floppies before you begin. Save yourself hours of frustration by not trying to use old dusty floppies. Find out the exact model, name and IRQ and I/O settings for your network adapter(s). If you are using PCI plug-n-play cards, you are not likely to have a problem. Even so, its better to have the details written down somewhere. In the case of old ISA adapters, you will have to configure them beforehand to eliminate any potential conflicts. Usually these cards have a DOS utility to save the configuration to EEPROM. Installing the Idiot way Copy the file CDROM:\cdrom\Linux \router\software\utils\rawrite2.exe to a directory in your path, such as C:\win dows\command. Cd to the directory CDROM:\ cdrom\Linux\router\software, and type in: rawrite2 idiot.image-2.9.3- If youre doing this in DOS mode, you will have to substitute the short name "idiot~1.44m". Once the file has finished copying, you have a fully usable LRP floppy, though at this point, without networking support. Now use WinZip (if youre in Windows) to extract the appropriate modules for your network adapter(s) from the archive CDROM:\cdrom\Linux\ router\software\kernel\kernel-36pre2-1.tar.gz and copy those to the LRP floppy. Overwrite the existing "modules.lrp" file on the floppy with the file from CDROM:\cdrom\Linux\router\software \base Now you have your disk ready.
The "roll-your-own" way If you want to choose your own components, heres how to go about doing it. Extract the file "syslinux.com" from the archive CDROM:\cdrom\Linux\ router\software\utils\syslinux-1.40.zip., and copy it to a directory in your path. Put a DOS formatted floppy in the drive, and syslinux -s a: Now extract the kernel archive CDROM:\cdrom\Linux\router\software\ kernel\kernel-36pre2-1.tar.gz There are two stock kernels available, one with FPU emulation (if you have a 386/486 SX), copy the kernel of your choice to the floppy drive as "Linux". Now CD to the base subdirectory, and copy the files "etc.lrp", "root.lrp", and "modules.lrp" to the floppy disk. If you want to enable logging, copy the file "log.lrp" as well. From the boot directory, copy the files "syslinux.dpy" and "syslinux.cfg". Your disk is ready. Before we progress, its a good time to read the accompanying HTML docs on the CD. Configuring the router Now that you have the floppy ready, its time to configure your router. Take your floppy over to the machine you want to use as your router, (which we assume doesnt have niceties such as a CD-ROM or hard drive. You will need a keyboard and monitor initially), and boot it. To start with, networking will not be initializedyou still have to configure it. Login as "root" when prompted, and you will be presented with a simple menu interface to configure the system, networking, and modules. Select "Networking configuration" from the menu. You can edit all the system networking files from here. The first itemIPs, routes,
ipfwadmallows you to specify how many network interfaces you have and their IP
addresses. You also specify ipfwadm and IP masquerading rules. Further down the file you will see entries prompting you to add static routes, gateways, etc. If youre lost at this point, its strongly suggested that you read the Linux Net-HOWTOs (http://metalab.unc.edu/LDP/) before you attempt to go any further. Next edit the file /etc/hosts to give yourself a machine name and domain name. We named our router "shoebox", because thats what it would fit in. Similarly, add entries for which networks your machine will belong to in the "networks" file. Edit "hostname" to give your machine a hostname, "resolv.conf" to add nameservers for your domain and "gateways" to specify gateways for routed (if necessary). Once you have set up the networking options, press "q" to return to the main menu, and select "System". Here, you can edit the securetty, syslog, inetd.conf, and inittab configuration files if you want. All of them worked fine with default values in our case. Finally, select the "modules" option from the main menu, and uncomment the entry corresponding to the ethernet drivers for your network card(s). When editing the modules file, it is important to list the modules in the order in which they are to be loaded. If module "B" is dependent on module "A", then module "A" must come before module "B" in the list. If you need to specify parameters to the modules, you may do so. For example, "ne io=0x330, 0x350" When you are done, press "q" repeatedly to exit to the command prompt. Immediately secure "root" with a password. Create a "/mnt" directory in the root,
and mount the floppy drive Type "insmod /lib/modules/module name.o <paramters>" to load the modules. If all goes well, you will see a message notifying you that the drivers have been loaded. If not, you may have to specify additional parameters for your module. At this stage, you should back up your root to the floppy. Unmount the floppy with "umount /mnt". Type "lrcfg" to return to the menu, and press "b" to begin writing your configuration to the floppy. Once it is finished, exit the menu, and reboot the system with "reboot". When the system boots the next time, you should be prompted with a login prompt "shoebox login:" (or whatever you call it). Type "ifconfig" to see a list of active network interfaces. You can then try pinging other machine and from other machines. Since the routing tables are created by default, you should be able to ping across subnets. If not, check your routing tables with the command "netstat nr". Setting up the gateway To set up the machine as a PPP gateway (a Web connection sharing device) to the Internet using ISDN or modem, you need to add the "ppp.lrp" package to the floppy from the "packages" subdirectory on the CD-ROM. Then edit the file "syslinux.cfg" and add the entry "ppp" at the end. The end of the file will now look like this: append=load_ramdisk=1 initrd=root.lrp initrd_archive=minix ramdisk_size=4096 root=/dev/ram0 boot=/dev/fd0,msdos LRP=etc,log,modules, ppp If you have not set up ppp on a Linux system before, read the article in the May issue. The ppp configuration files such as /etc/ppp/options, can be edited from the menu. Now you will have to include the modules for header compression slhc.o, ppp ppp.o, and serial interfaces "serial.o". Again, these files will need to be copied from the kernel archive in to the directory /lib/modules. Run lrcfg to edit the modules file and add entries for the three modules in the order serial.o, slhc.o, ppp.o. Now manually install the modules using insmod. Back up your root image, and connect to the Net using: pppd connect chat -v "" ATDT3334000 CONNECT "" sername USERNAME assword PASSWORD /dev/ttySX 115200 debug crtscts defaultroute If you have trouble connecting, you can monitor the progress of the call from the /var/log/messages file (provided you have enabled logging). A stripped version of minicom is available on the CD-ROM as well, if you wish to use that to establish your connections. You can easily customize the router for your needs, such as using a high capacity boot disk (a 100 MB Zip disk), adding memory to increase the size of the default ram disk, and adding any and as many packages as you can fit in. You will find several add-ons and packages on this months CD-ROM. The router makes an ideal replacement for hardware such as PowerTel Bocas WebRamp, especially when used with an ISDN connection. The router and gateway that you just got going will cost about Rs 4,000 even if you were to buy it.
|