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.
As I explained in my comments, CGN and DS-Lite are for residential customers. You should not deploy these to your business customers. Continue to serve your business customers as you do today, but deploy CGN or DS-Lite for your residential customers.
RFC 6333, Dual-Stack Lite Broadband Deployments Following IPv4 Exhaustion explains how DS-Lite works:
This document revisits the dual-stack model and introduces the Dual-
Stack Lite technology aimed at better aligning the costs and benefits
of deploying IPv6 in service provider networks. Dual-Stack Lite
enables a broadband service provider to share IPv4 addresses among
customers by combining two well-known technologies: IP in IP (IPv4-
in-IPv6) and Network Address Translation (NAT).
If your business customers need to have exclusive use of a public IPv4 address, then you cannot use CGN or DS-Lite for the business customers.
You also should have already been providing IPv6 to both your residential and business customers for several years now. You should look at RFC 6177, IPv6 Address Assignment to End Sites and the other IETF recommendations for that. Each business customer site should get no longer than a /48
IPv6 prefix, and residential customers should get something smaller than a single /64
prefix (/56
is fairly common for residential customers).
Best Answer
Back when the RFC for private addressing was proposed, classful addressing was still common. The reasons for the three address ranges are found in RFC 1918, Address Allocation for Private Internets: