Classful Addressing Tutorial With Example

Greetings!
We have recently published 100+ articles on android tutorials with kotlin and java. If you need, you may visit Android Tutorial for beginners page. You can also check Kotlin Tutorial for beginners. Also, if you are interested in content writing, you can mail us at tutorialwing@gmail.com.

In this tutorial, we will study about the various types of addresses used in computer networks, the need of classful addressing and different classes used in classful addressing. We will look at the disadvantages of classful addressing and finally study the difference between the private IP addresses and the public IP addresses. This tutorial also contains some practice questions to build up a strong hold on the topic.

IP Address

We can define IP address as below –
a) The logical address assigned to all computers, routers or any other device that takes part in communication or transfer of information in computer networks.
b) It is also called explicit address.
c) It is a 32 bit address.
d) It can be represented in two ways:

 – Binary number system : Example- 11100011.00001011.11111000.11001001
 – Dotted decimal number system: Example – 224.32.54.16

MAC Address

We can define MAC address as below –
a) The address assigned during manufacturing to the devices is called MAC Address.
b) It is also called the physical address, LAN card address, NIC card address or Ethernet address.
c) It is also called implicit address.
d) By default, it is a 48 bit address.

– We use IP address during communication and not MAC address because MAC address does not give us the network ID and the host ID and thus we can’t reach the target host through MAC address. Therefore, IP address is used for communication or transfer of information.

Need of Classful Addressing

– A network ID has a total of 32 bits. Thus,
  Total no of possible hosts/IP Addresses in this network = $ 2^{32}$
– If we choose k-bit out of n, we divide the network into $2^k$ parts.
– Size of each part = $ ( \frac {2^{32}} {2^k} ) = 2^{32-k} $
– Therefore, there are a total of k-networks having $2^{32-k}$ hosts each.
– In 1980s, out of 32 bits, only 8 bits were assigned for network ID and the remaining 24 bits were assigned to hosts.
– $2^8$ is a really less no for networks and $2^{24}$ is a very large no for hosts.
– Thus, the system is not scalable and hence the need for classful addressing was felt.

Tutorialwing Need of classful addressing

Need Of Classful Addressing

Classful addressing supports 2-level hierarchy.

Tutorialwing classful addressing supports two level hierarchy

Two level hierarchy

Whenever a computer is given an IP address it is called host.
Entire network is represented by a no. known as net ID.

– In Binary notation, first few bits define the class.
– In Dotted Decimal notation, first octet represents type of the class.

The five types of Classes are supported by Classful Addressing. They are –
(i) Class A
(ii) Class B
(iii) Class C
(iv) Class D
(v) Class E

Now, we will go through each type of classful addressing one by one.

Class A Classful addressing

 – It is used in unicasting i.e. one to one transmission
 – Identification:
    => Binary Notation: First bit is 0.
    => Dotted decimal notation: first octet is in range of 1-126.
 – Some special addresses like 0.0.0.0 (DHCP Client Address) and 127.x.y.z (loopback address) are reserved.
 – Example: 103.45.56.98 is a Class A network. Note that first octet is 103 that is in range from 1 to 126.
 – In Class A, first 8 bits are assigned for Network ID and the last 24 bits give Hosts.

Tutorialwing Class A Classful Addressing

Class A classful addressing

– Total possible networks = $(2^7 – 2) = 126 $
   => 2 is subtracted since 2 addresses are reserved.
   => We consider $2^7$ because first bit is reserved to be 0.
– Total possible hosts = $2^{24} – 2 $
   => 2 is subtracted from hosts because:
     => One IP address is reserved Direct Broadcast Address
     => One IP address is reserved for Host ID.

Class B Classful Addressing

 – It is used in unicasting i.e. one to one transmission
 – Identification:
    => Binary Notation: First two bits are 10.
    => Dotted decimal notation: first octet is in range of 128-191.
 – Example: 132.45.56.98 is a Class B network. Note that first octet is 132 that is in range from 128 to 191.
 – In Class B, first 16 bits are assigned for Network ID and the last 16 bits give Hosts.

Tutorialwing Class B classful Addressing

Class B Classful Addressing

– Total possible networks = $2^{14}$
    => We consider $2^{14}$ because first two bits are reserved to be 10.
– Total possible hosts = $2^{16} – 2$
    => 2 is subtracted from hosts because:
      => One IP address is reserved Direct Broadcast Address
      => One IP address is reserved for Host ID.

Class C Classful Addressing

– It is used in unicasting i.e. one to one transmission
– Identification:
    => Binary Notation: First three bits are 110.
    => Dotted decimal notation: first octet is in range of 192-223.
– Example: 229.45.56.98 is a Class C network. Note that first octet is 229 that is in range from 192 to 223.
– In Class C, first 24 bits are assigned for Network ID and the last 8 bits give Hosts.

Tutorialwing Class C Classful Addressing

Class C Classful Addressing

– Total possible networks = $2^{21}$
    => We consider $2^{21}$ because first three bits are reserved to be 110.
– Total possible hosts = $2^8 – 2$
    => 2 is subtracted from hosts because:
     => One IP address is reserved Direct Broadcast Address
     => One IP address is reserved for Host ID.

Note: A valid IP address can only belong to class A or B or C and not D or E Class.



Class D Classful Addressing:

– It is used in multicasting i.e. one to many transmission
– Identification:
    => Binary Notation: First four bits are 1110.
    => Dotted decimal notation: first octet is in range of 224-239.
– Example: 235.45.56.98 is a Class D network. Note that first octet is 235 that is in range from 224 to 239.

Class E Classful Addressing:

– It is used in research.
– Identification:
    => Binary Notation: First four bits are 1111.
    => Dotted decimal notation: first octet is in range of 240-255.
– Example: 245.45.56.98 is a Class E network. Note that first octet is 245 that is in range from 240 to 255.

Drawbacks of Classful Addressing

– Assume an organization requires 1000 addresses, then, the entire Class B has to be assigned to the organization.
216 – 210 addresses are all a waste.
Thus, it is difficult to assign an appropriate range of addresses. Either there will be a shortage or wastage.
Thus, an alternative is required. The alternative is Classless Interdomain Routing.

Difference Between Private IP Addresses and Public IP Addresses

Below are some of the differences between private IP addresses and public IP addresses –

Tutorialwing Private IP Address and Public IP Address

Private and Public IP Addresses

Questions

Identify the class of the given IP address:
(i) 123.25.46.89
(ii) 658.24.35.59
(iii) 224.567.48.65
(iv) 185.56.49.87
(v) 220.58.97.46
(vi) 250.9.8.7
(vii) 172.16.89.122
(viii) 10.2.3.4
(ix) 192.168.59.3

Let us know your answer in comment section below. Then, we will provide you the correct answer.

Now, that we have an idea of the classification of classes, their range and uses, we use this knowledge to study subnetting in the next tutorial.

[latexpage]

Support Us

If you like Tutorialwing and would like to contribute, you can email an article on any educational topic at tutorialwing@gmail.com. We would love to publish your article. See your article on Tutorialwing and help others with your knowledge. Follow Facebook, LinkedIn, Google+, Twitter, Youtube for latest updates.
Greetings!
We have recently published 100+ articles on android tutorials with kotlin and java. If you need, you may visit Android Tutorial for beginners page. You can also check Kotlin Tutorial for beginners