[3 pages — 2533 words]


INTRODUCTION

In a previous lesson we discussed the Internet Protocol and the structure of IP addresses. An IP address identifies the source and destination of a directed or unicast message and is defined in RFC 761. IPv4 is the most common version of IP addressing requiring 32-bit addresses. Although IPv6, the 128-bit version, will be used in the future, this lesson will restrict the discussion to IPv4. IPv6 was developed because the explosive growth of the Internet will soon deplete the inventory of available addresses. At one time, 32-bit addresses seemed to provide more than enough addresses but there was much waste in initial assignments and the class structure of IP addresses was inefficient. In order to make more efficient usage of IP address, the concept of subnetting was introduced with RFC 950. This lesson introduces this concept.


Networks and Hosts

When we talk about a network we usually envision a cluster of workstations with one or more servers connected to a local area network. Each server and workstation would have a unique address to distinguish it from the other computers. With IP addressing, servers and workstations are all termed hosts but each address not only identifies a host but the address of the network on which the host resides. This is because IP is an internetworking protocol that not only allows communication between hosts on the same network, but communication between hosts on different networks as well. The 32-bit IP address identifies a particular host along with the network on which the host resides. The structure of IP addressing is defined so that any host on the public Internet can be found by any other host.

The format of the 32-bit address is <netid, hostid> and it is usually shown as four bytes of data. Although each byte could be represented as a binary, decimal or hexadecimal number, the decimal-dot-decimal notation is the most popular. Therefore, the range of IP addresses can span 0.0.0.0 to 255.255.255.255. For example, 193.5.8.254 is a valid IP address but it is difficult to determine which part of the address is the network ID and which part is the host ID. To understand the two you need to know about class addressing.

Class Addressing

IPv4 is called a classful system under RFC 761 with IP addresses being defined as belonging to one of five Classes A, B, C, D or E. Classes A, B and C define different possible combinations of network and host addresses. Class D is reserved for multicasting. Multicasting is the ability of one host to communicate with many other hosts with one transmission and is beyond the scope of this lesson. Class E is reserved for future use. The classes of interest to subnetting are A, B and C.

With Class A addresses, the first byte of the address identifies the network address while the three remaining bytes identify the host. With Class B addresses, the first two bytes identify the network address while the remaining two identify the host address. With Class C addresses, the first three bytes identify the network address while the last byte identifies the host. That seems simple enough but how do you know you are looking at either an A, B, C, D or E address?

The four-byte IP address is viewed from left to right with the first byte on the left. This is the most significant byte. The first few bits (most significant) of that byte identify the class of address. For a Class A address, the left most bit must be a zero. For a Class B address, the first two bits must be a 10. For a Class C address, the first three bits must be a 110. For a Class D address, the first four bits must be a 1110. For a Class E address, the first four bits must be a 1111. Therefore, it is only necessary to observe the first byte of the IP address to determine its class. Figure 1 shows the decimal value of the first byte for each class.

Class A:   001–126

Class B:   128–191

Class C:   192–223

Class D:   224–239

Class E:   240–254

Figure 1 — The class of an IP address can be
quickly identified by observing only the first byte.


Reserved Addresses

There are some reserved IP address besides those identified as Classes D and E. For example, the Class A network address 0.X.X.X cannot be used since it is used to indicate “this” network. Class A address 127.X.X.X is reserved for loop back testing. With the host portion of the address, you cannot have an all 0s host, which refers to the network address where the hosts reside. Likewise, you cannot use the all 1s host address because that indicates a broadcast which is a message to all hosts on the network. Therefore, with any host addressing on either a Class A, B or C network, you lose 2 host addresses. Still with 4 billion possible addresses from a 32-bit address space, you would think there are plenty of addresses even with reserved addresses. The problem is that there was much waste when addresses were originally assigned. For example, a Class A address can handle 16 million hosts per one network ID. That is an enormous amount of hosts for just one network. Even a Class B address can handle 65 thousand hosts per network ID. A Class C address can handle only 254 hosts per network ID which may be too little for some networks. A scheme was needed to obtain a better balance between network and host assignments and that is called subnetting.

(No part of this article may be reproduced without the written consent of the Industrial Ethernet University.)