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

If your computer is already on a network and you always call computers by name and you’re not interested in what TCP/IP is doing to your computer’s name behind the scenes, you can breathe easy in this topic. The only thing you need to know now is another term for a computer — a host — and what it means.

However, if you need to get your computer on the network or the Internet, or if you want to know the meaning of all those strings of numbers and dots you see when you use an application such as FTP or telnet, stay right here. Most of the information in this topic is aimed at you — especially if you’re a beginning network administrator.

What Did You Say Your Host’s Name Is?

If your computer uses TCP/IP, your computer must have a name. You can choose it yourself for your home computer. Most likely, your work organization has a naming policy that helps you select a name or limits your choices. In some cases, a system manager or network administrator gets to have all the fun and assign a name to your computer for you.

The network used for the examples in this topic consists of a few hosts. Some of them are named this way:

woodstock baldEagle hawk tweety pinkflamingo

Your host or computer — we use the names interchangeably from now on — has a name and a number. The name alone may not be unique.For now, we’ll stick with just simple host names. Your computer’s number is an address.


Playing the numbers game

Your computer has a number, known as your host’s IP address, and the greater part of this topic is devoted to its format. Your computer may have more than one IP address, depending on how many networks it’s connected to.

Your computer’s name and IP address can change. Your computer can take on nicknames, change names, and have multiple identities.

You could have a network where all the computers had numeric addresses and no names, but it would make life difficult, (almost impossible) for most of us. Here are two reasons why names are important:

✓ Name recognition: Humans like to name things (dogs, cats, goldfish) and can remember those names. Computers like dealing with numbers and only numbers

✓ Ease of use: Knowing a particular computer’s name makes it easier to connect to a specific computer when you need to use the services it offers. For example, you can connect to 192.168.253.9, but remembering and typing pinkflamingo is much easier.

Table 4-1 lists the host names and IP addresses in our TCP/IP.

Table 4-1

Computers in Our Network

Host Name

IP Address

woodstock

192.168.253.5

baldEagle

192.168.253.6

hawk

192.168.253.7

tweety

192.168.253.8

pinkflamingo 192.168.253.9

Identifying a computer as uniquely yours

Suppose that your computer name isn’t unique on your network or the Internet. Let’s compare two companies named Lotus: One makes cars; the other makes software. If you try to connect by way of FTP to a computer named lotus, would you find files related to cars or software?

TCP/IP and the Internet require that every computer on the network (and in the world) be uniquely identified by both name and address. To identify a computer named lotus, for example, you need more names — kind of like first, middle, and last, and maybe more.

A computer’s full name is its fully qualified domain name, or FQDN. (Go ahead — try to say it three times fast.) The FQDN for the computer named lotus might be

tmp9-14_thumb

Here’s a breakdown:

✓ Computer name: lotus

✓ Organization name: wileiden

✓ Internet top-level domain: com (short for commercial organization)

Here’s another example:

tmp9-15_thumb

And here’s what’s in it:

✓ Computer name: lotus

✓ Organization name: carcollege

✓ Internet top-level domain: edu (short for educational institution)

Translating names into numbers

A numeric IP address identifies hosts on a network. Yes, you usually type the host’s name, but somewhere along the way a TCP/IP service resolves that name into the numeric IP address.

✓ Host just a few translations: On a small network, your computer may have a hosts file, which translates host names into IP addresses. This simple text file lists a computer’s name and its IP address.

✓ Translate big-time with DNS: On a big network (none bigger than the Internet), where the hosts file is enormous, the DNS performs the name/ address resolution. Later in this topic, you can read a brief introduction to DNS.

Taking a Closer Look at IP Addresses

The address where you live is made up of several parts. It can include many elements that identify you — your street name, post office box, city, region (province, state, canton, or county), country, and postal code, for example. The same is true of your computer (host). The difference is that you know your home address — it consists mostly of text with a few numbers — but you may or may not know your computer’s IP address, which comprises numbers and dots.

