Ip – Can a 172.168.10.0/28 be a class B Subnet

ipip addressipv4subnet

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

Best Answer

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.

Related Topic