IPv4 Addressing

Home Forums Networking Cisco Routers & Switches How-to IPv4 Addressing

Viewing 1 post (of 1 total)
  • Author
  • Avatar

    When TCP/IP was first introduced in the 1980s, it relied on a two level addressing scheme. At the time, this scheme offered adequate scalability. The 32-bit long IPv4 address identifies a network number and a host number.

    Together, the network number and the host number uniquely identify all hosts connected by way of the Internet. It is possible that the needs of a small networked community, such as a LAN, could be satisfied with just host addresses. However, network addresses are necessary for end systems on different networks to communicate with each other. Routers use the network portion of the address to make routing decisions and facilitate communication between hosts that belong to different networks.

    Unlike routers, humans find working with strings of 32 ones and zeros tedious and clumsy. Therefore, 32-bit IP addresses are written using dotted decimal notation. Each 32-bit address is divided into four groups of eight, called octets. Each octet is converted to decimal and then separated by decimal points, or dots.

    In the dotted decimal address,, which of these four numbers represents the network portion of the address? Which numbers are the host numbers? Finding the answers to these questions is complicated by the fact that IP addresses are not really four numbers. They actually consist of 32 different numbers or 32 bits.

    In the early days of TCP/IP, a class system was used to define the network and host portions of the address. IPv4 addresses were grouped into five distinct classes. This was done according to the value of the first few bits in the first octet of the address. Although the class system can still be applied to IP addresses, networks today often ignore the rules of class in favor of a classless IP scheme.

    In the next few sections, all of the following topics related to IP addressing will be covered:

    The limitations of the IP address classes
    The subsequent addition of the subnet mask
    The addressing crisis that led to the adoption of a classless system

    Class A and B IP addresses

    In a class system, IP addresses can be grouped into one of five different classes:
    Each of the four octets of an IP address represents either the network portion or the host portion of the address depending on the address class.

    Only the first three classes, A, B, and C, are used for addressing actual hosts on IP networks. Class D addresses are used for multicasting. Class E addresses are reserved for experimentation and are not shown in the figure. The following sections explore each of the five classes of addresses.

    Class A Addresses
    If the first bit of the first octet of an IP address is a binary 0, then the address is a Class A address. With that first bit being a 0, the lowest number that can be represented is 00000000, decimal 0. The highest number that can be represented is 01111111, decimal 127. Any address that starts with a value between 0 and 127 in the first octet is a Class A address. These two numbers, 0 and 127, are reserved and cannot be used as a network address.

    Class A addresses were intended to accommodate very large networks, so only the first octet is used to represent the network number. This leaves three octets, or 24 bits, to represent the host portion of the address. With 24 bits total, 224 combinations are possible, yielding 16,777,216 possible addresses. Two of those possibilities, the lowest and highest values, are reserved for special purposes. The low value is 24 zeros and the high value is 24 ones. Therefore, each Class A address can support up to 16,777,214 unique host addresses.

    Why are two host addresses reserved for special purposes? Every network requires a network number. A network number is an ID number that is used to refer to the entire range of hosts when building routing tables. The address that contains all 0s in the host portion is used as the network number and cannot be used to address an individual node. is a Class A network number. Similarly, every network requires a broadcast address that can be used to address a message to every host on a network. It is created when there are all 1s in the host portion of the address.

    With almost 17 million host addresses available, a Class A network actually provides too many possibilities for one company or campus. Although it is easy to imagine an enormous global network with that many nodes, the hosts in such a network could not function as members of the same logical group. Administrators require much smaller logical groupings to control broadcasts, apply policies, and troubleshoot problems. Fortunately, the subnet mask allows subnetting, which breaks a large block of addresses into smaller groups called subnetworks. All Class A networks are subnetted. If they were not, Class A networks would represent huge waste and inefficiency.

    How many Class A addresses are there? Since only the first octet is used as a network number and it contains a value between 0 and 127, 126 Class A networks exist. Each of the 126 Class A addresses have almost 17 million possible host addresses that make up about half of the entire IPv4 address space. Under this system, a mere handful of organizations control half of the available Internet addresses.

    Class B Addresses
    Class B addresses start with a binary 10 in the first 2 bits of the first octet. Therefore, the lowest number that can be represented with a Class B address is 10000000, decimal 128. The highest number that can be represented is 10111111, decimal 191. Any address that starts with a value in the range of 128 to 191 in the first octet is a Class B address.

    Class B addresses were intended to accommodate medium size networks. Therefore, the first two octets are used to represent the network number, which leaves two octets or 16 bits to represent the host portion of the address. With 16 bits total, 216 combinations are possible, yielding 65,536 Class B addresses. Recall that two of those numbers, the lowest and highest values, are reserved for special purposes. Therefore, each Class B address can support up to 65,534 hosts. Though significantly smaller than the networks created by Class A addresses, a logical group of more than 65,000 hosts is still unmanageable and impractical. Therefore, like Class A networks, Class B addresses are subnetted to improve efficiency.

    There are 16,384 Class B networks. The first octet of a Class B address offers 64 possibilities, 128 to 191.The second octet has 256 possibilities, 0 to 255. That yields 16,384 addresses, or 25 percent of the total IP space. Nevertheless, given the popularity and importance of the Internet, these addresses have run out quickly. This essentially leaves only Class C addresses available for new growth.

    Classes of IP addresses: C, D, and E
    Class C Addresses

    A Class C address begins with binary 110. Therefore, the lowest number that can be represented is 11000000, decimal 192. The highest number that can be represented is 11011111, decimal 223. If an IPv4 address contains a number in the range of 192 to 223 in the first octet, it is a Class C address.
    Class C addresses were originally intended to support small networks. The first three octets of a Class C address represent the network number. The last octet may be used for hosts. One host octet yields 256 possibilities. After subtracting the all 0s network number and the all 1s broadcast address, only 254 hosts may be addressed on a Class C network. Whereas Class A and Class B networks prove impossibly large without subnetting, Class C networks can impose an overly restrictive limit on hosts.

    With 2,097,152 total network addresses containing a mere 254 hosts each, Class C addresses account for 12.5 percent of the Internet address space. Since Class A and B addresses are nearly exhausted, the remaining Class C addresses are all that is left to be assigned to new organizations that need IP networks. The figure summarizes the ranges and availability of three address classes used to address Internet hosts.

    Class D Addresses
    A Class D address begins with binary 1110 in the first octet. Therefore, the first octet range for Class D addresses is 11100000 to 11101111, or 224 to 239. Class D addresses are not used to address individual hosts. Instead, each Class D address can be used to represent a group of hosts called a host group, or multicast group.

    For example, a router configured to run Enhanced Interior Gateway Routing Protocol (EIGRP) joins a group that includes other nodes that are also running EIGRP. Members of this group still have unique IP addresses from the Class A, B, or C range, but they also listen for messages addressed to The 224 octet, designates the address as a Class D address. Therefore, a single routing update message can be sent to, and all EIGRP routers will receive it. A single message sent to several select recipients is called a multicast. Class D addresses are also called multicast addresses.

    A multicast is different from a broadcast. Every device on a logical network must process a broadcast, whereas only devices configured with Class D address receive a multicast.

    Class E Addresses
    If the first octet of an IP address begins with 1111, then the address is a Class E address. Class E addresses are reserved for experimental purposes and should not be used for addressing hosts or multicast groups.


Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.