Take the 2-minute tour ×
Network Engineering Stack Exchange is a question and answer site for network engineers. It's 100% free, no registration required.

I'm studying IPv4 addresses and came across this whole thing about classful addressing. I get the idea behind it, bit there is something I find confusing:

There are two "ABC" ranges:

First one:

A: 1.0.0.0 to 126.0.0.0 with /8
B: 128.0.0.0 to 191.255.0.0 with /16
C: 192.0.0.0 to 223.255.255.0 with /24

Second one:

A: 10.0.0.0 to 10.255.255.255 with /8
B: 172.16.0.0 to 172.31.255.255 with /12
C: 192.168.0.0 to 192.168.255.255 with /16

Why are both of these using the names A, B and C? They are not even using the same sets of subnet-masks! Is the first one only for public addresses? Because the second one is only private addresses.

Help appreciated!

share|improve this question
12  
The real world stopped using classful addressing at least 15 years ago. I suggest you put effort into learning CIDR (classless inter domain routing). –  Teun Vink Feb 25 at 15:32
    
@TeunVink That won't help much for certification testing, though... Classful addressing is still a pretty integral part of the CCNA curriculum. –  Ryan Foley Feb 25 at 15:43
2  
Wow really? That's... sad. –  Teun Vink Feb 25 at 15:50
    
Yeah, why the heck learn it if you're not going to use it 0.o? Cisco are so bad at education it's crazy –  Axel Kennedal - TechTutor Feb 25 at 16:02
1  
@TeunVink It's not really any different that having to learn about Token Rings and BNC connectors for Comptia Networking+. Old OLD technology, but still a chance to run across it. –  WernerCD Feb 26 at 1:42
show 1 more comment

3 Answers 3

up vote 18 down vote accepted

It's likely that the subnet masks are throwing you off. As long as you keep in mind that the below rules no longer apply, you should be fine.

Ultimately classful addressing came down to the most significant (or "leading") bits in the address. Nothing more, nothing less.

  • Class A: Most significant bits starts with 0
  • Class B: Most significant bits start with 10
  • Class C: Most significant bits start with 110

The "classes" came from the way they split up the address space for use between "host" and "network". Keep in mind that back then (way way back, from the days of ARPANET), subnet masks did not exist, and the network was intended to be inferred from the address itself. So, with the above in mind, this is what they came up with (this is intended to be binary representation - each N or H represents a single bit in the 32-bit address):

  • Class A: NNNNNNNN.HHHHHHHH.HHHHHHHH.HHHHHHHH (less networks, more hosts)
  • Class B: NNNNNNNN.NNNNNNNN.HHHHHHHH.HHHHHHHH (more networks, less hosts)
  • Class C: NNNNNNNN.NNNNNNNN.NNNNNNNN.HHHHHHHH (even more networks, even less hosts)

Here the N is representative of the network portion of the address, and the H is representative of the host portion of the address, or as they called it back in the day, the "rest field."

Combining that with what was said earlier about the most-significant bits, we have the following:

  • Class A: 0.0.0.0 - 127.255.255.255
  • Class B: 128.0.0.0 - 191.255.255.255
  • Class C: 192.0.0.0 - 223.255.255.255

Converting those ranges to binary may make this more clear:

Class A

0.0.0.0
-----------
[0]0000000.00000000.00000000.00000000

127.255.255.255
-----------
[0]1111111.11111111.11111111.11111111
 ^
 most significant bit = 0

Class B

128.0.0.0
-----------
[10]000000.00000000.00000000.00000000

191.255.255.255
-----------
[10]111111.11111111.11111111.11111111
 ^
 most significant bits = 10

Class C

192.0.0.0
-----------
[110]00000.00000000.00000000.00000000

223.255.255.255
-----------
[110]11111.11111111.11111111.11111111
 ^
 most significant bits = 110

Every single address within those ranges will share a common leading bit(s). The moral of the story is, if you can remember what the leading bits are supposed to be (0 for class A, 10 for class B, 110 for class C) it's extremely simple to determine what "class" an address would have otherwise belonged in. Or, if decimal is easier:

  • Class A: First octet in address is between 0 and 127, inclusive
  • Class B: First octet in address is between 128 and 191, inclusive
  • Class C: First octet in address is between 192 and 223, inclusive

The easiest way to mess someone up on "classful addressing" either on a test, or exam, or whatever, is to use misdirection by way of a subnet mask. Again, remember that the subnet mask does not apply for determining the class of an address. This is easy to forget because as others have said, classless addressing and routing have been around for over two decades now, and the subnet mask and CIDR notation have become ubiquitous in the industry.

share|improve this answer
    
Just to expand on this from a historical perspective, to say that subnets did not apply in classful networks is not quite accurate. The idea of subnetting did not originate with CIDR. For example RFC 950, published back in 1985 talked about subnetting in classful networks a decade before CIDR became the norm. faqs.org/rfcs/rfc950.html. –  Russell Heilling Feb 25 at 20:13
1  
@RussellHeilling I simply said CIDR notation and the concept of a subnet mask going along with an IP address has become ubiquitous - I'll rephrase the statement "does not apply" to be more clear - it does not apply in determining the class that an address belongs in. –  John Jensen Feb 25 at 20:24
    
+1 I never realized A/B/C followed 0/1/11. Why didn't you tell me this years ago? –  WernerCD Feb 26 at 1:45
4  
@WernerCD it's 0 / 10 / 110 - completely different than 0/1/11 :-) trailing zeroes are significant in binary. Leading ones are not. –  John Jensen Feb 26 at 22:30
    
Thanks for that point of clarification :) –  WernerCD Feb 26 at 23:37
show 4 more comments

While the idea behind classful addressing is now obsolete as classless interdomain routing (CIDR) has been in use for decades(the original RFC1519 was published in 1993), your first answer is the historically correct one.

The second set of networks you list are from RFC1918, and define private use address ranges. There is a single /8 network within the former class A space (giving a single class A network), a /12 within the former class B space (giving 16 class B networks), and a /16 within the former class C space (giving 256 class C networks).

There is no contradiction.

share|improve this answer
add comment

The class, "A", "B" and "C", tells you the size of the network mask. (e.g., a class "C" has a 24 bit network mask.) The class is not a proper name specifying a specific network.

share|improve this answer
    
While it is true that the natural mask of a class C network is equivalent to a /24 prefix length, the reverse is not true. 10.1.1.0/24 is not a class C network for example - it is a classless /24 subnet within the former class A space. Please try not to draw parallels between classful terminology and CIDR notation. –  Russell Heilling Feb 25 at 15:58
1  
Actually, it is by modern terminology; "class" is simply the size of the subnet. –  Ricky Beam Feb 25 at 19:33
    
I was trying to provide a simple answer to point out his confusing the idea of 'a particular network' in "A" with netmasks and network ranges. In hindsight, I think Jensen's explanation is more useful than my attempt at brevity. –  Craig Constantine Feb 25 at 19:35
    
@RickyBeam Not sure what you mean by modern terminology. I know that in my experience (in the ISP industry) the common term for a /24 is a 'slash-24'. Anyone caught calling it a class C generally gets a lecture on the history of CIDR... :) –  Russell Heilling Feb 25 at 20:04
1  
Nobody does "classful" anymore, so class foo has devolved into just the subnet size. –  Ricky Beam Feb 25 at 20:59
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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