Chapter 1. Setting Up a Small Network

In This Chapter

  • Finding out what a network is and why you might want one

  • Setting up the network hardware

  • Configuring network system preferences

  • Troubleshooting your network

In the not-so-distant past — I'm talking 15–20 years ago — networks were found only in huge companies that had the money and the workforce to pay for and maintain them. But now, as technology rolls on, a home or small office network is both very affordable and relatively easy to create. In this chapter, I introduce you to this helpful beastie: You discover what networks are, what you can do with them, and how to set up a small network of your own for your home or small business.

Networks can be used for many things. Computers exchange all types of data over a network: files that you want to send between computers or to networked printers, streaming audio or video broadcasts, data for multiplayer computer games, or even a private company Web site (typically called an intranet). Anything that you can imagine that would involve moving data between multiple computers can be done by using a network.

What Do I Need to Set Up My Network?

First, let me define network. In a nutshell, a network is a combination of hardware, cables, and software that allows computers and printers to talk to each other. (Heck, you don't even need cables with a wireless network, as I show you in Chapter 3 of this minibook.) To have a network, you need the right hardware and software — and did I mention that all the hardware and software that you need probably came with your MacBook? (Except for those pesky cables, of course.) As you progress through this chapter, you'll discover everything that's required to set up your network so that you can pick up any additional parts you need. Any good-sized computer store (either the brick-and-mortar or online variety) has everything that you need to get up and running.

Now, back to the requirements: You need the right hardware and software to make your network sing. This section covers each component with a description about the role that each part plays on the network and other good stuff you'll want to know to get your network right the first time.

Something to network

Okay, this might be obvious, but I'm nothing if not thorough. The first thing that you need to build a network is ...well, stuff! That's right, you need to have devices that you want to network. Most times, these are computers (whether Macs or PCs running Windows/Linux/UNIX), printers, personal digital assistants (PDAs), cell phones, and other standalone, network-capable devices (such as file servers and shared tape back-up drives).

Network interface card (NIC)

A network interface card, or NIC, is a hardware device that your computer uses to talk to the rest of the network. The NIC connects to the network cabling, and it speaks the language of electronics, sending data around the network. Nowadays, most networks use the Ethernet networking protocol, and most NICs are Ethernet compatible. All MacBooks have some type of Ethernet NIC hardware built right onto the Mac's main system board. (Note, however, that the MacBook Air offers only wireless hardware built in; you can add a wired Ethernet port to the MacBook Air using an external USB connector.)

Switch

So you have an assortment of devices in your home or small office that you've decided to network. How do you make them all interconnect? Although you could connect just two computers by using nothing more than a single crossover cable, you need fancier hardware to connect more than two computers: namely, a switch. The switch is used to connect everything, so it's the focal point of the network. Without a switch, you don't have a network.

A switch is really just a small box that has a bunch of Ethernet ports on it. A port is really just like an Ethernet NIC on your computer, but a switch has lots of them. Inside, all those Ethernet ports are arranged so that the talking (sending) wires from each port connect to the listening (receiving) wires on all other ports. Therefore, when one computer talks, all others listen.

Setting up a switch (and therefore giving birth to your network, which sounds more painful than it is) is usually no more difficult than connecting a power cable to the device and then plugging in your computers with their own Ethernet cables. You'll see various lights on the box — usually a power light indicating that the switch is powered on and operational. You'll also see lights that correspond to each port on the switch; these lights tell you what's going on in the box. For instance, you normally see the following types of lights:

  • Link light: Each port on a switch should have a link light. Link lights simply tell you which ports have something alive connected to a given port — that is, a device is connected and powered on.

  • Speed light: Each port on the switch should have a speed light, which tells you the speed of the device at the other end. Some switches have different lights for different speeds, and some use a single light and make it different colors for different speeds.

  • Activity light: When one computer speaks, they all hear it. Typically, an entire switch has only one activity light for the entire network, indicating that someone is speaking. With heavy traffic, the light can appear solid.

Note

Bear with me whilst I spew techno-talk for a paragraph or two. When an Ethernet switch receives a frame — that's the name for a standard unit, or packet, of network data — it reads the label on the frame to see the return address of the computer that sent the frame. In a short amount of time (after being turned on and watching the data move around), a switch figures out which computer is located on which port. Then, whenever data comes into the switch, it looks at the header (some information on the front of all frames, much like a mailing label on a package that you send) and sees which computer should receive the frame. The switch then sends the frame out the port for that computer only.

This is A Good Thing. Instead of forcing all computers on the network to listen while your MacBook speaks (as antique network hubs did) — known as half-duplex — a switch sends the data directly to the only computer that needs to hear it.

Cables

Cables are the ties that bind ...literally. Cables are used to connect the Ethernet port on each computer to the switch, the central hardware of the network. With a little experience, you'll be a cable-wielding superhero with hundreds of feet of cable draped across every piece of furniture in your place for your first LAN party. (A LAN party, by the way, is when way too many techies bring their computers into a very small space, connect them, and play games for 48 hours straight. Oh, and we eat a lot, too. Good stuff!)

Here's the scoop on what kind of cables to use. Technically, you can run 100 Mbps Ethernet over Cat5 cable (like a super-version of the wire that you use for your telephones).

Tip

Although you can do 10/100 Mbps Ethernet over Cat5 cable, any new cables that you buy should be Cat5E or Cat6 — which I talk about in the following section — because these types of cables are specifically meant for use with 1000 Mbps (or Gigabit) Ethernet. I'm sure you noticed that the common denominator here is the Cat5 cable. That's because fiber optic cable, although supporting speeds of 100 Mbps, 1 Gbps, and even 10 Gbps, is much more expensive and more difficult to install.

Hey, did I mention that you can eschew cables entirely? For more information on the lean, mean world of wireless networking, see Chapter 3 of this minibook.

Warning

Be sure to buy straight-through Cat5E/Cat6 cables (also called patch cables) and not crossover cables, which are used only in certain circumstances. Crossover cables are mainly used to connect two computers directly (to form a tiny, two-computer network), connect a cable/DSL modem directly to a computer, or connect multiple switches.

Note

Cat5 cable supports speeds of 100 Mbps. 1000 Mbps Ethernet, of course, is designed to run ten times faster than that; luckily enough, it was engineered to be compatible with 90 percent of Cat5 installations. Having said that, I must also point out that some Cat5 cables don't stick to the stringent specifications that 1000 Mbps Ethernet requires. The newer version of Cat5 cable is Category 5 Enhanced, or Cat5E for short. Cat5E is recommended for any new installation because it can easily handle 10/100 Mbps Ethernet and yet can handle 1000 Mbps Ethernet as well. Even if you're using 10/100 Mbps Ethernet, you can upgrade someday to 1000 Mbps without having to worry about upgrading your cabling. You may also find Cat6 cabling in your network travels, which can also easily handle 10/100/1000 Mbps speeds.

Setting Up Your Network

After you collect the hardware components I list earlier in this chapter, you're ready to connect things. Here's a quick list of things to do to get your network fired up:

  1. Find the best location for placing your switch.

    Tip

    To keep costs down, try to place the switch in a location close to a power outlet that's centrally located so that you can use the least amount of cable. If cost isn't an issue, hide the unit in a closet and just run all the cables along the walls to the hub or switch. And if cost really isn't an issue, get your house fully wired with Cat5E cable.

  2. Plug the switch into the power socket.

    Some switches come on automatically when you plug them in and can never be turned off. Others have a power switch that you need to turn on the first time that you plug them in.

  3. Verify that the switch is working by looking at the lights on the front. Check the manual that came with the switch to see what light configuration is normal for that particular unit.

    Until you have computers or printers attached to it, you might just have a status light that shows the switch is powered on. But if the lights on your unit don't match up with what the manual says, you could have a bum unit that you need to return.

  4. Verify that all your devices are near enough to the switch to be connected by your cables; then, turn them all on.

  5. Get one of your Cat5E or Cat6 cables and connect one cable from the Ethernet jack on your MacBook (on the side) to an open port on the switch.

    You should see a link light or speed light come on that verifies that the two devices sense each other.

  6. Repeat Step 5 until each device is attached to the switch.

Congratulations, you're a network technician! (Don't forget to call your friends and brag.) The first phase of the network, the physical connection, is complete; the next step is the configuration of Mac OS X.

