What Is Class A in IP Addressing and Its Range?

1.2M views
•
May 1, 2018
by
Gate Smashers
YouTube video player
What Is Class A in IP Addressing and Its Range?

TL;DR

Class A IP addresses always start with a 0 in the very first bit of the first octet, which fixes their first-octet range at 0 to 127. The first 8 bits are the network ID and the remaining 24 bits are the host ID, giving 2^7 = 128 networks, of which 126 are usable, and 2^24 minus 2 hosts per network.

Transcript

Hello friends, welcome to Gate Smashers. The topic is Class A in IP addressing. This topic comes under Classful Addressing. Classful Addressing means where we have divided IP Addresses in 5 classes, Class A, B, C, D and E. The concept of Classful Addressing came around 1980s where all IP Addresses were divided into 5 classes, Class A, B, C, D and E... Read More

Key Insights

  • Class A is identified by a fixed prefix bit: the very first bit of the first octet is always 0 and cannot be changed. When a router or destination sees a 0 in that first bit position, it knows by default that the address is a Class A IP address.
  • The number of IP addresses in Class A is 2^31, because one bit out of the 32 is fixed at 0 and the remaining 31 bits (7 in the first octet plus 8, 8 and 8 in the other three octets) are free to vary.
  • Class A splits the address as 8 bits of network ID and 24 bits of host ID. The first octet identifies which network you are connected to, and the remaining 24 bits identify how many hosts or users exist inside that network.
  • The number of networks in Class A is 2^7 = 128, not 2^8, because the first bit of the 8-bit network field is fixed at 0 and only the remaining 7 bits can be varied between all 0s and seven 1s.
  • Only 126 Class A networks are actually assigned to organizations. The all-0s address, which is decimal 0, is held by IANA (Internet Assigned Number Authority) and never given out, and the last address, 0 followed by seven 1s, which is decimal 127, is also excluded.
  • 127 is reserved for loopback and diagnostic functions, which is why it is subtracted from the 128 possible Class A network numbers along with 0, leaving 128 minus 2 = 126 networks available to organizations.
  • The Class A range is 0 to 127 in the first octet. To classify any address you only need to read the first octet: if its value falls between 0 and 127 the address belongs to Class A, without examining the host bits at all.
  • Each Class A network can hold 2^24 hosts, but two of those addresses are not usable, so the number of hosts per network is 2^24 minus 2. For the network 64.0.0.0 the first address is 64.0.0.0 and the last is 64.255.255.255.

Install to Summarize YouTube Videos and Get Transcripts

Explore YouTube Video Summarizer or Get YouTube Transcript Extractor

Questions & Answers

Q: What is Class A in IP addressing?

Class A is one of the five classes (A, B, C, D and E) created when Classful Addressing was introduced in the 1980s. In a Class A address the very first bit of the first octet is fixed at 0, which acts as the prefix that identifies the class. The first 8 bits, meaning the first octet, represent the network ID, and the remaining 24 bits represent the host ID. Because one bit of the 32 is fixed, Class A contains 2^31 IP addresses in total.

Q: What is the range of Class A IP addresses?

The range of Class A is 0 to 127 in the first octet. This follows directly from the first bit being fixed at 0: the smallest first octet is all 0s, which is decimal 0, and the largest is 0 followed by seven 1s, which is decimal 127. To decide whether any given address is Class A you only need to look at the first octet, and if its value lies between 0 and 127 the address belongs to Class A. For example, 64.0.0.0 is Class A because 64 falls inside that range.

Q: How many networks are possible in Class A?

There are 2^7 = 128 possible network numbers in Class A. Although the network ID field is 8 bits long, the first of those bits is permanently fixed at 0 and cannot be changed, so only 7 bits are free to vary between all 0s and seven 1s. Of those 128 numbers, two are not given out: the all-0s address (decimal 0) is retained by IANA and never assigned to any organization, and 127 is reserved for loopback and diagnostic functions. That leaves 128 minus 2 = 126 Class A networks available for organizations.

Q: How many hosts can a Class A network have?

Each Class A network can address 2^24 hosts, because after the 8-bit network ID the remaining 24 bits are all host bits and every combination of those bits is a possible host. However, two of those addresses within the network are not usable, so the number of usable hosts in every Class A network is 2^24 minus 2. This large host count is why Class A suits organizations that need very many users on a single network.

Q: Why is the first bit of a Class A address always 0?

Since there are 2^32 possible IPv4 addresses, there has to be a way to tell which class a given address belongs to. Each class is therefore given unique leading bits that work as a prefix. For Class A that prefix is a single 0 in the very first bit position, and this position is fixed and cannot be changed. When an address arrives at a router or destination and its first bit is 0, the device knows by default that it is a Class A IP address.

Q: Why was Classful Addressing introduced in the 1980s?

Before 1980 the 32-bit IP address used a fixed split of 8 bits for the network number and 24 bits for the host number, as with network 10, also called ARPANET. That gave only about 2^8 = 256 networks, a very small number, while each network could hold 2^24 hosts, which runs into crores. The internet was not popular then, so this was acceptable. In the 1980s demand for IP addresses and scalability grew, and because some companies need many hosts while others need only a limited number, all IP addresses were divided into the five classes A, B, C, D and E.

Q: How is a 32-bit IP address written in dotted decimal representation?

A 32-bit IPv4 address is divided into four octets, each octet being 8 bits, and each octet is written as a decimal number separated by dots. Several representations exist, including binary, but dotted decimal is the most widely used. This is why a Class A address appears as something like 64.0.0.0 rather than as a string of 32 bits, and it is also why reading only the first group of digits is enough to identify the class.

Q: What are the first and last addresses in the Class A network 64.0.0.0?

For a Class A network whose first octet is 64, the address 64.0.0.0 represents the entire network and is how the whole worldwide web identifies that organization. Anyone connecting inside the network receives an address beginning with 64. The last address is obtained by setting all bits in the remaining three octets to 1, and since eight continuous 1s equal 255, the last address is 64.255.255.255. So the network runs from 64.0.0.0 to 64.255.255.255.

Summary & Key Takeaways

  • Before the 1980s, a 32-bit IP address was split with a fixed 8 bits for the network number and 24 bits for host numbers, as in network 10 (ARPANET). This allowed only about 2^8 = 256 networks while each network could hold 2^24 hosts, which was acceptable when the internet was not popular.

  • As demand for IP addresses and scalability grew in the 1980s, Classful Addressing was introduced, dividing all IP addresses into five classes: A, B, C, D and E. The motivation was that some companies need very many hosts while others need only a limited number, so one fixed split no longer fit.

  • A 32-bit IPv4 address is written in Dotted Decimal Representation, which is the most widely used form, by splitting the address into four octets of 8 bits each. Other representations such as binary exist, but dotted decimal is what is normally used to write class A addresses like 64.0.0.0.


Read in Other Languages (beta)

Share This Summary 📚

Explore More Summaries from Gate Smashers 📚