Nice Names and Appetizing Addresses (TCP/IP) Part 2

Obtaining an IP Address

Before you obtain an IP address for your network, we first have to ask whether you want a private address or a global Internet address.

The answer depends on whether you need an address for a private network or a global public network, such as the Internet.

Choosing whether to go public or stay private

A private network is also known as a nonroutable network because it isn’t connected to the Internet — at least not directly.None of our computers connects to the Internet. We can use any IP addresses on our private network we want because the Internet doesn’t know anything about them, and it doesn’t care. However, the Internet powers that be have reserved a set of addresses just for private networks. These addresses, which can be within the range of 192.168.0.0 to 192.168.255.255, appear often in the examples in this topic.

Figure 4-3 displays a private network. That network’s router connects the network to an ISP, and the ISP connects to the Internet. So we have Internet access without having to put ourselves "out there" publicly.

This private network doesn't need globally unique IP addresses.


Figure 4-3:

This private network doesn’t need globally unique IP addresses.

Any device connected directly to the Internet must have a unique IP address. If you aren’t directly connected to the Internet, for example, your computers connect to your ISP (Internet service provider), and you can still get a global, unique IP address if you need it.

The IP address powers that be

The Internet Assigned Numbers Authority (IANA) manages the worldwide assignment of IP addresses. IANA delegates its responsibility by passing out massive blocks of addresses to the Regional Internet Registries, or RIRs.

RIRs hand out IP addresses in their respective regions. As of this writing, these five RIRs serve different regions:

AfriNIC: Africa

APNIC: Asia Pacific

ARIN: North America and several Caribbean and North Atlantic islands

LACNIC: Latin America and the rest of the Caribbean

RIPE NCC: Europe, the Middle East, and parts of central Asia

Check out how to request an IP addresses from one of the organizations by reading the document at www.arin.net/registration/ guidelines/ipv4_initial_alloc. html.

Obeying the network police

If you work in an organization that uses a private network — granted, it might be much bigger than the private network shown earlier (refer to Figure 4-3), don’t think that you can pick any address you like for your computer.

Large organizations employ network administrators (known affectionately as the network police) who tell you what to use for an address so that yours doesn’t conflict with anyone else’s. Your network police officer is there to ensure that no one "squats" at a network address that’s already in use. If the network police force doesn’t do its job and you set up your computer to use an existing address, don’t come complaining to us that you never receive your e-mail or that you’re receiving someone else’s junk mail.

If your organization uses the Dynamic Host Configuration Protocol (DHCP), the DHCP server software automatically assigns an IP address to your host.

Obtaining a globally unique IP address

On the Internet, where many thousands of networks are interconnected, the assignment of the network number portion of the IP address keeps the organizations clearly identified and separate.

To connect your network to the Internet, you need an official block of addresses and a registered domain name (to append to your computers’ names to create their fully qualified domain names).

Now, if you need a global IP address, you won’t go to IANA (described in the nearby sidebar, "The IP address powers that be") unless you’re a giant telecom company. Most organizations receive global addresses from an Internet Service Provider (ISP), such as Comcast, Verizon, Deutsche Telekom, NTT Communications, and many more around the world.

Acquiring a static address

When you have a static address, your IP address is always the same. When your computer starts up, it immediately knows your address. Your address never changes. But static addresses have some problems, such as

✓ More work for the network administrator. Even in a small home network, extra work can be annoying because you have to set up each computer’s address separately. If something changes in your network, you have to change all the addresses.

✓ Possible waste: If your computer goes off the network, its IP address isn’t needed and is therefore wasted. It might not seem like a problem in a small office/home office (SOHO), but imagine a large corporation with thousands of static addresses. If half its computers don’t need to be networked all the time, its addresses go to waste part of the time.

Getting dynamic addresses with DHCP

DHCP gives network administrators a break. If you hate the idea of doing the math, you can let DHCP help. DHCP is the TCP/IP protocol that automatically assigns and tracks IP addresses while the network administrator does something else (like take a stroll on the beach).

Besides giving network administrators a rest, DHCP saves waste. A computer gets an IP address only when it needs one.

Finding out your IP address

