Chapter 10. CONNECTING YOUR NETWORK TO THE INTERNET

All of the other benefits of a home network—file sharing, internal web hosting, and so forth—are handy, but the main reason that most people want to connect all of their household computers together is to share a high-speed Internet connection. In a business, those other services are more important than they are at home, but Internet access for everybody is still important. This chapter explains how to connect a network to the Internet and how to set up each computer to connect to the Internet through the network.

The Internet is often described as a "network of networks." In other words, the Internet provides a way to exchange data between your own LAN and millions of other networks. Before you can exchange data between your local network and the Internet, however, you (or your network manager) must configure your network gateway, and before you can connect a computer to the Internet through that gateway, you must configure that computer's Internet settings.

The Internet: From the Cloud to You

Network diagrams traditionally show the Internet as a big cloud. Inside that cloud are millions of computers, routers, and other equipment located all over the world, but the internal operation of that equipment is Somebody Else's Problem; when you're hooking up your own network, the Internet is simply a huge, shapeless thing that performs in a predictable manner.

Figure 10-1 shows the connection from the Internet through your local network to individual computers. Those computers can be any kind of network-attached device, such as a printer, a network-attached storage (NAS) device disk drive, or a pocket-size smartphone, but for the sake of this discussion, let's think of all those things as types of computers. In order to send and receive data between your computer and the Internet, you must supply certain information to the Internet, and the Internet provides other information to you.

The Internet communicates with your computer through a local network.

Figure 10-1. The Internet communicates with your computer through a local network.

The Modem

Your LAN probably connects to the Internet through a high-speed telephone line or a cable TV system. The device that converts digital data to and from the LAN to signals that can move through the phone line or cable is a modem (modulator/demodulator). In most cases, the modem is combined with a gateway router, but some cable TV companies and telephone companies provide stand-alone modems that can connect either directly to a single computer or through a router or switch to a LAN.

For the purposes of this chapter, you can think of a modem as a type of router. The differences between a modem and a router are that a modem includes the internal hardware that performs modulation and demodulation activities along with the software that provides the connection settings. The configuration settings that control the connections between the Internet and your local network are generally the same in both modems and routers.

Note

A dial-up modem that uses the voice telephone network to connect your computer to the Internet operates in a similar manner to a high-speed modem, but it uses a much slower connection.

The Gateway Router

As Chapter 3 explained, the router that connects the Internet to your local network has a point of presence in two different networks: your Internet service provider's wide area network (WAN) and your own local area network (LAN). The WAN is part of the much larger Internet cloud.

Therefore, the router has two different addresses: one address on the WAN and a different address on the LAN. The router's job is to exchange data in both directions between these two networks. In certain respects, the Internet treats the router the same way that the router treats the other computers on the network, but the Internet uses different addresses to accomplish those goals. One of the important activities that occurs inside the router is network address translation.

Your router's Setup utility shows two groups of settings: one for the WAN and one for the LAN. The WAN side identifies the router to the Internet with a unique numeric address. That address can be either fixed or static, which means that it is always exactly the same, or dynamic, which means that a server at the WAN assigns the next available address from a pool every time the router connects to the WAN. Dynamic address assignment uses a process called Dynamic Host Configuration Protocol (DHCP), which is described in "DHCP Servers On or Off" in DHCP Servers On or Off.

The gateway router typically specifies the numeric address of one or more Domain Name System (DNS) servers that convert Internet addresses that use words (such as nostarch.com) into numeric addresses. Without a DNS server to consult, the WAN won't know where to direct email messages, requests for web pages, or any other attempts to communicate with a destination on the Internet. Your Internet service provider will provide the addresses of one or more DNS servers.

The router also needs a gateway address and a subnet mask. The gateway is the next router in line between the WAN and the rest of the Internet; the subnet mask tells the WAN which numbers in the router's IP address identify the router and which generic numbers identify the WAN. For example, the most common subnet mask is 255.255.255.0, which means that the last of the four numbers is different for each node. In other words, if your WAN controls all the addresses in the 123.223.123.XXX group, your address might be 123.223.123.103, and another customer's address on the same WAN might be 123.223.123.117.

