Classful network
From Wikipedia, the free encyclopedia
Classful network is a term that is used to describe the network architecture of the Internet until around 1993. It divided the address space for Internet Protocol Version 4 (IPv4) into five address classes. Each class, coded by the first three bits of the address, defined a different size or type (unicast or multicast) of the network.
Today, remnants of classful network concepts remain in practice only in a limited scope in the default configuration parameters of some network software and hardware components (e.g. netmask), but the terms are often still heard in general discussions about network structure among network administrators.
Contents |
[edit] Before classes
Originally, the 32-bit IPv4 address consisted simply of an 8-bit network number field (which specified the particular network a host was attached to), and a rest field, which gave the address of the host within that network. This format was chosen before the advent of local area networks (LANs), when there were only a few, large, networks such as the ARPANET.
This resulted in a very low number (254) of possible independent networks, and very early on, as local area networks started to appear, it became obvious that this would not be enough.
[edit] Classes
To remain compatible with the existing IP address space and the IP packet structure, the definition of IP addresses was changed in 1981 in RFC 791 to allow unicast addresses with three different sizes of the network number field (and the associated rest field), as specified in the table below:
Class | Leading Bits |
Size of Network Number Bit field |
Size of Rest Bit field |
Number of Networks |
Hosts per Network |
---|---|---|---|---|---|
Class A | 0 | 8 | 24 | 128 | 16,777,214 |
Class B | 10 | 16 | 16 | 16,384 | 65,534 |
Class C | 110 | 24 | 8 | 2,097,152 | 254 |
Class D (multicast) | 1110 | not defined | not defined | not defined | not defined |
Class E (reserved) | 1111 | not defined | not defined | not defined | not defined |
The number of usable host addresses available is always 2N - 2 (where N is the number of bits used, and the subtraction of 2 adjusts for the use of the all-bits-zero host portion for network address and the all-bits-one host portion as a broadcast address. Thus, for a Class C address with 8 bits available in the host field, the number of hosts is 254.
The expanded network number field allowed a larger number of networks, thereby accommodating the continued growth of the Internet.
The IP address netmask, which is commonly associated with an IPv4 address today, was not required because the mask was implicitly derived from the IP address itself. Any network device would inspect the first few bits of the IP address to determine the class of the address.
The method of comparing the network numbers of two IP addresses did not change (see subnet). For each address, the network number field size and its subsequent value were determined (the rest field was ignored). The network numbers were then compared. If they matched, then the two addresses were on the same network.
[edit] The replacement of classes
The first design changes extended the addressing capability in the Internet, but did not prevent IP address shortage. The principal problem was that too many sites were too big for a Class C network number, and therefore received a Class B block. With the rapid growth of the Internet, the available pool of Class B addresses (214, or about 16,000 total) was rapidly being depleted. Classful networking was replaced by Classless Inter-Domain Routing (CIDR), starting in about 1993, to attempt to solve this problem.
Early allocations of IP addresses by IANA were in some cases not made very efficiently, which contributed to the problem. (However, the commonly held notion that some American organizations unfairly or unnecessarily received Class A networks is wrong; most such allocations date to the period before the introduction of address classes, when the only address blocks available were what later became known as Class A networks.)
[edit] Useful tables
[edit] Class ranges
The address ranges used for each class are given in the following table, in the standard dotted decimal notation.
Class | Leading bits | Start | End | CIDR suffix |
Default subnet mask |
---|---|---|---|---|---|
Class A | 0 | 0.0.0.0 | 127.255.255.255 | /8 | 255.0.0.0 |
Class B | 10 | 128.0.0.0 | 191.255.255.255 | /16 | 255.255.0.0 |
Class C | 110 | 192.0.0.0 | 223.255.255.255 | /24 | 255.255.255.0 |
Class D (multicast) | 1110 | 224.0.0.0 | 239.255.255.255 | /4 | not defined |
Class E (reserved) | 1111 | 240.0.0.0 | 255.255.255.255 | /4 | not defined |
[edit] Special ranges
Some addresses are reserved for special uses (RFC 3330).[1]
Addresses | CIDR Equivalent | Purpose | RFC | Class | Total # of addresses |
---|---|---|---|---|---|
0.0.0.0 - 0.255.255.255 | 0.0.0.0/8 | Zero Addresses | RFC 1700 | A | 16,777,216 |
10.0.0.0 - 10.255.255.255 | 10.0.0.0/8 | Private IP addresses | RFC 1918 | A | 16,777,216 |
127.0.0.0 - 127.255.255.255 | 127.0.0.0/8 | Localhost Loopback Address | RFC 1700 | A | 16,777,216 |
169.254.0.0 - 169.254.255.255 | 169.254.0.0/16 | Zeroconf / APIPA | RFC 3330 | B | 65,536 |
172.16.0.0 - 172.31.255.255 | 172.16.0.0/12 * | Private IP addresses | RFC 1918 | B | 1,048,576 |
192.0.2.0 - 192.0.2.255 | 192.0.2.0/24 | Documentation and Examples | RFC 3330 | C | 256 |
192.88.99.0 - 192.88.99.255 | 192.88.99.0/24 | IPv6 to IPv4 relay Anycast | RFC 3068 | C | 256 |
192.168.0.0 - 192.168.255.255 | 192.168.0.0/16 * | Private IP addresses | RFC 1918 | C | 65,536 |
198.18.0.0 - 198.19.255.255 | 198.18.0.0/15 * | Network Device Benchmark | RFC 2544 | C | 131,072 |
224.0.0.0 - 239.255.255.255 | 224.0.0.0/4 | Multicast | RFC 3171 | D | 268,435,456 |
240.0.0.0 - 255.255.255.255 | 240.0.0.0/4 | Reserved[2],[3],[4] | RFC 1166 | E | 268,435,456 |
* Note that these ranges listed were originally defined as consecutive network blocks and their "CIDR Equivalent" notation makes them appear to be in the wrong "Class". While nowadays CIDR allows to use this range as a Class B subnet, some network hard- and software still has hard-coded limitations which still prevent use of subnets other than Class C size.
[edit] Bit-wise representation
In the following table:
- n indicates a binary slot used for network ID.
- H indicates a binary slot used for host ID.
- X indicates a binary slot (without specified purpose)))
Class A 0. 0. 0. 0 = 00000000.00000000.00000000.00000000 127.255.255.255 = 01111111.11111111.11111111.11111111 0nnnnnnn.HHHHHHHH.HHHHHHHH.HHHHHHHH Class B 128. 0. 0. 0 = 10000000.00000000.00000000.00000000 191.255.255.255 = 10111111.11111111.11111111.11111111 10nnnnnn.nnnnnnnn.HHHHHHHH.HHHHHHHH Class C 192. 0. 0. 0 = 11000000.00000000.00000000.00000000 223.255.255.255 = 11011111.11111111.11111111.11111111 110nnnnn.nnnnnnnn.nnnnnnnn.HHHHHHHH Class D 224. 0. 0. 0 = 11100000.00000000.00000000.00000000 239.255.255.255 = 11101111.11111111.11111111.11111111 1110XXXX.XXXXXXXX.XXXXXXXX.XXXXXXXX Class E 240. 0. 0. 0 = 11110000.00000000.00000000.00000000 255.255.255.255 = 11111111.11111111.11111111.11111111 1111XXXX.XXXXXXXX.XXXXXXXX.XXXXXXXX
[edit] References
- ^ IANA 3330bis draft - Special Use IPv4 Addresses
- ^ draft-wilson-class-e - Redesignation of 240/4 from "Future Use" to "Limited Use for Large Private Internets"
- ^ draft-fuller-240space-00 - Reclassifying 240/4 as usable unicast address space
- ^ draft-savolainen-indicating-240-addresses A way for a host to indicate support for 240.0.0.0/4 addresses
- RFC 791, "Internet Protocol", (September 1981), This document defines classful networking.
[edit] See also
- Classless Inter-Domain Routing
- List of assigned /8 IP address blocks
- IPv4 subnetting reference
- Subnetwork