Understanding the Basics of Network Configuration

Take a deep breath; there's no need to panic — in fact, configuring your network software basically involves entering a lot of numbers and other stuff in dialogs. (In fact, most folks can just allow Snow Leopard to take care of network settings automatically.) But just so you understand what's involved, this section explains what those numbers are, what they do, and why you ought to know it. Because this is a MacBook book, I stick with configuring Macs running the Big X.

TCP/IP

First things first: Protocol is just the techno-nerd word for a set of rules or a language. A protocol is a language that computers use to communicate. Without protocols, the computers on your network would never be able to speak to each other even though you have NICs, cables, and a hub or a switch. The Internet Protocol (IP) part of the TCP/IP suite is what you're really interested in because it's the most important part of your network configuration chore.

IP addresses

IP addresses are like street addresses for computers on a network. Each computer on the network has an IP address, and it needs to be unique because no other computer can share it. When a computer wants to communicate with another computer, it can simply send the data on the network in a nice package that has its address as well as the address of the computer that it's trying to talk to. (Remember frames? If not, take a refresher in the earlier section "Switch.")

An IP address is just a number, but it's written in a strange way. (Go figure.) All IP addresses are written as four sets of numerals between 0 and 255 with a dot (period) between each set. For instance, a common IP address that you might run into is 192.168.0.1. As everyone knows, engineers can't sleep unless they have three or four ways to write the same thing, including IP addresses. The form shown above — which is by far the most common — is dotted notation. Each number, such as 192, is an octet.