The specific numbers your router uses are absolutely essential; if you don't have them exactly correct, the router won't connect to the Internet. But understanding what they mean is less important than getting them right. Your Internet service provider will supply the numbers to use when you set up a new account. Write the numbers in the same place where you keep account numbers and other important computer-related information.

Note

When a separate DSL or cable modem is between the gateway router and the Internet, the modem often provides the static IP address and other information to the Internet and the local network. In this situation, the gateway router relays the necessary addresses between the modem and the rest of the local network.

The LAN settings for your router or modem control the way your local network operates. The specific settings in each computer connected to the network must be within the ranges defined by the router or modem. The next section explains how each of these LAN-side settings works.

Individual Computers

Each computer connected to a LAN must have the same configuration settings in relation to the router that the router has with the WAN: a numeric IP address, a network mask, and addresses for a gateway to the Internet and one or more DNS servers. As the person responsible for your network, you must set up a DHCP server and either provide these values to each of your users and make sure they enter them correctly or type them into each computer and network device yourself.

The differences between setting up a router to talk to the Internet and setting up a computer to talk to the local area network are (1) the router has two groups of settings (the WAN and the LAN), but the computer has only one; and (2) the router obtains its WAN settings from your Internet service provider, but the local computer gets many of the same settings from the router. Therefore, you should almost always set up the gateway router in your network first—before you add computers to the network.

Note

When you connect a single computer directly to the Internet through a high-speed (DSL or cable) modem, you must use the settings supplied by your ISP or the modem.

The essential settings for connecting a computer to the Internet through a LAN are similar to the ones that you use to set up the modem and the router. The next sections explain how to deal with each of them.

DHCP Servers On or Off

A DHCP server automatically assigns IP addresses and other configuration information to all of the devices in a network. In a LAN, the DHCP server is most often part of the router or modem that connects that network to the Internet or built into a network hub. In most small networks, using a DHCP server is more convenient than assigning a static IP address to each network device one at a time.

The DHCP setting is a common cause of connection problems. If a computer is configured to obtain its IP address and other settings from a DHCP server, the DHCP server on the router or modem must be active. Other (less common) DHCP problems can occur when more than one server is active at the same time. In some cases, the other network devices will obtain DHCP settings from the "wrong" server, or the settings will not allow you to connect to the Internet. If you can't successfully connect a computer to the Internet through your LAN when testing your network, you should always check the DHCP server settings.

There are several important things to know about using DHCP in a LAN:

  • A network can have just one active DHCP server.

  • When a network is using a DHCP server, each computer and other device (such as a printer or game console) connected to the network must be configured to accept an address from the DHCP server. In Windows, the Obtain an IP address automatically option, shown in Figure 10-2, must be active.

    When the Obtain an IP address automatically option is active, Windows uses the network's DHCP server to set its IP address.

    Figure 10-2. When the Obtain an IP address automatically option is active, Windows uses the network's DHCP server to set its IP address.

    In Macintosh OS X, the Configure IPv4 option, shown in Figure 10-3, must be set to Using DHCP.

  • The IP address number assigned by the DHCP server must be within one of the reserved ranges. In almost all cases, you don't have to change the server's default values.

Most hubs, routers, modems, and Wi-Fi access points use one or more web-based pages (such as the one shown in Figure 10-4) to display and change the DHCP server's settings. However, the pages supplied with just about every make and model of network control device are organized slightly differently. So you must consult the manual supplied with your device or the manufacturer's website for specific instructions.

In OS X, choose the Using DHCP option to obtain an IP address from a server.

Figure 10-3. In OS X, choose the Using DHCP option to obtain an IP address from a server.

In this example, the important settings are DHCP Server and Starting IP Address. When the DHCP server is enabled, the server provides IP addresses for the entire network. When the server is disabled, each computer and network node uses a static address that you must set on that computer or node.

The DHCP server sets the IP addresses for the entire network.

Figure 10-4. The DHCP server sets the IP addresses for the entire network.

The Starting IP Address setting specifies the lowest IP address number that the server will assign to a client device. The Number of DHCP Users setting defines the highest number in the address range (in this case, 192.168.1.149). In some systems, the server asks for a range of numbers instead of the starting number and the number of users. In either case, allow for more DHCP users than the number of machines currently connected to the network, so the server can continue to support your network after you add more devices.

Subnet Masks

The subnet mask setting specifies which part of the IP address changes for each device connected to the network. Unless you have a reason to use a different mask, set the subnet mask to 255.255.255.0. If the network uses DHCP to assign IP addresses, you don't have to enter a subnet mask on each client device.

For most of us, the subnet mask is another of those settings that we have to enter correctly to make the network work properly, but we really don't need to know what it means. In a large or complex network, however, you can use subnet masking to separate the network into smaller subsidiary networks, or subnets. Computers and other network nodes within the same subnet can exchange data more quickly because they don't have to go all the way out to the larger WAN or the Internet and back again to locate one another.

As you know, numeric IP addresses are divided into four groups of numbers, each of them within the range from 0 to 255. One part of the address identifies the network, and the other identifies a specific computer. For example, your ISP might use a WAN with the network address 203.23.145.XXX; the individual computers and LANs connected to that WAN would have addresses from 203.23.145.000 to 203.23.145.255. In this case, the subnet mask would be 255.255.255.0 because the local address is limited to the last part of the address (the zero). A maximum of 256 devices (numbered 0 through 255) can be connected to this subnet.

Within your own LAN, you can use subnet masking to divide the network into two or more subnets. Dividing the network into subnets is useful when you want to separate your wired connections from the Wi-Fi access point or when you want to use an internal firewall to isolate computers that contain sensitive personnel or financial data from the rest of the network. To divide your LAN into two equal-size subnets, assign the subnet mask XXX.XXX.XXX.0 to one subnet and use local addresses from 1 to 126 (use 0 for the router). For the other subnet, use the subnet mask XXX.XXX.XXX.128 and assign addresses between 129 and 255. You will need a separate router for each subnet.

Note

Using subnets to split a LAN into separate groups counts as an advanced networking practice; you're not likely to see this setup in a simple home or very small business network.

IP Addresses

As Chapter 4 explained, several groups of numeric IP addresses have been reserved for computers and other devices connected to LANs. Because these addresses are only visible within each LAN, it's practical to use the same addresses in different networks. Every computer and every other device connected to your network must have a different address within one of these reserved number ranges.

Each network device, including the LAN side of the router itself, must have a different IP address from one of the reserved groups. A DHCP server (usually part of the router or modem) will take care of this automatically and assign new addresses whenever users connect another computer to the network. This can be especially convenient if users connect and disconnect laptops and other portable devices to and from the network.

If you're not using a DHCP server, you'll have to set the address for each device, one machine at a time. The LAN side of your router or modem usually has a default address that you use to reach its configuration utility (look in the device's manual to find the address). You do not have to change the default address on a router or other control device unless another device (such as a Wi-Fi access point) has the same default address. To make sure that you haven't assigned the same address to more than one device, keep a master list of IP addresses that includes every device connected to the network, including laptops and other portable devices that use part-time connections. You can keep the list in a text file stored on your own computer, but you should also print a copy of the current list (including the date) and keep it separately from the computer. When it's time to add one or more additional devices, consult the list to find and add a new address that isn't already assigned.

DNS Servers

Your LAN needs one or more DNS servers to convert Internet addresses to numeric IP addresses, but the DNS servers don't have to be part of the LAN; you can use a DNS server anywhere on the Internet. Use the same DNS server addresses for each computer that you used for the WAN side of the router.

Note

If you can't get a DNS server address from your ISP, run a web search for public DNS server to find addresses for alternative servers. One widely-used public DNS is OpenDNS (http://www.openDNS.com/).

Gateways

The gateway address is the address of the router or other control device that relays data between computers on a LAN and the Internet. This gateway is sometimes called the default gateway. The gateway address is the same as the numeric address used for the LAN side of the router. Consult the router manual to find the correct address for your network.

Computers connected to the network don't use the same gateway address as the router or modem. The router/modem is the gateway between your network and the ISP's WAN. Your ISP's gateway address identifies the path between their WAN and the rest of the Internet.

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

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