3

I am starting my studies in networking and starting off with the basics of IP addressing and Subnetting with CIDR values.

My Question here is 1st how can you tell the subnet class of an IP address just from the 1st Octet such as 172.0.0.0 & 192.0.0.0

from my understanding a 0.0.0.0 - 127.255.255.255 is a Class A, 128.0.0.0 - 191.255.255.255 is a Class B, 192.0.0.0 - 223.255.255.255 is Class C.

But from following this Vid channel:- https://www.youtube.com/channel/UCnRCUB8utEFY0xqm7L92yZg

i have learnt that the /28 at the end of an IP address is the CIDR Value which is the total number of bits used in subnetting so a /28 will be 8.8.8.4 or 255.255.255.240 `

is IP address of 172.168.10/28 a Class B or Class C

My Confusion comes from above where 128.0.0.0 - 191.255.255.255 IP range is a Class B but the /28 means 8.8.8.4 = 28 Bits for the network which leaves us with only 4 bits for Hosts as a Class C Subnet is 8.8.8.0 or 255.255.255.0.

So is IP address of 172.168.10/28 a Class B or Class C?

Please, can somebody clarify this for me.

Thanks in advance

  • Did any answer help you? If so, you should accept the answer so that the question doesn't keep popping up forever, looking for an answer. Alternatively, you can provide and accept your own answer. – Ron Maupin Dec 25 '18 at 9:08
7

First, network classes are dead, killed in 1993 by RFCs 1517, 1518, and 1519, which defined CIDR (Classless Inter-Domain Routing). Later RFCs have further deprecated network classes. Modern networking doesn't use network classes, and you should only worry about them from a historical perspective.

IPv4 network classes were defined by the first few bits of the address, and IPv6 never had network classes. The latest RFC of which I know that defines network classes is RFC 1166, Internet Numbers*, which obsoleted the previous RFCs for network classes.

Class | Address starts with        | Mask length
  A   | First bit is `0`           | 8 bits
  B   | First two bits are `10`    | 16 bits
  C   | First three bits are `110` | 24 bits
  D   | First four bits are `1110` | N/A
  E   | First four bits are `1111` | N/A

The network classes had specific mask lengths, but could be subnetted to longer mask lengths within a specific classful network. Unfortunately, many people confuse the network mask with the network class, and many of them will argue to the death that any /24 network is a Class C network, but that is not the definition of a network class.

So is IP address of 172.168.10/28 a Class B or Class C?

Actually, neither. The address 172.168.10/28 is actually an invalid IPv4 address. I will assume you meant 172.168.10.0/28, which used to be a subnet of the 172.168.0.0/16 Class B network.

Today, trying to classify an address by network class is a pointless exercise because there is no longer any such thing.


*Copied from the RFC.

The first type of address, or class A, has a 7-bit network number and a 24-bit local address. The highest-order bit is set to 0. This allows 128 class A networks.

                    1                   2                   3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|0|   NETWORK   |                Local Address                  |   
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                         Class A Address

The second type of address, class B, has a 14-bit network number and a 16-bit local address. The two highest-order bits are set to 1-0. This allows 16,384 class B networks.

                    1                   2                   3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|1 0|           NETWORK         |          Local Address        |   
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                         Class B Address

The third type of address, class C, has a 21-bit network number and a 8-bit local address. The three highest-order bits are set to 1-1-0. This allows 2,097,152 class C networks.

                    1                   2                   3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|1 1 0|                    NETWORK              | Local Address |   
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                         Class C Address

The fourth type of address, class D, is used as a multicast address [13]. The four highest-order bits are set to 1-1-1-0.

                    1                   2                   3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|1 1 1 0|                  multicast address                    |   
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                          Class D Address

Note: No addresses are allowed with the four highest-order bits set to 1-1-1-1. These addresses, called "class E", are reserved.

  • 2
    Though your answer is valid, understanding network classes is still a requirement for certifications like the CompTIA Network+ and Cisco CCNA. – AJ. Jul 20 '18 at 3:06
  • 3
    I understand that, but it is still a pointless exercise, akin to learning that you must turn the crank on a telephone to generate electricity to get the operator's attention in order to place a call because there is no dial or keypad. – Ron Maupin Jul 20 '18 at 3:12
  • 1
    @AJ., if the question had been an "education, certification, or homework" question, such as for the Network+ (I don't believe the CCNA exams deal with network classes any longer, even though the older study material covers it), I would close it for that reason. I nearly closed it as "historical trivia" that "is trivial/irrelevant to modern networking;" If any close votes are cast, I will close it for that reason. – Ron Maupin Jul 20 '18 at 3:19
  • 2
    @Zac67 Were there any changes to how the IP address format should look like? I mean, your example is missing the last octet, so... – AndrejaKo Jul 20 '18 at 6:07
  • 2
    dang Should've read properly what I copied - of course 172.168.10/28 isn't valid but something like 172.16.8.10/28 or 172.168.10.0/28 is - thx @AndrejaKo! – Zac67 Jul 20 '18 at 6:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.