Tip

Don't worry too much about this stuff: You don't have to remember terms like octet to create your own network. They could be helpful, however, if something goes wrong and you need to place a call to tech support. Plus, you can impress the computer salesperson (gleefully called a wonk by Mac power users) at your local Maze 'o Wires store with your mastery of techno-babble.

IP addresses at home versus on the Internet

One very important thing to keep in mind is that the Almighty IP Address Police — Internet Assigned Numbers Authority (www.iana.org) — has broken IP addresses into groups. The two main types of IP addresses are public and private:

  • Public IP addresses can be used on the Internet and are unique throughout the whole world.

  • Private IP addresses are used in homes or businesses and can't be used to talk to the public Internet. Private IP addresses are used over and over by many people and most commonly take the form 192.168.x.x. (AirPort Extreme base stations use private IP addresses in the form 10.0 .x.x.)

You'll almost always get a public IP address from your Internet service provider (ISP), whether you're using a cable modem, digital subscriber line (DSL), or a regular dial-up modem. If you use a cable/DSL router or Snow Leopard's built-in sharing software to share your Internet connection among multiple computers, you'll be using private IP addresses on your network while using a single public IP address to talk to the Internet. (More on that in Chapter 4 of this minibook.)

"Great! I get an IP address, put it into my Network settings in System Preferences, and off I go. Right?" Well, you're close, but here are a few other pieces of information that you might need before you can go surfing around the world:

  • Default gateway: When you send information to other networks — whether in another building or around the world on the Internet — your computer needs to know the IP address of the gateway that will forward your data down the line. The default gateway is really just the IP address of a router, which is a device that connects multiple networks. A gateway gets its name because it really is your gateway to all other networks.

  • Subnet mask: A subnet mask is a number that helps your computer know when it needs to send stuff through the router. It's a group of four octets with dots, just like an IP address, but almost always uses 0 or 255 for each of the four octets. Most often, the subnet mask is 255.255.255.0. If the wrong number is entered for the subnet mask, it could keep you from talking to the Internet or even to computers on your own network.

Software applications

After you have the hardware in place and you've chosen and configured a protocol to allow the computers to all talk to each other, you need software to make use of your new network connections. Time for more good news: A lot of the software that you need to move data on your network is included already in Mac OS X! Here are brief descriptions of some of the network software and protocols already built into Mac OS X and what they're used for:

  • FTP: File Transfer Protocol (FTP), part of the TCP/IP protocol suite, allows computers of any type — Mac, PC, Linux, UNIX, mainframe, or whatever — to transfer files back and forth.

  • Telnet: Telnet is also part of the TCP/IP suite — you can use it to remotely connect to a computer and execute commands on the remote machine.

  • Samba: Samba (or SMB) is an open source software suite that enables Mac OS X users to share files with people using Windows computers and allows the Mac users to connect to files that the Windows computers share.

  • HTTP: HyperText Transfer Protocol (HTTP), also part of the TCP/IP suite, is used by Web browsers to provide access to all the various pages on the World Wide Web.