Most likely, you know the name of your computer, but if you don’t, you can easily find out its name and address by using the ipconfig command (Windows) or the ifconfig command (Mac OS X, Linux, and Unix). The ipcon-fig and ifconfig commands provide lots of information about your computer’s network settings. Using the command works a little differently depending on your operating system, but the results are the same.

Using ipconfig in Windows to digest network information

Whatever flavor of Windows you like to munch, you need to run ipconfig in a command window. (It has no cute little icon.) Follow these steps to run ipconfig:

1. Click the Start button to open the Start menu.

2. Click Run.

3. Type command or cmd in the Run box.

4. Type ipconfig in the black command window.

5. If you want to see much more than your computer’s IP address, such as whether it’s static or dynamically allocated by a DHCP server, type ipconfig /all.

Figure 4-4 shows the output from a basic ipconfig command. You can find out a lot about your computer’s network configuration by using the ipconfig command. 

The output from a basic ipconfig command.

Figure 4-4:

The output from a basic ipconfig command.

Using ifconfig in Mac OS X

Follow these steps to find your computer’s IP address in Mac OS X:

1. Use Finder to open the Applications folder.

2. Go to Utilities.

3. Open a terminal window.

4. Type ifconfig at the prompt in the terminal window.

When you see en0 (wired) or en1 (wireless), you’re looking at information about your NIC.

5. Find your IP address on the line labeled with inet.

In Mac OS X, Linux, and Unix, if you want to see all the information, rather than use the /all option, as in Windows, use -a instead:

tmp9-23_thumb[2]

Using ifconfig on Linux or Unix

To find your IP address on Linux or Unix, you do basically the same thing as on Mac OS X: Open a terminal window and follow the Mac OS X instructions in the preceding section. Linux and Unix typically use eth0 or eth1 as your NIC.

Resolving Names and Addresses with DNS

In this section, you discover another TCP/IP service: the Domain Name System (DNS, pronounced by saying the letters "D N S"). But when you fish for information with the DNS rod and reel, you’re fishing around not just on your own intranet but also on the Internet. All servers connected to the Internet use DNS to translate Internet host names into IP addresses.

Understanding the minimum amount of information about DNS

A name service resolves (translates) a computer name into a numeric address. The Domain Name System, which is the name service for the Internet, translates computer names into TCP/IP numeric addresses.

Another way to say that DNS translates or resolves names and numeric addresses is to say that DNS maps names to addresses.

If your organization’s network is connected to the Internet, you must use DNS. If your organization has a private intranet, you can either use DNS to provide the name service for your network or create a hosts file with the names and addresses of the devices on your intranet.

DNS was created specifically to handle the requirement that every computer needs to be uniquely named on the network. By adding some pieces to your computer name to make it unique, DNS solves the problem of duplicate computer names.

Using DNS to "Do Nifty Searches"

In techie terms, DNS is the name-and-address resolution service used on the Internet. In more straightforward terms, DNS is a kind of directory service. It searches for the numeric Internet address for a computer name and vice versa. (Of course, if we could remember those complicated numeric addresses, we wouldn’t need a name-and-address resolution service, but brain cells being what they are, we’d rather think of a computer as bigbird rather than as 192.168.0.1.)

As mentioned earlier in this topic, hosts on a TCP/IP network have both a name and a numeric IP address. When you use a name, either the hosts file or DNS must translate the names into numbers behind the scenes.

Let’s look at the mythical address abc.university.edu. Remember that the first piece of this address, abc, is the computer’s name; the last piece of the address, on the right, edu, represents a domain name — a DNS top-level domain name. The intermediate piece (university) is a secondary domain name, which represents such elements as organization names.

Describing Fully Qualified Domain Names (FQDNs)

Various products and applications use the term domain to mean different things. The Internet is so huge that it organizes its participating computers into groups of administrative units; these units are domains. DNS defines domain in the context of a large network, such as the Internet. The domains themselves are organized hierarchically into a tree structure, as shown in Figure 4-5. The next sections explain more about the ICANN domain labeling system.

Internet domains are hierarchical.

Figure 4-5:

Internet domains are hierarchical.

Next post:

Previous post: