|[Home] [Credit Search] [Category Browser] [Staff Roll Call]||The LINUX.COM Article Archive|
|Originally Published: Wednesday, 29 August 2001||Author: Dave Markowitz|
|Published to: learn_articles_firststep/General||Page: 1/1 - [Std View]|
Setting Up a Home Computer Lab to Learn Linux Networking
Do you ever wish you could learn Linux networking skills but feel you don't have the time, money or temperament for CS course at college? Yeah, join the club. Many people opt to teach themselves what they need to know. Whatever your reason for setting up a home network it can be an exciting and rewarding project. Linux.com correspondent Dave Markowitz returns to get us started with plenty of tips and tricks for network planning and organization.
So what's a nascent Linux networking guru to do? Easy: set up your own computer lab.
This isn't as hard as it sounds. All you need are the space, hardware, and the software. In this article, I'll discuss each of these so that you too can set up your own lab.
First of all, I'm using the term "computer lab" pretty loosely. While I'd love to have a room all to myself for my computers (not to mention all my other junk), I live with my wife in a one bedroom apartment. Even so, I've carved out enough room so that I can have up to four computers running at once.
The bulk of my work is done on the PCs I have in a computer cart in my bedroom. To conserve space, I use a keyboard-video-mouse (KVM) switch to share these items between two PCs, named Bagend and Gondor. My HP DeskJet 612C sits on the bottom shelf of the cart, between the two PCs. Here's a picture:
My wife also has a PC, named Rivendell, which is in another computer desk in our living room. (Can you tell I'm a Tolkein fan? <g>) For the fourth PC, I sometimes fire up the Dell laptop I have from work, and sit it on my bed.
So, even if you're in cramped quarters, setting up a lab can be done.
The next thing to consider is what hardware you'll need. This can be divided into computers and network gear. Finally, there's the software. I'll examine these in turn.
I recommend that you have at least three PCs in your lab. This will allow you to set up and test a wide variety of network configurations that you cannot create with fewer machines. For example, you can set up a firewall on one box and have an internal LAN on the other two.
It's a good idea to dedicate one machine as your workstation. Once set up, major configuration changes and experimentation should not be done on this box, but rather on the other PCs. This way, you know that you'll always have one functional machine that if all else fails you can use to get online and look up the solution to a fix what you've gotten yourself into. It wouldn't be a bad idea to make this one of your faster machines, since you'll be spending most of your time on it, and many network services, like DNS and DHCP will run fine on slower boxes.
Since you'll be spending a lot of time in front of your main workstation, you should get high quality peripherals. Don't get a cheap keyboard or mouse, and above all don't scrimp on your monitor. All of these devices are likely to outlast several PCs, so buy the best ones you can. For example, I use a Viewsonic GS771 monitor, a Logitech FirstMouse+ wheel mouse, and the keyboard from a Dell 386 that I bought in 1992.
Although Linux can run on minimal hardware, I don't recommend that you go out and pick up some old 486 boxes to use in your lab. While they certainly will run Linux and can be picked up cheap, they will run slowly with modern distributions. And if you have to recompile a kernel, figure it's going to be an all-day affair.
Rather than getting bottom-of-the-barrel hardware, I suggest you get PCs with a minimum of a 200 MHz CPU. That way, they will run at a good speed so you can spend more time learning and less time waiting for something to happen. Such boxes can still be picked up pretty cheaply. The one area where it wouldn't be bad to get slow machine is if you're planning to set up a Linux-based router. Such machines need little horsepower and won't be a handicap in your lab.
You should also put a sufficient amount of RAM in your PCs. For machines that will be running X, figure on at least 64 megs. But RAM has never been so cheap, so there's no time like the present to stock up on it. All of my own PCs have 256 megs of RAM, and the performance boost is noticeable.
A lot of hard disk space is helpful, since depending on the distribution(s) you choose and the amount of software you install, you may wind up needing it. In general, all of your PCs should have at least a 6 gig hard drive, which is small nowadays. The machine where you'll store most of your data should have a larger drive, one of at least 10 gigs, which is still considered small these days.
If you're putting together a PC for you lab, use a fast CD-ROM drive, at least a 32x drive. Many drives these days are 40x or more, and this will help speed up software installation. It's very handy to have CD-RW drive, so you can move downloaded software off your hard disks onto CDs for storage. CDs are also a great way to back up your data. There are many good CD-RW drives out there; I am very happy with my Plextor Plexwriter IDE burner.
A tape drive will allow you to learn tape backup software, but is not necessary otherwise for the home lab if you have another backup medium available. While ZIP drives and LS-120 drives are easy to use, their capacity is too small for backing up large amounts of data. Neither they, nor the larger capacity Jazz drives have the reliability of tape or CD-RW, and are more expensive per megabyte of storage.
As I mentioned above, I use a KVM switch to conserve space. This will also save you money, since you won't have to buy the additional mouse, monitor, and keyboard for each PC, and also in electrical costs for running these additional pieces of equipment. I use a Belkin 2-port Omnicube, which works pretty well. Don't waste your time with cheap mechanical data switches. They wear out after not too much use, and then you'll have to replace them. (Been there, done that, then bought the Belkin.)
You can increase the effective number of PCs in your lab by setting up multiboot systems, and/or using removable hard disks. I have both. Although Gondor is strictly a SuSE 7.2 machine, Rivendell dual boots Windows 2000 Professional with Slackware 7.0, while Bagend had two interchangeable hard disks. One has SuSE 7.2 Professional on it and the other has Trustix Secure Linux. The advantage of the interchangeable disks is that I even though Bagend is currently my main workstation, I can experiment on it without concern for my data by swapping the disks.
If you have a laptop it can be a valuable part of your lab, especially if you also have a CD burner. For example, I have downloaded .ISO CD images for Trustix and Solaris using my employer's high speed Internet access, then transferred them from the laptop's hard drive to Gondor, and then burned them onto CD. Since I only have a 56K modem at home and my employer doesn't mind, this capability is very handy. (Check with your employer before doing this!)
You'll need a network adapter in each PC, and a hub or switch to connect all of the machines to. When choosing network adapters, you don't need to buy top of the line 3Coms or Intels at over $60 a pop. For example, Gondor and Bagend both have D-Link DFE-530TX+ 10/100 NICs which work just fine in Linux, and cost around $20. Rivendell has an onboard Intel 10/100 adapter, but I haven't noticed that it performs any better in my environment than the D-Links.
To complete your network you'll need either a hub or a switch. They both act as a place to connect the other end of the patch cord running from your PC, but a switch is "smarter" than a hub. When an Ethernet packet is sent out from a PC to the network, it is relayed out all of the ports on the hub, even if the packet's destination isn't meant for the PC attached to a particular port. In contrast, a switch builds up a table associating the MAC addresses of connected devices with the appropriate port. The devices attached to a particular port are said to be on a network segment. So, if I'm on a switched LAN and I send a packet from PC-1 on port 1 to PC-2 on port 2, it will be received by the switch and sent only to port 2, rather than sending the packet to all segments. For those familiar with the OSI model of networking, hubs are layer 1 devices, while switches operate on layer 2.
One thing that you will not be able to do with a switch, unless it's fairly high-end and supports port mirroring, is experiment with a packet sniffer or protocol analyzer. On a switched network without port mirroring you won't be able to analyze traffic on devices connected to a network segment different from the one you're on.
When you get your Ethernet cable, make sure to buy category 5 or 5 enhanced (CAT5 or CAT5e). Although CAT3 can be used, it only supports 10 meg connections, except for very short runs, and that's with very high quality CAT3. Basically, CAT5 is required for 100 meg connections. You'll need patch cords wired straight-through to connect your PCs to your hub/switch. Cross-over cables are meant to connect like devices, e.g., one PC directly to another, or two hubs/switches.
The last hardware item you'll need is something to connect you to the outside world. Ideally, you live in an area with broadband -- either DSL or cable mode -- is available. In that case, you need to connect your DSL/cable modem to your LAN into a 10 Megabit per second Ethernet port, either on of your PCs or your hub/switch. You may wish to get a broadband router, which will sit between your LAN and the Internet connection. This can either be a store bought box from Linksys, SMC, or another maker, or a Linux PC with two NICs running a stripped-down version of Linux, e.g., FREESCO. Of course, you can set up a full-blown Linux firewall, but unless you're experienced with that sort of thing, do a bit of learning and experimenting before relying on it.
Not all of us are fortunate enough to live in an area with broadband Internet service. So, dial up access may be the only choice. In that case, you can still use a Linux machine as your LAN's gateway, or you can get an analog router such as the Hawking Technologies iRouter, to which you connect an analog modem. This is the approach I use with my US Robotics 56k external modem. I chose this because the router and modem are smaller and consume less electricity, and sit out of the way up on top of a bookshelf along with my 10/100 switch.
So what software should you buy or download? Obviously at least one Linux distribution, and if you get one that includes a lot of software, you can save yourself a lot of time tracking down stuff that you need. I recommend that you try more than one distribution and find the one that best suits your needs. I have used Slackware, Red Hat, Mandrake, Trustix and SuSE. I currently run SuSE 7.2 Professional as the OS on my main workstation, and I've found that it gives me a very comprehensive, useful and stable set of software.
You should include non-Linux OSes in your lab mix. Like it or not, Microsoft Windows is the dominant desktop OS. Having a Windows box on your network can help you learn things like Samba, Win32 X servers and NFS clients. Similarly, installing other UNIXes such as Solaris or FreeBSD can help broaden your knowledge base. This is important, because most network environments are heterogeneous. The broader your knowledge base, the more employable you are.
Hopefully, this piece has given you some ideas on setting up your own home computer lab for learning Linux networking. Now get to it, set up your lab, and start on your journey to becoming a Linux guru!
Dave Markowitz (firstname.lastname@example.org) is a Field Systems Engineer with a broadband ISP in southeastern Pennsylvania, and considers himself lucky to be able to work with Linux on a daily basis. He has a Linux-related website at http://www.building-tux.com. This is his third piece for Linux.com.