Configuring Network System Preferences

In this section, I show you how to configure your MacBook to communicate with other computers on a local network.

Leave it to Snow Leopard to provide you with assistance — in this case, when you first open the Network pane, you might be greeted with a dialog offering you assistance on setting up the stuff I cover in this section. (Whether you get this absolutely free offer of aid depends on whether you upgraded your MacBook from a previous version of Mac OS X or entered your network and Internet settings within the Snow Leopard Setup Assistant.) If you do decide to allow the Snow Leopard Internet/Network assistant to guide you through your network setup, I'll meet back up with you at the next section.

Using DHCP for automatic IP address assignment

Now I'd like to introduce you to a very dear friend of mine — an abbreviation that you will soon grow to love, as does everyone else who's set up a small Mac network. Dynamic Host Configuration Protocol, or DHCP for short, is a protocol that enables a computer to automatically get all the information that I've talked about to this point. (Check in your Webster's ...this is the very definition of the word godsend.)

You're saying, "Mark, there's gotta be a catch, right?" Well, here's the bad news: Before you can use DHCP, you have to add a DHCP server, which provides other computers on the network with their configuration settings. Here's the good news: Most Internet connection-sharing hardware devices (and software-sharing implementations as well) provide a DHCP server as part of the price of admission. (Internet connection sharing allows all your networked computers to access the Internet through a single Internet connection. I cover it more in Chapter 4 of this minibook.) Most wired and wireless routers can provide DHCP services these days. Technology marches on.

If you plan to use Internet connection sharing or you know that you have a DHCP server on your network, you can set up your MacBook to automatically obtain the required IP address and information. Open System Preferences from the Dock or the Apple menu and choose Network. From the Network dialog that appears, click the Ethernet entry in the list on the left. Choose Using DHCP from the Configure IPv4 pop-up menu; then click the Apply Now button. Mac OS X contacts the DHCP server to obtain an IP address, a subnet mask, a gateway router IP address, and a Domain Name System (DNS) address. (DNS servers convert a human-friendly address, like www.yahoo.com, to a computer-friendly IP address, like 66.218.71.86.)

A few seconds after clicking the Apply Now button, you should see the information come up, as provided by the DHCP server. This lets you know that the process worked and configuration is complete. You might also notice that the DNS Servers information is empty. Fear not: Mac OS X is really using DNS information provided by the DHCP server. Press

Using DHCP for automatic IP address assignment

Tip

If you ever make a network change that screws things up, such as entering the wrong subnet mask or an IP address that isn't in the same range as others on your LAN, you can always click the Revert button to get back your old settings.

Warning

One DHCP server on a network is princely, but two or more DHCP servers on a single network will fight like alley cats and grind everything to a halt. Therefore, if you're considering adding a DHCP server to an existing network, make doggone sure that you're not treading on another server's toes. (Ask that network administrator person.)

Manually choosing an IP address range

You say you don't have a DHCP server, and you need to manually assign IP addresses? This configuration also means you need to manually configure the Transmission Control Protocol/Internet Protocol (TCP/IP) Properties. Keep in mind that for now, you're not concerned with the Internet — just computers on the local network.

A result of being on a local network — because it's not connected to the Internet, it's also called a private network — is that you must use IP addresses that are reserved for private network use. You can use a few different ranges of IP addresses, but I recommend that you choose an address range from the 192.168.x.x (or 10.0.x.x) networks. In the next section, I show you how.

