A course in TCP/IP
networking
Part 4: Classful Addressing
Historical Networking
Modern networks can use any subset of the IP address space for network and host addresses, but originally the IP address space was divided up into classes. Each class consisted of an arbitrary subset of the entire IP address space, and each class was allocated a whole number of bytes as the network portion of the IP address: 1 (Class A), 2 (Class B) or 3 (Class C). Networking that uses this addressing scheme is called classful addressing.
Defining classful networks
Class A networks use the first byte of the IP address for the network number, and the last three bytes for the host number, so each contains 224 or about 16 million hosts, which is much too large for any reasonable network. Their netmasks can be written in the following ways:
11111111.00000000. 00000000. 00000000 (binary bit format)
255.0.0.0 (decimal format)
/8 (slash format)
Class A networks include all networks from 0.0.0.0/8 to 127.0.0.0/8 or, in binary:
00000000.00000000.00000000.00000000 to 01111111.00000000.00000000.00000000
So the network 00100100. 00000000.00000000.00000000/8 or 68.0.0.0 is a Class A network. Class A networks are therefore all networks having a zero in the first place of the IP address and using 8 bits for the network address. Class A networks include 27 or about 128 addresses (though some are reserved). They use one byte, or 28 bits for the network portion of the IP address. The numbering and netmask were both arbitrarily chosen. There is no technical connection between these two characteristics of a Class A.
Class B networks use the first two bytes of the IP address for the network number, and the last two bytes for the host number. Their netmasks can be written in the following ways:
11111111.11111111. 00000000. 00000000 (binary bit format)
255.255.0.0 (decimal format)
/16 (slash format)
There are about 16000 possible Class B network addresses. Class B networks use 16 bits for the host address, so each network can contain 216 or about 65,000 hosts. This is also too large for reasonable use.
Class B includes all networks from 128.0.0.0 to 191.254.0.0 (191.255.0.0 has a reserved use) or
10000000. 00000000.00000000.00000000 to 10111111.11111110.00000000.00000000
So the network 10100100.00000001.00000000.00000000/16 or 164.1.0.0 is a Class B network. Class B networks are therefore all networks having one and zero in the first two places of the IP address and using 16 bits for the network address. There is, again, no technical connection between these two characteristics of a Class B network.
Class C addresses use the first three bytes of the IP address for the network number, and the last byte for the host number.
Their netmasks can be written in the following ways:
11111111.11111111.11111111.00000000 (binary bit format)
255.255.255.0 (decimal format)
/24 (slash format)
Class C networks use 8 bits for the host address so each network can contain 28 or about 254 hosts. This is a more reasonable size for a network but is too small for some needs.
Class C includes all networks from 192.0.0.0 to 223.255.254.0 or
11000000.00000000.00000000.00000000 to 11011111.11111111.11111110.00000000
This includes about 2 million networks. So the network 11000100.00000000.00000000.00000000/24 or 196.0.0.0 is a Class C network. Class C networks are therefore all networks having one-one-zero in the first three places of the IP address and using 24 bits for the network address. There is, again, no technical connection between these characteristics of a Class C network.
IP addresses where the first byte is greater than 223 are reserved for other uses such as experimental networks.
The uses of classful addresses
The essence of a classful address is that the network and host portions of the IP address are byte bounded, resulting in networks that are much too large or too small. When the classful addressing scheme was designed, this was not a concern. If an institution needed IP addresses, the governing authority for TCP/IP networks would assign it a class A or class B network. Most of the addresses were unused, but so few systems were networked that there was no urgency to use IP addresses more efficiently.
The main problem with the classful addressing scheme is the arbitrary and unreasonable size of the networks that it allows. There are three possible sizes to networks, none of which makes much sense. The classful addressing scheme also requires IP addresses to be distributed to institutions in a very wasteful way. Each institution gets one classful address. Class A and B addresses will be mostly wasted: you cannot put 16 million hosts on one network! The amount of traffic on a network with even 200 hosts could be excessive.
The main advantage of classful addressing is that all network numbers are byte-bounded, so classful addressing requires almost no translation between binary and decimal to calculate network numbers or netmasks. For example, in the classful addressing scheme, the host 131.98.7.42 has the network number 131.98.0.0 and the netmask 255.255.0.0 (/16). No translation is required: In a class B IP address all of the first 16 bits of the IP address are used for the network number, and all of the last 16 bits are zero. In a class B netmask, the first two bytes are 255 and the last two are 0.
Although classful networks are rarely used any more as originally designed, the idea of classful addressing is still dominant in networking, and classful addresses are usually assumed in network setup. Classful addressing is also still the dominant organizing principle of TCP/IP networking and it must be kept in mind when working with networks.
Practice Problems:
1. Specify whether the following classful IP address belongs to class A, B or C
a. 121.8.98.234
b. 128.89.34.116
c. 197.18.5.12
d. 181.84.125.8
e. 221.75.240.1
2. Indicate which of the following classful IP addresses is a host address and which is a network number. Also specify if it is a Class A, B or C address.
a. 68.1.0.0
b.131.89.41.240
c. 222.17.6.1
d. 74.0.1.0
e. 190.5.7.0
f. 154.0.0.0
3. Give the network number and netmask associated with the classful host IP addresses given:
a. 134.8.67.14
b. 200.1.94.15
c.14.8.241.18
d. 129.45.83.79
4. Specify whether the IP address given is classful, not classful, or if it is impossible to tell from the information given.
a. 15.98.3.159/8
b. 215.0.0.0 netmask 255.255.0.0
c. 115.9.3.15
d. 43.97.115.0
Solutions:
1.Specify whether the following classful IP address belongs to class A, B or C
a. 121.8.98.234 Class A
b. 128.89.34.116 Class B
c. 197.18.5.12 Class C
d. 181.84.125.8 Class C
e. 221.75.240.1 Class C
2. Indicate which of the following classful IP addresses is a host address and which is a network number. Also specify if it is a Class A, B or C address.
a. 68.1.0.0 Class A host address. Only the first byte is used for the network number in a Class A address. Class A network numbers always have zeros in the last three bytes of the network number.
b.131.89.41.240 Class B host address
c. 222.17.6.1 Class C host address
d. 74.0.1.0 Class A host address
e. 190.5.7.0 Class B host address
f. 154.0.0.0 Class B network number
3. Give the network number and netmask associated with the classful host IP addresses given:
a. 134.8.67.14 134.8.0.0 255.255.0.0
b. 200.1.94.15 200.1.94.0 255.255.255.0
c.14.8.241.18 14.0.0.0 255.0.0.0
d. 129.45.83.79 129.45.0.0 255.255.0.0
4. Specify whether the IP address given is classful, not classful, or if it is impossible to tell from the information given.
a. 15.98.3.159/8 Classful. IP addresses that start with 15 are class A as long as they use 8 bits for the network number. This address fits both criteria. It is a class A host address.
b. 215.0.0.0 netmask 255.255.0.0 Not classful. This is a class C IP address, but the netmask shows that it uses the first 16 bits as the network number. This is therefore a network number for the network 215.0.0.0, since all the host bits are zero.
c. 115.9.3.15 Without a netmask, it is impossible to tell.
d. 43.97.115.0 Without a netmask, it is impossible to tell.