Networking All-in-One For Dummies. Doug Lowe

Чтение книги онлайн.

Читать онлайн книгу Networking All-in-One For Dummies - Doug Lowe страница 58

Networking All-in-One For Dummies - Doug Lowe

Скачать книгу

stands for Internet Protocol, and its primary purpose is to enable communications between networks. As a result, a 32-bit IP address actually consists of two parts:

       The network ID (or network address): Identifies the network on which a host computer can be found

       The host ID (or host address): Identifies a specific device on the network indicated by the network ID

      Most of the complexity of working with IP addresses has to do with figuring out which part of the complete 32-bit IP address is the network ID and which part is the host ID, as described in the following sections.

      

As I describe the details of how host IDs are assigned, you may notice that two host addresses seem to be unaccounted for. For example, the Class C addressing scheme, which uses eight bits for the host ID, allows only 254 hosts — not the 256 hosts you’d expect. The host ID can’t be 0 (the host ID is all zeros) because that address is always reserved to represent the network itself. And the host ID can't be 255 (the host ID is all ones) because that host ID is reserved for use as a broadcast request that’s intended for all hosts on the network.

      The dotted-decimal dance

      IP addresses are usually represented in a format known as dotted-decimal notation. In dotted-decimal notation, each group of eight bits — an octet — is represented by its decimal equivalent. For example, consider the following binary IP address:

       11000000101010001000100000011100

      To convert this value to dotted-decimal notation, first divide it into four octets, as follows:

       11000000 10101000 10001000 00011100

      Then, convert each of the octets to its decimal equivalent:

       11000000 10101000 10001000 00011100192 168 136 28

      Then, use periods to separate the four decimal numbers, like this:

       192.168.136.28

      This is the format in which you’ll usually see IP addresses represented.

Schematic illustration of the octets and dotted-decimal notation.

      FIGURE 3-2: Octets and dotted-decimal notation.

      When the original designers of the IP protocol created the IP addressing scheme, they could have assigned an arbitrary number of IP address bits for the network ID. The remaining bits would then be used for the host ID. For example, suppose that the designers decided that half of the address (16 bits) would be used for the network, and the remaining 16 bits would be used for the host ID. The result of that scheme would be that the Internet could have a total of 65,536 networks, and each of those networks could have 65,536 hosts.

      In the early days of the Internet, this scheme probably seemed like several orders of magnitude more than would ever be needed. However, the IP designers realized from the start that few networks would actually have tens of thousands of hosts. Suppose that a network of 1,000 computers joins the Internet and is assigned one of these hypothetical network IDs. Because that network will use only 1,000 of its 65,536 host addresses, more than 64,000 IP addresses would be wasted.

      WHAT ABOUT IPv6?

      Most of the current Internet is based on version 4 of the Internet Protocol, also known as IPv4. IPv4 has served the Internet well for more than 30 years. However, the growth of the Internet has put a lot of pressure on IPv4’s limited 32-bit address space. This chapter describes how IPv4 has evolved to make the best possible use of 32-bit addresses. Eventually, though, all the addresses will be assigned, and the IPv4 address space will be filled to capacity. When that happens, the Internet will have to migrate to the next version of IP, known as IPv6.

      IPv6 is also called IP next generation, or IPng, in honor of the favorite television show of most Internet gurus, Star Trek: The Next Generation.

      IPv6 offers several advantages over IPv4, but the most important is that it uses 128 bits for Internet addresses instead of 32 bits. The number of host addresses possible with 128 bits is a number so large that it would have made Carl Sagan proud. It doesn’t just double or triple the number of available addresses, or even a thousand-fold or even a million-fold. Just for the fun of it, here is the number of unique Internet addresses provided by IPv6:

       340,282,366,920,938,463,463,374,607,431,768,211,456

      This number is so large it defies understanding. If the Internet Assigned Numbers Authority (IANA) had been around at the creation of the universe and started handing out IPv6 addresses at a rate of one per millisecond — that is, 1,000 addresses every second — it would now, 15 billion years later, have not yet allocated even 1 percent of the available addresses.

      The transition from IPv4 to IPv6 has been slow. IPv6 is available on all new computers and has been supported on Windows since Windows XP Service Pack 1 (released in 2002). However, most ISPs still base their service on IPv4. Thus, the Internet will continue to be driven by IPv4 for at least a few more years.

      The first four bits of the IP address are used to determine into which class a particular address fits, as follows:

       Class A: The first bit is zero.

       Class B: The first bit is one, and the second bit is zero.

       Class C: The first two bits are both one, and the third bit is zero.

       Class D: The first three bits are all one, and the fourth bit is zero.

       Class E: The first four bits are all one.

Скачать книгу