Open In App

Introduction of Classful IP Addressing

Last Updated : 12 Mar, 2024
Improve
Improve
Like Article
Like
Save
Share
Report

An IP address is an address having information about how to reach a specific host, especially outside the LAN. An IP address is a 32-bit unique address having an address space of 232. Generally, there are two notations in which the IP address is written, dotted decimal notation and hexadecimal notation.

Dotted Decimal Notation

Dotted Decimal Notation

Dotted Decimal Notation

Hexadecimal Notation
 

Some points to be noted about dotted decimal notation: 

  1. The value of any segment (byte) is between 0 and 255 (both included).
  2. No zeroes are preceding the value in any segment (054 is wrong, 54 is correct).

Classful Addressing

The 32-bit IP address is divided into five sub-classes. These are given below:

  • Class A
  • Class B
  • Class C
  • Class D
  • Class E

Each of these classes has a valid range of IP addresses. Classes D and E are reserved for multicast and experimental purposes respectively. The order of bits in the first octet determines the classes of the IP address. The IPv4 address is divided into two parts:

  • Network ID
  • Host ID

The class of IP address is used to determine the bits used for network ID and host ID and the number of total networks and hosts possible in that particular class. Each ISP or network administrator assigns an IP address to each device that is connected to its network. 

Classful Addressing

Classful Addressing 

Note: 

  1. IP addresses are globally managed by Internet Assigned Numbers Authority(IANA) and regional Internet registries(RIR).
  2. While finding the total number of host IP addresses, 2 IP addresses are not counted and are therefore, decreased from the total count because the first IP address of any network is the network number and whereas the last IP address is reserved for broadcast IP.

Class A

IP addresses belonging to class A are assigned to the networks that contain a large number of hosts. 

  • The network ID is 8 bits long.
  • The host ID is 24 bits long.

The higher-order bit of the first octet in class A is always set to 0. The remaining 7 bits in the first octet are used to determine network ID. The 24 bits of host ID are used to determine the host in any network. The default subnet mask for Class A is 255.x.x.x. Therefore, class A has a total of:

  • 2^24 – 2 = 16,777,214 host ID

IP addresses belonging to class A ranges from 0.0.0.0 – 127.255.255.255. 

Class A

Class A

Class B

IP address belonging to class B is assigned to networks that range from medium-sized to large-sized networks. 

  • The network ID is 16 bits long.
  • The host ID is 16 bits long.

The higher-order bits of the first octet of IP addresses of class B are always set to 10. The remaining 14 bits are used to determine the network ID. The 16 bits of host ID are used to determine the host in any network. The default subnet mask for class B is 255.255.x.x. Class B has a total of: 

  • 2^14 = 16384 network address
  • 2^16 – 2 = 65534 host address

IP addresses belonging to class B ranges from 128.0.0.0 – 191.255.255.255.
 

Class B

Class B

Class C

IP addresses belonging to class C are assigned to small-sized networks.

  • The network ID is 24 bits long.
  • The host ID is 8 bits long.

The higher-order bits of the first octet of IP addresses of class C is always set to 110. The remaining 21 bits are used to determine the network ID. The 8 bits of host ID are used to determine the host in any network. The default subnet mask for class C is 255.255.255.x. Class C has a total of:

  • 2^21 = 2097152 network address
  • 2^8 – 2 = 254 host address

IP addresses belonging to class C range from 192.0.0.0 – 223.255.255.255.

Class C

Class C

Class D

IP address belonging to class D is reserved for multi-casting. The higher-order bits of the first octet of IP addresses belonging to class D is always set to 1110. The remaining bits are for the address that interested hosts recognize.

Class D does not possess any subnet mask. IP addresses belonging to class D range from 224.0.0.0 – 239.255.255.255.

Class D

Class D

Class E

IP addresses belonging to class E are reserved for experimental and research purposes. IP addresses of class E range from 240.0.0.0 – 255.255.255.254. This class doesn’t have any subnet mask. The higher-order bits of the first octet of class E are always set to 1111.

Class E

Class E

Range of Special IP Addresses

169.254.0.0 – 169.254.0.16 : Link-local addresses
127.0.0.0 – 127.255.255.255 : Loop-back addresses
0.0.0.0 – 0.0.0.8: used to communicate within the current network.

Rules for Assigning Host ID

Host IDs are used to identify a host within a network. The host ID is assigned based on the following rules:

  • Within any network, the host ID must be unique to that network.
  • A host ID in which all bits are set to 0 cannot be assigned because this host ID is used to represent the network ID of the IP address.
  • Host ID in which all bits are set to 1 cannot be assigned because this host ID is reserved as a broadcast address to send packets to all the hosts present on that particular network.

Rules for Assigning Network ID

Hosts that are located on the same physical network are identified by the network ID, as all host on the same physical network is assigned the same network ID. The network ID is assigned based on the following rules:

  • The network ID cannot start with 127 because 127 belongs to the class A address and is reserved for internal loopback functions.
  • All bits of network ID set to 1 are reserved for use as an IP broadcast address and therefore, cannot be used.
  • All bits of network ID set to 0 are used to denote a specific host on the local network and are not routed and therefore, aren’t used.

Summary of Classful Addressing 

Summary of Classful addressing

In the above table No. of networks for class A should be 127. (Network ID with all 0 s is not considered)

Problems with Classful Addressing

The problem with this classful addressing method is that millions of class A addresses are wasted, many of the class B addresses are wasted, whereas, the number of addresses available in class C is so small that it cannot cater to the needs of organizations. Class D addresses are used for multicast routing and are therefore available as a single block only. Class E addresses are reserved.