Down to business: I recommend that you use IP addresses in the 192.168.x.x range (or the 10.0.x.x range if you're using an AirPort Extreme base station). What does this mean, exactly? Well, here's the scoop:

  • Use IP addresses where the first two octets are 192 and 168 (192.168) or 10 and 0 for AirPort Extreme (10.0).

    Note

    Octet numbers are conjoined by periods.

  • For the third octet, select any number between 1 and 254.

    It doesn't matter which one you choose as long as you use this same third number on all computers on your network.

  • For the fourth octet, select any number between 1 and 254.

    Tip

    Make sure that every computer on your local network has a different fourth octet number. This is very important; otherwise, your network doesn't work.

  • Use 255.255.255.0 as your subnet mask.

For instance, suppose that you're using three computers on your network. All the IP addresses that you use will start with 192.168. Next, suppose you choose 123 for the third octet. (Remember that you can choose any number between 1 and 254.) Finally, for the fourth octet, choose the numbers 100, 105, and 110 for the three computers, respectively. (Again, you can choose any numbers between 1 and 254.) The resulting IP addresses used on the three computers are

192.168.123.100

192.168.123.105

192.168.123.110

Note

By the way, I should mention that there are other range possibilities for reserved private networks — AirPort and AirPort Extreme hardware uses a 10.x.x.x network range, for example — but the 192.168.x.x range is definitely the most popular and the most common default on Ethernet network hardware.

After you know the IP addresses and the subnet mask that you're going to use, start setting up each computer. Being a nice guy, I walk you through the process of configuring Mac OS X with the 192.168.123.105 address as an example.

Be sure that you have all the physical portions of your network powered up and connected as I outline in the earlier section, "Setting Up Your Network."

  1. Select any of your Macs to start with and open System Preferences (either from the Apple menu or from the Dock).

  2. From the System Preferences dialog, choose Network.

    The Network pane appears.

  3. Click Ethernet in the list.

  4. Click the Configure IPv4 pop-up menu and choose Manually.

    Figure 1-1 shows how things should look.

    Manually configuring TCP/IP settings.

    Figure 1.1. Manually configuring TCP/IP settings.

  5. Enter the IP address for this machine (192.168.123.105 in this example) in the IP Address text box.

  6. Enter the subnet mask of 255.255.255.0 in the Subnet Mask text box.

  7. If you're using a router or hardware Internet sharing device, enter the IP address used by the router in the Router text box.

  8. Click the Apply button, and your new network settings take effect.

  9. Press

    Manually configuring TCP/IP settings.

Repeat this same procedure with the other IP addresses for each of the other Macs that are connected to your network.

Tip

Most ISPs also supply DNS server addresses and search domains. If your ISP included DNS server addresses or search domains, don't forget to type them into the corresponding boxes on the TCP/IP panel.

Verifying Connectivity

After you have your Macs connected and your TCP/IP configuration is done, check to make sure that everything is working. After you have at least two computers on your network, each with a TCP/IP address, you can use a simple little utility called ping to test the connection.

ping is a very simple, yet extremely helpful, utility that's the first connectivity-testing tool out of the box, even for network professionals. When you use the ping utility — referred to as pinging something — the application sends out a small packet of data to whatever destination you're trying to reach. When the receiving computer hears the ping, it answers with a ping reply. If the original computer receives the ping reply, you know that the connection between the computers is good.

To ping a computer, you use a little application built in to Mac OS X called Network Utility, which allows you to work various network wonders (including checking connectivity, watching the route that your computer takes to get to another computer, and looking up information about Internet domain names). To use Network Utility to check network connectivity, follow these steps:

  1. Open a Finder window, click Applications, and click Utilities.

  2. Double-click the Network Utility icon to launch the application.

  3. Click the Ping tab (see Figure 1-2).

  4. In the Enter the Network Address to Ping text field, enter the IP address of the computer that you want to ping.

  5. To simply verify connectivity, select the Send Only x Pings radio button and enter a low number, such as 5, in the text field.

    Five or ten pings are plenty to see whether the connection is good.

  6. Click the Ping button.

    Your Mac sends ping packets to the IP address that you entered.

Preparing to ping. (Can you say that with a straight face?)

Figure 1.2. Preparing to ping. (Can you say that with a straight face?)

Tip

If the pings are successful, text appears in the text box at the bottom of the Ping tab: one line for each ping reply received from the other computer. The end of each line reads time= with a number at the end. That number is the amount of time, in 1/1000 of a second (milliseconds [ms]), that it took for the ping packet to go from your computer to the other computer and back.

If your ping is unsuccessful, you see nothing, at least for a little bit. Each ping that you send takes two seconds before it's considered missing in action. So, if you choose five pings, wait ten seconds before you see the results. After all the pings time out — a ping times out when it doesn't get returned in the proper amount of time — you see a line of text appear that reads ping: sendto: No route to host or 100% packet loss. Both error messages mean the same thing: All the ping packets that you sent out are now in the packet graveyard, never to be seen again. As you've likely guessed already, this is not a good sign for your network connectivity. Look to the following section, "Troubleshooting Your New Network," to find out where to begin troubleshooting this problem.

Tip

If you can ping all the other computers on your network from one of the computers, you don't need to go to each computer and ping all the others. You can logically assume that all the computers can communicate. For instance, if you can ping computers B, C, and D from computer A, you don't need to bother with ping tests from computer B, C, or D.

After you have your computers configured and you've verified connectivity among them, start doing the fun stuff that a network allows you to do, such as sharing data, printing, and (most important) playing games with users on other computers.

Troubleshooting Your New Network

After a network is set up and operating, it rarely has problems — still, Murphy sometimes takes charge, and the darn thing just won't work right. When you do have problems with the network, I recommend using a standard, consistent approach to finding and fixing the problem. This section breaks down troubleshooting into two areas:

  • The hardware: The best place to start troubleshooting a network problem is with the actual equipment, such as the NICs, cables, and hubs/switches. (See earlier sections on each equipment type.)

  • The software: The second place to check for problems is in the configuration of the computers on the network, specifically the configuration on the computer(s) having the problem that you're troubleshooting.

Physical problems with your network

Although many things on a network can go bad or cause problems, usually network problems are caused by faulty equipment or wiring. Sometimes it's something as simple as a cable not being plugged in snugly. Looking at the physical cables, connections, and equipment is always the best place to start looking for problems. Here is a quick list of physical things to check while trying to fix network problems:

  1. Make sure that both ends of the network cable are firmly connected.

    First check the end that plugs into the computer and then check the end that connects to the switch.

  2. Turn on the problematic computer to be sure that it's connected to a hub or switch.

    Check the port on the switch to see whether the link/speed light is lit. (Depending on the switch that you have, you might not have a link light. Many switches use a speed light to indicate a link. Check the manufacturer's manual for your model.) If your computer is on and connected but no link/speed light is lit, try replacing the network cable.

  3. If you replace the network cable and there still isn't light, try unplugging the cable from the switch and plug it into another port.

    Choose one of the other computers connected to the switch that works, unplug it, and plug the broken computer into that port for testing. Occasionally, a single port on a switch goes bad; if that happens, just mark it as bad and don't use it anymore. But if all computers connected to the switch stop working, it's probably the switch that's gone south. If the switch is still under warranty, I recommend getting it fixed or replaced.

  4. If you replace the cable, try a different port on the switch, and if other computers work fine on that switch, the NIC inside your computer has possibly gone bad.

    If you reach this determination, call your local service center to have it looked at and repaired. If you have an older model on which the NIC was added instead of built in, you can simply replace the NIC yourself — MacBook owners, unfortunately, don't have this option.

Note

The key when troubleshooting physical problems is the link/speed light on the switch. If the link/speed light still doesn't work, the problem likely isn't physical. Start troubleshooting the network configuration on the computer itself.

Network configuration problems

After checking the hardware, look for problems in the network settings. When using TCP/IP on your network, look for these specific things: the TCP/IP configuration mode, IP address, subnet mask, and router IP address (if you're using a router to connect to the Internet or other networks). To check these settings, open System Preferences and click the Network icon to bring up the Network pane. Click the Ethernet entry in the list and then follow these steps:

  1. Make sure that the Configure IPv4 pop-up menu is set to the appropriate option.

    • Note

      Using DHCP: Select the Using DHCP option only if you're using a cable/DSL modem/router or other DHCP server. Otherwise, set this to Manually.

    • Manually: If the configuration is set to Manually, check the IP Address, DNS Servers, Router, and Subnet Mask fields to make sure that they're correct. If you're not sure whether your Subnet Mask field entry is correct, you can usually make it the same as other computers on the same network with you. Most times, the subnet mask is 255.255.255.0.

  2. To check your Internet connectivity to the rest of the Internet, try pinging www.apple.com.

    This checks the router and DNS settings.

  3. If you're set up for DHCP and your TCP/IP settings remain blank, make sure that your DHCP server — which could be your cable/DSL modem/router — is turned on and working properly.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.15.235.104