📄 Page
1
J O H N R O S S N E T W O R K K N O W - H O W A N E S S E N T I A L G U I D E F O R T H E A C C I D E N T A L A D M I N
📄 Page
2
(This page has no text content)
📄 Page
3
NETWORK KNOW-HOW
📄 Page
4
We are in great haste to construct a magnetic telegraph from Maine to Texas; but Maine and Texas, it may be, have nothing important to communicate. —Henry David Thoreau, Walden
📄 Page
5
NETWORK KNOW-HOW A n E s s e n t i a l G u i d e f o r t h e A c c i d en t a l A d m i n by John Ross San Francisco
📄 Page
6
NETWORK KNOW-HOW. Copyright © 2009 by John Ross. All rights reserved. No part of this work may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying, recording, or by any information storage or retrieval system, without the prior written permission of the copyright owner and the publisher. 13 12 11 10 09 1 2 3 4 5 6 7 8 9 ISBN-10: 1-59327-191-3 ISBN-13: 978-1-59327-191-6 Publisher: William Pollock Production Editor: Kathleen Mish Cover and Interior Design: Octopod Studios Developmental Editor: Tyler Ortman Technical Reviewer: Mike Kershaw Copyeditors: Eric Newman and LeeAnn Pickrell Compositor: Riley Hoffman Proofreader: Rachel Kai Indexer: Sarah Schott For information on book distributors or translations, please contact No Starch Press, Inc. directly: No Starch Press, Inc. 555 De Haro Street, Suite 250, San Francisco, CA 94107 phone: 415.863.9900; fax: 415.863.9950; info@nostarch.com; www.nostarch.com Library of Congress Cataloging-in-Publication Data: Ross, John, 1947- Network know-how : an essential guide for the accidental admin / John Ross. p. cm. Includes index. ISBN-13: 978-1-59327-191-6 ISBN-10: 1-59327-191-3 1. Home computer networks. 2. Computer networks--Management. I. Title. TK5105.75.R667 2009 004.6--dc22 2008052768 No Starch Press and the No Starch Press logo are registered trademarks of No Starch Press, Inc. Other product and company names mentioned herein may be the trademarks of their respective owners. Rather than use a trademark symbol with every occurrence of a trademarked name, we are using the names only in an editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the trademark. The information in this book is distributed on an “As Is” basis, without warranty. While every precaution has been taken in the preparation of this work, neither the author nor No Starch Press, Inc. shall have any liability to any person or entity with respect to any loss or damage caused or alleged to be caused directly or indirectly by the information contained in it.
📄 Page
7
B R I E F C O N T E N T S Acknowledgments ....................................................................................................... xiii Introduction ...................................................................................................................xv Chapter 1: How a Network Will Improve Your Life .............................................................1 Chapter 2: Types of Network Connections .........................................................................9 Chapter 3: Hubs, Switches, and Routers ..........................................................................27 Chapter 4: How Computer Networks Are Organized ........................................................35 Chapter 5: Designing Your Network................................................................................47 Chapter 6: Installing the Network Control Center and Ethernet Cables.................................55 Chapter 7: Ethernet Network Interfaces............................................................................69 Chapter 8: Wi-Fi Networks ............................................................................................77 Chapter 9: File Servers ..................................................................................................93 Chapter 10: Connecting Your Network to the Internet......................................................107 Chapter 11: Connecting Your Computer to a Network ....................................................117 Chapter 12: Sharing Files Through Your Network ...........................................................131 Chapter 13: Network Security ......................................................................................151 Chapter 14: Printers and Other Devices on Your Network................................................191
📄 Page
8
vi Br ief Con ten ts Chapter 15: Other Things You Can Connect to Your Network: Audio, Video, Home Entertainment, and Beyond .................................................................................203 Chapter 16: Other Network Applications.......................................................................225 Chapter 17: Troubleshooting ........................................................................................239 Index .........................................................................................................................253
📄 Page
9
C O N T E N T S I N D E T A I L ACKNOWLEDGMENTS xiii INTRODUCTION xv 1 HOW A NETWORK WILL IMPROVE YOUR LIFE 1 What’s a Network? .................................................................................................. 2 Sneakernet .............................................................................................................. 3 Data Networks and What You Can Do with Them ........................................................ 4 File Sharing ................................................................................................ 5 Sharing an Internet Connection ..................................................................... 6 Instant Messages ......................................................................................... 7 Sharing Printers and Other Hardware ............................................................ 7 Home Entertainment .................................................................................... 7 Video Cameras and Home Security Devices ................................................... 8 Home Automation ....................................................................................... 8 2 TYPES OF NETWORK CONNECTIONS 9 Packets and Headers .............................................................................................. 11 Error Checking .......................................................................................... 13 Handshaking and Overhead ...................................................................... 13 Ethernet ................................................................................................................ 14 Wi-Fi .................................................................................................................... 16 Powerline Networks ................................................................................................ 16 Other Alternative Wiring Methods ............................................................................ 17 DTE and DCE Equipment ......................................................................................... 18 Point-to-Point Networks ............................................................................................ 19 Ad Hoc Wi-Fi ........................................................................................... 20 Infrared .................................................................................................... 20 FireWire (IEEE 1394) ................................................................................ 21 Connections Through a Telephone Line ..................................................................... 21 Remote Terminals ................................................................................................... 23 Clients and Servers ................................................................................................. 23 3 HUBS, SWITCHES, AND ROUTERS 27 Hubs and Switches ................................................................................................. 28 Hubs ....................................................................................................... 29 Switches .................................................................................................. 30
📄 Page
10
viii Conten t s in Detai l LANs and WANs ................................................................................................... 31 Bridges and Routers ............................................................................................... 32 Combination Boxes ................................................................................................ 33 4 HOW COMPUTER NETWORKS ARE ORGANIZED 35 TCP/IP Networks .................................................................................................... 36 Names and Addresses ............................................................................... 36 Network Tools ....................................................................................................... 41 IPConfig ................................................................................................... 41 ifconfig .................................................................................................... 43 ping ........................................................................................................ 43 TraceRoute ............................................................................................... 44 5 DESIGNING YOUR NETWORK 47 Identifying Current and Future Nodes ....................................................................... 48 The Control Center ................................................................................................. 50 Home Run Wiring ..................................................................................... 51 Trunks and Branches: Using Secondary Switches .......................................... 53 What About Wi-Fi? ................................................................................................ 54 6 INSTALLING THE NETWORK CONTROL CENTER AND ETHERNET CABLES 55 Connectors, Wall Plates, and Surface Boxes .............................................................. 55 Ethernet Cable ....................................................................................................... 56 Pushing Cable Through Walls .................................................................................. 57 The Control Center ................................................................................................. 58 AC Power ................................................................................................ 61 Modems, Routers, and Switches .................................................................. 62 Adding a DSL or Cable Connection ............................................................. 64 Terminating the Network Cables ................................................................. 66 Adding a Telephone .................................................................................. 67 Tabletop Control Centers for Small Networks ............................................................. 67 7 ETHERNET NETWORK INTERFACES 69 Built into the Motherboard ....................................................................................... 70 Setting the BIOS Utility ............................................................................... 71 Adding a Network Interface to an Old Computer ....................................................... 72 Internal Expansion Cards ........................................................................... 72 USB Adapters ........................................................................................... 73 Network Adapters for Laptops .................................................................... 73 Finding the Driver Software for Your Adapter ............................................... 74 Status Lights on Network Adapters ........................................................................... 75
📄 Page
11
Conten ts in Detai l ix 8 WI-FI NETWORKS 77 Types of Wi-Fi Networks ......................................................................................... 78 Operating Channels ............................................................................................... 79 Access Points ......................................................................................................... 80 Network Interface Adapters ..................................................................................... 81 Adapters Built into Laptops ......................................................................... 81 PC Cards ................................................................................................. 82 USB Adapters .......................................................................................... 83 PCI Cards ................................................................................................ 84 Antennas .................................................................................................. 84 Wi-Fi Control Programs ........................................................................................... 85 Access Point Configuration Programs ........................................................... 85 Wireless Connection Programs ................................................................... 87 Hybrid (Wired-Wireless) Networks ........................................................................... 89 Wi-Fi Security ........................................................................................................ 89 9 FILE SERVERS 93 Choosing a Computer to Use as a File Server ............................................................ 94 Windows, Mac, Linux, or . . . ? ............................................................................... 94 Using a Server for File Storage ................................................................................ 96 Using Network-Attached Storage ............................................................................. 97 USB Device Servers ................................................................................... 99 Apple’s AirPort Extreme ............................................................................. 99 Backing Up Files to a Server .................................................................................. 100 The Windows Backup Program ................................................................. 101 Macintosh Backup Programs ..................................................................... 103 Linux and Unix Backups ........................................................................... 104 Using a Server at Home ........................................................................................ 105 10 CONNECTING YOUR NETWORK TO THE INTERNET 107 The Internet: From the Cloud to You ........................................................................ 108 The Modem ............................................................................................ 108 The Gateway Router ................................................................................ 109 Individual Computers ............................................................................... 110 Configuring the Network Gateway ......................................................................... 115 Summary ............................................................................................................. 115 11 CONNECTING YOUR COMPUTER TO A NETWORK 117 Connecting Your Windows Computer to a Network ................................................. 118 Creating a New Network Profile ............................................................... 118 Changing Your Computer’s Network Settings ............................................. 122 Connecting Your Macintosh Computer to a Network ................................................ 124 Connecting Your Linux or Unix Computer to a Network ............................................ 127 Summary ............................................................................................................. 129
📄 Page
12
x Conten ts in Detai l 12 SHARING FILES THROUGH YOUR NETWORK 131 File Sharing in Windows XP .................................................................................. 132 Level 1 ................................................................................................... 133 Level 2 ................................................................................................... 134 Level 3 ................................................................................................... 135 Level 4 ................................................................................................... 135 Level 5 ................................................................................................... 136 File Sharing in Windows Vista ............................................................................... 136 Network Discovery .................................................................................. 137 File Sharing ............................................................................................ 137 Printer Sharing ........................................................................................ 143 Password Protected Sharing ..................................................................... 143 Media Sharing ....................................................................................... 143 File Sharing on a Macintosh .................................................................................. 143 Connecting a Mac to a Windows (SMB) Network ...................................... 143 Connecting from Older Mac Versions ........................................................ 147 File Sharing in Linux and Unix ............................................................................... 147 Sharing from Linux or Unix Computers ....................................................... 147 Creating Shares on Linux and Unix Computers ........................................... 149 Samba ................................................................................................... 150 Using Shares ....................................................................................................... 150 13 NETWORK SECURITY 151 Keeping Intruders Out ........................................................................................... 152 User Accounts and Access Levels .............................................................. 152 Passwords .............................................................................................. 152 Firewalls ................................................................................................ 154 Virtual Private Networks ........................................................................................ 159 VPN Methods ......................................................................................... 161 VPN Servers ........................................................................................... 162 VPN Client Software ................................................................................ 165 VPN Clients for Linux/Unix ....................................................................... 172 OpenVPN: A Cross-Platform Alternative ..................................................... 173 Using a VPN Through a Public Network ..................................................... 173 Wireless Security ................................................................................................. 174 Protecting Your Network and Your Data ..................................................... 176 Network Name ....................................................................................... 177 WEP Encryption ...................................................................................... 179 WPA Encryption ..................................................................................... 182 Access Control (MAC Authentication) ........................................................ 184 Physical Security .................................................................................................. 184 Windows Update and Patches ............................................................................... 185 Microsoft Baseline Security Analyzer ...................................................................... 188 Controlling Your Own Users .................................................................................. 189 Denial of Service Attacks ....................................................................................... 189 Conclusion .......................................................................................................... 189
📄 Page
13
Conten ts in Detai l xi 14 PRINTERS AND OTHER DEVICES ON YOUR NETWORK 191 How to Connect a Printer to Your Network .............................................................. 192 External Printer Servers ............................................................................ 192 Wi-Fi Printer Servers ................................................................................ 194 Built-In Printer Servers ............................................................................... 194 Automatic Printer Switches ........................................................................ 194 Using a Computer as a Printer Server ........................................................ 195 CUPS: The Common Unix Printing System ............................................................... 199 All-in-One Devices ................................................................................................ 199 15 OTHER THINGS YOU CAN CONNECT TO YOUR NETWORK: AUDIO, VIDEO, HOME ENTERTAINMENT, AND BEYOND 203 Using a Microphone and Camera with Your Network ............................................... 204 Internal and External Controllers ............................................................... 204 Networked Cameras and Microphones ..................................................... 205 Home Entertainment Networks ............................................................................... 206 Music Through a Home Network ............................................................................ 206 Audio Servers ......................................................................................... 207 Audio Clients .......................................................................................... 211 Video Through a Home Network ............................................................................ 215 Video Servers ......................................................................................... 215 TiVo and Other Digital Video Recorders ..................................................... 216 Playing Video on a Computer ................................................................... 218 Connecting a TV to Your Network ............................................................. 218 Game Consoles ................................................................................................... 220 Connecting a PlayStation ......................................................................... 220 Connecting a Wii ................................................................................... 221 Connecting an Xbox 360 ......................................................................... 222 Connecting Home Appliances to Your Network ....................................................... 222 Home Automation ................................................................................................ 223 Remote Sensors and Controls ................................................................................. 223 Bar Code Readers and Remote Data Entry ............................................................... 224 If You Can Convert It to Digits, You Can Put It on the Network ................................... 224 16 OTHER NETWORK APPLICATIONS 225 Remote Desktop ................................................................................................... 226 Windows Remote Desktop ........................................................................ 226 Virtual Network Computing (VNC) ............................................................ 229 MaxiVista: Adding a Screen .................................................................................. 229 Multiple Monitors .................................................................................... 230 Remote Control ....................................................................................... 232 Synchronizing Files .............................................................................................. 232
📄 Page
14
xii Content s i n De ta i l Instant Messaging and Live Communication ............................................................. 233 Servers vs. Peer-to-Peer Messaging ............................................................ 234 Internet-Based IM Services ........................................................................ 234 Messaging Through a LAN ....................................................................... 235 Messaging Through a Virtual Private Network ............................................ 236 Audio and Video Messaging .................................................................... 237 17 TROUBLESHOOTING 239 General Troubleshooting Techniques ...................................................................... 240 Define the Problem .................................................................................. 240 Look for Simple Solutions First ................................................................... 241 Isolate the Problem .................................................................................. 243 Retrace Your Steps .................................................................................. 243 Keep Notes ............................................................................................ 244 Viruses and Other Nasties ..................................................................................... 245 Other Common Problems ...................................................................................... 245 Configuration Settings .............................................................................. 246 DHCP Settings: DNS and Default Gateway ................................................ 246 Failed Connection to a Specific Site .......................................................... 246 An Alternate Connection to the Internet ................................................................... 247 The Collective Wisdom of the Internet ..................................................................... 247 Software for Troubleshooting ................................................................................ 248 Network Magic ...................................................................................... 248 Protocol Analyzers .................................................................................. 248 ISP Problems ........................................................................................................ 251 Don’t Panic .......................................................................................................... 251 INDEX 253
📄 Page
15
A C K N O W L E D G M E N T S A book like this is always a collaboration, even if only one author’s name is on the cover. The book in your hands is a huge improvement over the original manuscript, thanks to the efforts of editors Tyler Ortman and Kathleen Mish and copyeditors Eric Newman and LeeAnn Pickrell. Technical editor Michael Kershaw protected me from embarrassing technical errors. And compositor Riley Hoffman made this the attractive book you hold in your hands. Thanks to all of you. Of course, any surviving errors or unclear descriptions are my own responsibility. Thanks also to Jim Cavin for allowing me to connect his MacBook to my network and Tommy Tse for his assistance in obtaining evaluation software from Microsoft. And thanks as usual to my agent, Carole McClendon, who started the wheels turning on this project.
📄 Page
16
(This page has no text content)
📄 Page
17
I N T R O D U C T I O N This book is for people who never expected to build or run a computer network. You were happily using a computer, sending and receiving email, writing reports, and maybe down- loading music through the Internet when one day you looked around to discover that one computer had somehow multiplied—now you have two, or three, or more computers. Maybe each of your children needs his or her own computer to do homework or all of your employees have computers on their desks. Or maybe you brought a portable laptop computer home from work and you want to use it along with the family’s desktop machine. Whatever the reason, you now have several computers, and you need a way to connect all of them to the Internet at the same time and to share files, printers, and other resources among them. You need a network.
📄 Page
18
xvi I n troduct ion A network? Yikes! Isn’t a network some kind of invisible monster that requires expensive equipment and people to keep it running who speak a mysterious language and go off to seminars with titles like “The Power of Virtualization” or “Removing Internet Anonymity Barriers with IP Intelligence”? Not necessarily. Networks are not just for geeks any more. Today’s small networks are relatively easy to install, and you don’t need an advanced course in computer technology to operate them. Even the smallest of small businesses will probably benefit from having a network. And home networks are becoming common household utilities, just like water, electricity, and cable TV. Like those other utilities, you don’t need a technical background to use a network. This book will tell you what you need to know to build and use a small, simple network in your home or business without becoming mired in obscure technical details. We thought about calling this book Networks for Nitwits, but that’s not quite what the book is about—you’re not a nitwit; you’re an intelligent com- puter user who has been dragged into the world of networks. I suggested The Bridges and Routers of Madison County, but that would be an entirely different book: the bittersweet tale of an Iowa housewife who finds romance with an itinerant network installer. Somebody should probably write that book, but this isn’t it. This is a guide to navigating the jungle of servers, routers, modems, and Ethernet cables and to getting the most out of your small network. I’ll explain how networks operate (without getting into too much tedious technical detail), describe each part of a network, and tell you how to use the net- work with computers running Windows XP and Vista, Macintosh OS X, and several versions of Linux and Unix. I’ll also tell you about some other ways you can use your network, including automating household appliances and distributing digital audio and video to computers, home entertainment systems, and “Internet radios” throughout your house. The ideal network is the one that you—and the other people using your network—never have to think about. You would plug a cable from each computer into an outlet, and every other computer on the network would immediately recognize it. And the network would simply be there, ready to use. Or it would be completely invisible, like the wires that provide electricity to the lamp next to the chair where you’re reading this. If you think about it, you don’t really want a network; you want to see and hear files and other resources that are located beyond your own computer. A network is the means to that end. As I wrote this book, I kept several goals in mind: First, I wanted to provide enough information that readers with some basic computer knowledge and skills could understand how networks work and how to plan and install their own small network; second, I wanted readers to think about additional uses for their networks; and third, I wanted to offer advice and tools for fixing a network that isn’t working correctly. If I have succeeded, your network will be up and running shortly after you follow the book’s instructions and recommendations.
📄 Page
19
In t roduc ti on xvii Network Know-How begins with a general overview of networks and the things you can do with them. In later chapters, you will learn how networks handle digital data, how different kinds of networks move that data from one place to another, and how the equipment at the core of most networks— hubs, routers, modems, and other devices—works. Next, I’ll introduce the important concepts of clients and servers and tell you how to design and install simple wired and wireless networks, how to connect the local network to the Internet, how to build security into your network, and how to use your network for music and video along with computer data. And finally, the last chapter of the book offers advice about troubleshooting and describes some useful tools that might make life a bit easier when it becomes necessary to find and fix a problem. When you have a network in your home or small business, all the com- puters connected to the network will become more flexible and more useful. Your new network will change the way you use your computer; within a few weeks or less, you will definitely wonder how you got along without it. When you and the other people connected to your network find yourself using it without thinking about “the network,” you and I will both have met our objectives.
📄 Page
20
(This page has no text content)