Originally posted by scowles
0nnnnnnn . hhhhhhhh . hhhhhhhh . hhhhhhhh
10nnnnnn . nnnnnnnn . hhhhhhhh . hhhhhhhh
110nnnnn . nnnnnnnn . nnnnnnnn . hhhhhhhh
Originally posted by Matir
The "Class" is essentially the number of "network" octets.
A.B.C.D/255.0.0.0 - Class A
A.B.C.D/255.255.0.0 - Class B
A.B.C.D/255.255.255.0 - Class C
Originally posted by Mishra100
Class A,B,C licenses
Class A - 1-127 range of IPs.
Class B - 128-191 range of IPs
Class C - 192-223 range of IPS
You are all right! If that confuses you more, let me try to clarify.
In a classful implimentation of IP, the range of the first octet determines the "class":
Class A is 1-127 denoted in binary as 0nnnnnnn.hhhhhhhh.hhhhhhhh.hhhhhhhh with a netmask of 255.0.0.0 aka /8
Class B is 128-191 denoted in binary as 10nnnnnn.nnnnnnnn.hhhhhhhh.hhhhhhhh with a netmask of 255.255.0.0 aka /16
Class C is 192-223 denoted in binary as 110nnnnn.nnnnnnnn.nnnnnnnn.hhhhhhhh with a netmask of 255.255.255.0 aka /24
Note that the range of numbers translates to binary such that they start with either 0, 10, or 110 ie 12 decimal is 00000110 binary which starts with 0 while 150 decimal is 10010110 binary which starts with 10.
Again, in a classful implimentation of IP each of these ranges has a predefined netmask so if the IP address starts with 64 then it has a netmask of 255.0.0.0
What determines the class is the first octet (or more specifically the first 3 binary bits of that first octet) and as a result of what class it is it will have a given netmask.
In what is called classless IP you can further divide an IP block from one class into multiple networks, this is called subnetting. It's also possible to own multiple concurrent blocks in a given class and combine them, this is called supernetting.
If you subnet the addresses from a higher class by 8 or 16 more bits, then you will end up with a subnet mask that looks like it's from another class. Sometimes when this is done the netmask is just referred to by the class letter. As an example, if you take the 10.0.0.0/255.0.0.0 (or 10.0.0.0/8) block of class A addresses and divide them up by taking 16 more host bits you end up with 10.0.0.0/255.255.255.0 (or 10.0.0.0/24) and this is sometimes just called a class C mask. This is still a class A address block, it has just been subnetted and has a new netmask which is easier to refer to as a class C netmask than saying two-fifty-five dot two-fifty-five dot two-fifty-five dot zero.
The original routing protocols like RIP version 1 do not understand classless IP so if you use an address that starts with 64, it will assume the netmask is 255.0.0.0 This makes RIP1 a lighter routing protocol because it doesn't even store a netmask for the networks. Newer routing protocols use CIDR (Classless Inter-Domain Routing) and they will use a provided netmask to distinguish subnetted blocks of IP addresses on different networks.
Basically, the first number defines what "class" it is but each class has a pre-defined netmask although the netmask doesn't determine what class it belongs to.