Since there are these problems, Classful networking was replaced by Classless Inter-Domain Routing (CIDR) in 1993. We will be discussing Classless addressing in the next post.

  • The network ID is 24 bits long.
  • The host ID is 8 bits long.
  • 2^21 = 2097152 network address
  • 2^8 – 2 = 254 host address
  • Within any network, the host ID must be unique to that network.
  • Host ID in which all bits are set to 0 cannot be assigned because this host ID is used to represent the network ID of the IP address.
  • Host ID in which all bits are set to 1 cannot be assigned because this host ID is reserved as a broadcast address to send packets to all the hosts present on that particular network.
  • The network ID cannot start with 127 because 127 belongs to the class A address and is reserved for internal loopback functions.
  • All bits of network ID set to 1 are reserved for use as an IP broadcast address and therefore, cannot be used.
  • All bits of network ID set to 0 are used to denote a specific host on the local network and are not routed and therefore, aren’t used.

Frequently Asked Questions on Classful IP Addressing

How are IP addresses assigned?

Answer:

IP addresses can be assigned through various methods, including manual configuration, dynamic assignment using DHCP (Dynamic Host Configuration Protocol), or automatic assignment through protocols like IPv6 Stateless Address Autoconfiguration (SLAAC). Internet Service Providers (ISPs) allocate IP addresses to their customers, and organizations may receive IP address blocks from regional Internet registries.

What is a private IP address?

Answer:

Private IP addresses are IP addresses reserved for use within private networks and are not directly accessible from the internet. They are used to allow devices within a private network to communicate with each other. Some common private IP address ranges include 10.0.0.0 to 10.255.255.255, 172.16.0.0 to 172.31.255.255, and 192.168.0.0 to 192.168.255.255.



Previous Article
Next Article

Similar Reads

Classful Vs Classless Addressing
Classful Addressing: Introduced in 1981, with classful routing, IP v4 addresses were divided into 5 classes(A to E). Classes A-C: unicast addresses Class D: multicast addresses Class E: reserved for future use Class A : In a class A address, the first bit of the first octet is always '0'. Thus, class A addresses range from 0.0.0.0 to 127.255.255.25
5 min read
Classless Addressing in IP Addressing
The Network address identifies a network on the internet. Using this, we can find a range of addresses in the network and total possible number of hosts in the network. Mask is a 32-bit binary number that gives the network address in the address block when AND operation is bitwise applied on the mask and any IP address of the block. The default mas
7 min read
Difference between Classful Routing and Classless Routing
Classful Routing: Classful Routing does not import subnet mask. And in this also subnet mask is provided after the route update. In classful routing, subnet mask is same throughout, does not vary for all devices, we can see it in the given picture. In classful routing, VLSM (Variable Length Subnet Mask) is not supported and also CIDR (Classless Int
2 min read
Computer Networks | IP Addressing | Question 5
If subnet mask 255.255.255.224, which of the following will be Direct Broadcast address ? (A) 202.15.19.127 (B) 202.15.19.63 (C) Both a and b (D) None of the Above Answer: (C) Explanation: Subnet mask is   255.255.255.11100000 In DBA all host bits are 1. from option 202.15.19.011 11111 , this can be a DBA. 202.15.19.001 11111 ,this can also be a DB
1 min read
Computer Networks | IP Addressing | Question 6
Which of the following is public IP address ? (A) 10.15.14.12 (B) 192.168.52.62 (C) 172.32.1.1 (D) None of the Above Answer: (C) Explanation: Range of Private IP 10.0.0.0 - 10.255.255.255 172.16.0.0 - 172.31.255.255 192.168.0.0 - 192.168.255.255 Option C doesn't belong to this rangeQuiz of this Question
1 min read
IPv6 Addressing Format and Conventions
We know that IPv4 addresses are mostly represented in a dotted decimal form like 192.168.10.1, and if written with a prefix mask then it would be written like 192.168.10.1/24, where /24 is the network mask. But IPv6 is long addressing format. IPv6 is 128 bit long and usually represented in hexadecimal format of addressing. IPv6 representation inclu
2 min read
What is APIPA (Automatic Private IP Addressing)?
APIPA stands for Automatic Private IP Addressing (APIPA). It is a feature or characteristic in operating systems (eg. Windows) which enables computers to self-configure an IP address and subnet mask automatically when their DHCP(Dynamic Host Configuration Protocol) server isn’t reachable. The IP address range for APIPA is (169.254.0.1 to 169.254.25
2 min read
What is IPv6 Intra Site Automatic Tunnel Addressing Protocol (ISATAP)?
ISATAP is a routable tunneling protocol developed by the IETF as an extension to IPv6, used in scenarios where no other encapsulation is available. It uses IPv4 to transmit data packets over the network. IPv6 Intra Site Automatic Tunnel Addressing Protocol (ISATAP): It is a tunneling protocol that was developed as an extension to IPv6 by the IETF a
2 min read
Difference Between IP Addressing and Subnetting
In computing networks, IP addressing and sub-networks are linked ideas. The subnet is the act of dividing a network into smaller subnets, or subnets, while IP addressing is the process of giving unique addresses to devices over a network. IP AddressingEach device that uses a network receives an IP address, which is a special identifier number. IP a
3 min read
Top 50 IP Addressing Interview Questions and Answers
In today's interconnected world, every device that is connected to the internet has a unique identifier known as IP Address. Now, understanding an IP address is essential for anyone who looking to pursue a career in IT or networking, then this blog post, we'll dive into the most frequently asked IP address interview questions. We'll cover the basic
25 min read