Two versions of IP are now in use: IPv4 and IPv6. Although IPv6 is the next generation of IP addressing, IPv4 is still much more widely used. You can use both IPv4 and IPv6 together. Frequently, people refer to both v4 and v6 as simply IP. In this topic.

✓ IPv6 addressing builds on the IPv4 foundation.

✓ IPv4 and IPv6 will exist together for a long time to come.

✓ If you’re not ready for IPv6, you can use a workaround if you have an IP address shortage.

The IP address (to be specific, the IPv4 address) is a set of numbers separated by dots. It identifies one host. Every device on the TCP/IP network (that is, every network interface on the network — some devices may have more than one) needs a unique IP address. If your host is on a TCP/IP network, that host has an IP address, even if you always call your computer by name.

You may have noticed this numeric address showing up in messages and wondered what it was. For example, telnet reports the IP address as it tries to connect to the remote host. Here’s a brief sample; you connect to flyingpenguin by name, and telnet announces the flyingpenguin IP address:

tmp9-16_thumb

Savoring Classful Addressing

If you’ve seen a few numeric IP addresses, you’ve most likely seen classful addresses. Classful addresses have four numbers separated by dots, such as the address for flyingpenguin, in the preceding section. This IP addressing format is the conventional addressing method used by IPv4.

An IPv4 address is a 32-bit number that has two sections: the network number and the host number. (You can’t see the division.Addresses are written as four fields, 8 bits apiece, separated by dots. Each field can be a number ranging from 0 to 255. This style of writing an address is dotted decimal notation.

All hosts on the same network must use the same network number. Each host or network interface on the same network must have a unique host number. The following excerpt is from a hosts file, which translates names into numbers and vice versa. The last two digits of each address, the host numbers, are unique. The rest of each address comprises the network number. Notice that the network number is the same for every host because all the hosts are on the same network:

tmp9-17_thumb

An IP address has four parts, and those parts divide into two pieces: the network piece and the host piece.

Figure 4-1 shows how the size of the network and hosts parts differ, based on the class of the network. The hosts in the Cardinal Consulting, Inc. LAN are part of a Class C network. (See the next section for more on network classes.)

As the network size grows, the number of hosts shrinks.

Figure 4-1:

As the network size grows, the number of hosts shrinks.

In the figure, the parts of the address that represent the network comprise the network prefix.

The basic structure of an IP address consists of two sections: the network ID and the host ID. Where this 32-bit address is divided depends on the network class.

Recognizing the Parts of an IP Address

If you’ve read this far, you know that a classful IPv4 address has four parts and looks like this:

tmp9-19_thumb

The Internet is divided into classes because Internet addresses were handed out in specific groups called classes.

The meaning of these parts depends on your network class. TCP/IP has four classes of networks, as described in the following sections. Although only three classes are now widely used, the fourth has a special purpose. Whether your organization connects to the Internet or is a private intranet, the first three classes work the same way.

Class A is for a few enormous networks

Theoretically, only 127 Class A networks can exist on the Internet, but each one of those can have a huge number of hosts: about 17 million apiece (16,777,216, to be exact). Only a few very large organizations need Class A networks. By the way, no Class A network starts with the number 0, and the entire Class A network numbered 127 is reserved, leaving only 126 Class A networks.

Class B is for lots of big networks

Although Class B networks aren’t nearly as enormous as Class A networks, they’re still hefty. Each Class B network can have about 65,000 hosts — the size needed by large universities and larger companies. The Internet can support as many as 16,384 Class B networks.

Class C is for millions of small networks

Class C networks are much smaller than Class A and B networks, and the Internet has more than 2 million (2,097,152) of them. Most networks connected to the Internet are Class C. Each one can have only 254 hosts.

Class D is for multicasting

Class D networks are completely different from the other classes — they’re used for multicasting, which is a special way of transmitting information from a server to a set of clients all at the same time. Multicasting is the technology that supports such cool applications as audio- and video-conferencing and radio and television stations that exist only on the Internet.

Days or weeks before a "broadcast," the sponsoring organization announces (by way of e-mail or Usenet news) the Class D network address that the server will use for the transmission. (Radio and television stations are assigned permanent addresses so that they can transmit constantly if they choose to.) Plenty of channels are available because Class D addresses range from 224.0.0.0 to 239.255.255.255. At the assigned date and time for the broadcast, you tune (configure) your client software to the proper Class D address. The broadcast works just like ordinary radio and television except that it’s on the Internet.

Real-time applications require special-purpose, multicast-aware routers so that the packets always arrive in the proper order and none is missing. These routers on the Internet form the IP multicast backbone, or MBone.

Biting Down on Bits and Bytes

You might wonder who first determined the number of hosts in Class A, B, and C networks, and you might wonder why only 127 Class A networks exist when (almost) a zillion class C networks exist.

It all has to do with the arrangement of the bits inside the addresses. For example, Class A addresses use the first field as the network section and the next three fields as the host section. The more fields a section has, the larger the number that results. Because Class A has only one field in the network section, it can have only a small number of networks. But the three fields in the hosts part allow each of those 127 networks to have a ton of computers.

Table 4-2 shows how the four fields of the IP address are assigned to the network section and host section.

Table 4-2

The Two Sections of the IP Address

Network Class

Network Section

Host Section

A

field1

field2.field3.field4

B

field1.field2

field3.field4

C

field1.field2.field3

field4

Danger — math ahead! If you already understand binary numbers and how to convert from decimal to binary, skip ahead to the next section. If you don’t understand binary numbers, this section takes you back to school. Get ready to look at place values in a whole new way.

Figure 4-2 takes the number 127 apart to show how it’s constructed in binary. A computer looks at the number 127 as an arrangement of 0s and 1s. Computers ultimately do everything in binary, or base 2. So if you look at the place value columns in Figure 4-2, you don’t see the familiar 1s, 10s, 100s, and so on, from the decimal system. Rather, you see the 1s, 2s, 4s, 8s, 16s, 32s, 64s, 128s, and so on. (Remember: In binary, the only possible values in a column are 0 or 1. Also remember that a byte contains 8 bits.) In the decimal system, it takes three columns — the 1s column, the 10s column, and the 100s column — to represent the number 127. To get to 127, therefore, a binary number has 7 columns: the 1s, 2s, 4s, 8s, 16s, 32s, and 64s.

Classy bits

In a computer, each place-value column in a binary number is represented by a bit. In the early days of computers, you could look inside the cabinet and see circular magnets, or cores; each magnet was a bit. A core magnetized in one direction (clockwise, for example) meant that the bit was set to 1. A core magnetized in the other direction (counterclockwise) meant that the bit was set to 0. Modern transistors and semiconductors have replaced the magnets so that seeing what’s going on inside is more difficult — but the computer still uses bits of 1 and 0. All numbers inside the computer, from 0 to 1,000,000,000,000 and higher, are made from bits. The computer keeps adding the 1s and 0s until it reaches the total, such as 127.

If every bit of the Class A network piece were set to 0 or 1, that would result in a higher number than the 127 allowed by the Internet. Figure it out:

128+64+32+16+8+4+2+1

But TCP/IP requires that the high-order bit for a Class A network is always 0. According to this rule, when you add up the bits, you get 0+64+32+16+8+4+2+1 for the number of Class A networks that a 32-bit address allows. To determine how many networks and hosts were allowable for each Internet class, the maximum value was calculated for the field combinations of each section. The rules for Class B state that the first two high-order bits must be 1 and 0. For Class C, the first two high-order bits must be 1 and 1.

The high-order bits are the bits at the end of the number. Which end they’re on depends on whether your computer reads from right to left or from left to right. If a computer reads from right to left, as does a PC, the high-order bits are the ones on the far left end.

Binary numbers are as easy as 1-2-3. Oops — make that 0-1-0.

Figure 4-2:

Binary numbers are as easy as 1-2-3. Oops — make that 0-1-0.

Next post:

Previous post: