Chapter  8

Connecting to the Internet

One of the first things most people will want to do when they set up a new computer is get it connected to the Internet so they update their Facebook or Twitter status to something like, “Playing with my new computer.” In most situations, getting connected to the Internet in Lion is pretty easy, but the steps to do so may differ depending on your situation. In this chapter we will cover

  • A brief introduction to networking
  • Connecting to the Internet over a broadband connection using Wi-Fi or Ethernet
  • Other ways of connecting to the internet
  • Setting up Location profiles

By the time you reach the end of this chapter you should be ready to start using Safari, Mail, and other Internet-enabled applications and technologies.

Networking and the Internet, an Introduction

NOTE: Networking technology these days is mostly plug-and-play (or select-and-play, since much networking doesn’t even use plugs anymore). In reality you need to know very little to get connected. If you are comfortable with just jumping right in, feel free to jump ahead in this chapter for just the info you need to move on. If you run into trouble or decide to learn more about the process, come back and start reading from here. We will be covering networking in more depth in Part 8 of this book. There we will discover that, while accurate, in most cases, our description of networking here represents a fairly simple network architecture that applies to many common home and small business networks, but is often an oversimplification of many larger networks. The Internet itself is in fact a highly complex collection of servers and networks, the scope of which exceeds the range of this book.

Today most people connect to the Internet either through a wired Ethernet connection, or more often through Wi-Fi. In most situations when you make such a connection from your computer you are joining a local network or local area network (LAN). To complete the connection to the Internet there is usually a network device called a router or some other device that takes date from your LAN and passes it up to a wide area network (WAN), which in many cases is the Internet (Figure 8–1).

Image

Figure 8–1. In most situations you will be connecting your computer to a router. The router will then pass data from your local network to and from the Internet.

NOTE: Figure 8–1 represents the router as a single unit. Many Internet access providers provide subscribers a single such unit that provides all the necessary pieces: Wi-Fi, a wired hub, a firewall, and so on. There are many situations where this unit will be made up of many different individual components.

In today’s world of high-speed Internet, the connection that rests between your router and the Internet is referred to as a broadband connection. Table 8–1 covers some of today’s prominent broadband technologies.

Image

Image

Besides the technologies listed in Table 8–1, a range of other technologies are available, and new ideas and technologies are constantly being developed. What’s interesting about almost all of these, though, is the following:

  • They all carry IP packets from point A to point B.
  • In a broadband environment, most of these technologies (except in most cases wireless technologies) usually just bridge a gap between the Internet and a router on your end.

Because of this, the actual broadband technology has little to do with how you set up your computer to take advantage of it. When the broadband connection enters your home, office, or company, it is usually run into an Ethernet or Wi-Fi router, which in turn you connect to with your computer using standard TCP/IP networking.

TCP/IP NETWORKING

Configuring Your Mac for a Broadband Connection

For your Mac to function on the Internet, it must have the following information:

A qualified IP address: IP addresses are discussed in the “TCP/IP Networking” sidebar; this is a unique address that identifies your computer on the Internet so that all information being sent to your computer actually makes it there. You cannot (usually) just make up an IP address; it must be assigned, or else it may not work.

A subnet mask: A subnet mask is used to separate the network address from the host address. This can be further used within a network to create subnets; breaking up a host address into subnets allows more effective routing of IP traffic. An example of an IPv4 subnet mask is 255.255.255.0, and any IP address that shares the first three octets in the IP address is part of the same subnet. If all that sounds foreign to you, don’t worry, just use the subnet mask your ISP or network administrator gave you.

A gateway address (or router): The router address (also known as a gateway address) is the IP address of the next upstream router.

A DNS server address: The DNS (Domain Name System) server is usually the primary server for your subnet that is responsible for providing DNS services. A DNS server is responsible for translating a domain name (that is, apple.com) into an IP address (in other words, 17.254.3.183). You can list multiple DNS servers if you would like, and if the first one is unable to resolve a domain name, then the next one listed will be consulted.

Search domains (optional): Search domains are an optional list of domains to search if a domain address cannot be resolved by any of the DNS servers. This can provide a shortcut on some networks as well, since it will allow you to address a computer by the host name alone.

While this seems like a lot of information, most routers and networks these days utilize DHCP (Dynamic Host Configuration Protocol) that will automatically assign each of these pieces of data with no necessary input or additional configuration needed from you the user.

NOTE: IPv4 has set aside a number of IP address blocks as private addresses (10.x.x.x, 172.16.x.x, and 192.168.x.x). These private IP addresses are for the creation of private networks that utilize IP. Many routers (and firewalls) take advantage of these private IP addresses to perform network address translation (NAT, aka network masquerading). This allows the router to be assigned a valid Internet IP address yet assign all the computers behind it private IP addresses. The router can then act as a gateway between the private network and the Internet, providing each computer connected to the router with full Internet access without a dedicated IP address. Most current implementations of NAT provide Internet clients with complete functionality. Server processes running behind NAT, however, need special considerations and are limited. This can be used advantageously from a security point of view, and in fact, many firewalls use NAT combined with port forwarding to hide the actual server from the Internet.

NOTE: Port forwarding allows the router or firewall facing the Internet to masquerade as a server while server requests are actually being passed along to other systems on the private network. This can be set up so specific services, which use specific ports, can be passed to specific systems. So, all e-mail traffic using ports 25 (SMTP), 110 (POP3), and 143 (IMAP4) could point to one server behind the router, while all web traffic using port 80 (HTTP) would be directed to another.

There are two primary ways to connect your Mac to a broadband connection: Ethernet and Wi-Fi. Today all shipping Macs include Wi-Fi, and with the exception of the MacBook Air they all include an Ethernet port as well. Provided you are connecting to a network that utilizes DHCP, for an Ethernet connection all that should be required is to plug your computer into the network using an Ethernet cable. For a Wi-Fi network you will need to select the proper Wi-Fi network you are connecting to and, depending on the security, you may need to add a Wi-Fi password. Let’s look closer at connecting to a Wi-Fi network.

NOTE: Apple does provide a USB Ethernet device for the MacBook Air if an Ethernet connection is a necessity for you.

Connecting to a Wi-Fi Network

While configuring a network (or not provided DHCP is present) is the same whether you are connection to an Ethernet or Wi-Fi network, the connection process differs. “Plugging in” to an Ethernet connection is a simple as plugging the network cable into your computer (we are of course assuming that the other end of this cable leads to an active router of some sort). Because of the physical nature of an Ethernet connection, access control and security can be controlled by physically controlling the “wire.” Wi-Fi on the other hand is much more complex, since there are no wires, presumably anyone with a Wi-Fi-enabled device could connect to the Wi-Fi network. Because of this, additional security standards have been implemented in most Wi-Fi networks to both control access and secure wireless data. This added security makes connection to a Wi-Fi network a two-step process that we will walk through here.

CONNECTING TO A WI-FI NETWORK

Image

ALL WI-FI NETWORKS ARE NOT THE SAME

To make viewing and joining Wi-Fi networks faster and easier, a Wi-Fi status menu item is available for your menu bar. To use this, first make sure “Show Wi-Fi status in menu bar” option is checked in the System Preferences Network pane (Figure 8–2). When the Wi-Fi status menu is visible it will provide you with a constant view of the signal strength of your current Wi-Fi network. Clicking the Wi-Fi status icon will open up a menu allowing you to toggle on and off your computer’s Wi-Fi radio as well as provide a list of currently available Wi-Fi networks in your area (Figure 8–5).

Image

Figure 8–5. The Wi-Fi status menu on the menu bar provides you with the information and tools to connect to a Wi-Fi network without using the System Preferences.

TIP: Clicking the Wi-Fi status menu while holding down the Option key will reveal additional information about the Wi-Fi network you are currently connected to.

CAUTION: It is advisable to only connect to Wi-Fi (or other) networks you trust. Many times what appears to be an open Wi-Fi network is actually a honeypot, a tempting network that in reality is used to collect information about you, your computers, and your Internet accounts. These types of shady networks are frequent in public places and should be avoided.

Manual Network Configuration

Suppose you plug in your computer to an Ethernet connection or connect to a Wi-Fi network successfully, but for whatever reason you are still not connected to the network or the Internet. What’s wrong? There are actually a number of things that could be wrong, but the problem usually comes down to one two things: a problem on the network, or a problem on your computer. Network problems are, unfortunately, outside the scope of this book, but if the network is working fine then the problem may be in your network configuration.

Most often the first sign something is wrong is when you attempt to surf the web of check your e-mail. If you try to browse the Web with Safari it will generally let you know when you are not connected (Figure 8–6).

Image

Figure 8–6. Safari will tell you if it cannot reach the Internet. Clicking the Network Diagnostics... button will launch Mac OS X’s Network Diagnostics tool, which will walk you through some steps to repair your network connection.

When things are wrong with your network connection and Network Diagnostics can’t isolate the problem, the next step is to usually go to the System Preferences Network pane. Sometimes just a glance at the System Preferences Network pane can provide a clue as to what’s wrong (Figure 8–7).

Image

Figure 8–7. The yellow circle next to the Ethernet interface indicates the computer is connected to a live Ethernet cable, but something is wrong. In this case it tells us “No IP Address”—a clear sign that DHCP isn’t working.

NOTE: After a moment of not detecting an IP address assigned from a network connection, Mac OS X will automatically assign one to the network interface in the 169.254.x.x range, which is used for Apple’s Bonjour technology (more widely known as Zeroconf). This would, for example, allow you to connect a number of Macs together, either directly or through a hub to form a small private network.

Once you select the interface you’re attempting to configure, you must determine how you wish to configure the network interface. When configuring IPv4 (which is still used most frequently today), you are presented with the following configuration options from the Configure IPv4 drop-down menu:

DHCP: Dynamic Host Configuration Protocol (DHCP) is more and more common these days in almost every environment. Not only does it make setting up a system incredibly easy from the user end, but it also allows reuse of IP addresses and increased manageability from the administrative perspective.

DHCP with manual address: Usually DHCP will automatically assign a computer that connects to it the next available IP address that it has at its disposal. It will lease this address to that particular system for a period of time (and usually continue to renew that lease as long as the system remains connected); however, after a period of time, it may issue the system a different IP address. For most situations, this is fine; however, occasionally a system needs a static (or permanent). This option allows you to pick a static IP address, which most DHCP servers will honor.

NOTE: IP addresses need to be unique; even on a private network, every IP address needs to be different from every other IP address on that network. Because of this, when you manually assign an IP address, you should be careful that it doesn’t belong to the block of IP addresses being dynamically assigned and that it isn’t being used by another system on the network.

BootP: Bootstrap Protocol (BootP) is an older technology that was created to allow diskless workstations or thin clients to receive an IP address automatically from a server. DHCP is based upon BootP but is much more advanced. It would be extremely rare these days to encounter this option.

Manually: This option requires that you manually fill in all the required networking information. If a manual connection is necessary, you should have collected all the appropriate information (IP Address, subnet mask, router, and maybe DNS information) ahead of time.

Off: This turns off the interface.

Create PPPoE Service: This will prompt you to create a new PPPoE (Point-to-Point Protocol over Ethernet) interface for configuring the PPPoE service. If this is required, your service provider will give you the necessary information for this (username, password, and perhaps a service name).

NOTE: The TCP/IP configuration options are visible from the System Preferences Network pane for many interfaces including Ethernet and Bluetooth, however to access them with others (for example, Wi-Fi), you must click the Advanced... button, which will bring up a dialog box with a number of tabs across the top. Selecting the TCP/IP tab will present you with these configuration options as well. If you must configure DNS, you must click the Advanced... button and select the DNS tab for any interface.

NETWORK DIAGNOSTICS

Image

Figure 8–8. The Network Diagnostics tool can help you troubleshoot a faulty Internet connection.

TIP: Occasionally when you try to connect to an Internet connection, you are initially connected to a private network and many services won’t work. To complete the connection you must first open your web browser and follow a series of steps to connect to the Internet. This is common in hotels, and many public Wi-Fi hotspots.

Other Network Connections

Besides the broadband connections listed previously, there are many other ways that you may connect to the Internet with your Mac. Many mobile wireless providers (including AT&T, Verizon, T-Mobile, Vodafone, and so on) provide various capabilities to connect to the Internet using their networks. These include dongles that plug into your USB port that serve as modems, or tethering your mobile phone either through a cable or through Bluetooth so your computer can utilize your phones network connection. The various instructions for setting up each of these connections should be provided by your wireless carrier.

NOTE: Many phones these days (including the newest iPhones) can actually provide Wi-Fi service to your computer. This makes connecting to a mobile wireless network from your Mac as easy as connecting to any other Wi-Fi network.

One type of networking that is gone from Mac OS X Lion is dial-up networking. The current versions of Lion no longer have the built-in capability to dial in using a modem (in fact, when you try to connect an Apple USB modem to a Lion computer, you get a dialog stating, “Unsupported You cannot use an Apple USB Modem with this computer.”

Creating Separate Networking Profiles for Different Locations

If you rely on DHCP for everything or you never move your computer around, then you really don’t have to futz around with networking much (lucky you). However, if you are using a portable computer and you need to connect multiple networks that use different settings, then you may want to take advantage of the Location feature. At the top of the Network System Preference pane, there is a drop-down list that by default is set on Automatic. While Automatic is selected, any changes you make to any of your network interfaces are saved in the Automatic location.

If you need to have multiple network configurations—one at home that is basically the same as the Automatic setting and one for work where you are assigned specific networking information—then you can add a location from the Location drop-down list at the top of the Network System Preference pane and configure the networking for any specific locations as needed. Once you have multiple locations set up, a Location item will appear in your Apple menu that will allow you to switch your networking preferences from one location to the next.

Summary

This chapter covered what you need to get your Mac connected to the Internet. We attempted to skirt around some of the more complex networking issues, saving most of those for Part 6 of this book, which is dedicated to networking. The point of this chapter was to get you up and running so you can follow along with the next chapters, which cover Safari, Mail, and other Internet-related applications.

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

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