Classful network: Difference between revisions

From Wikipedia, the free encyclopedia
Jump to navigation Jump to search
imported>Annh07
m Reverted edit by 72.241.94.245 (talk) to last version by Johnuniq
 
imported>Criticize
m Reverted edits by 2409:40D0:2037:6C50:384F:1968:24A5:D8EB (talk) (HG) (3.4.13)
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
{{short description|Early system for organizing the IPv4 address space}}
{{short description|Early system for organizing the IPv4 address space}}


[[Image:Internet map in February 82.png|thumb|300px|Map of the prototype Internet in 1982, showing 8-bit-numbered networks (ovals) only, interconnected by [[Router (computing)|router]]s (rectangles).]]
[[Image:Internet map in February 82.png|thumb|300px|Map of the prototype Internet in 1982, showing 8-bit-numbered networks (ovals) only, interconnected by [[Router (computing)|router]]s (rectangles)]]


A '''classful network''' is an obsolete [[network address]]ing architecture used in the [[Internet]] from 1981 until the introduction of [[Classless Inter-Domain Routing]] (CIDR) in 1993. The method divides the [[IP address]] space for [[Internet Protocol version 4]] (IPv4) into five address classes based on the leading four address bits. Classes A, B, and C provide [[unicast]] addresses for networks of three different network sizes. Class D is for [[multicast]] networking and the class E address range is reserved for future or experimental purposes.
A '''classful network''' is an obsolete [[network address]]ing architecture used in the [[Internet]] from 1981 until the introduction of [[Classless Inter-Domain Routing]] (CIDR) in 1993. The method divides the [[IP address]] space for [[Internet Protocol version 4]] (IPv4) into five address classes based on the leading four address bits. Classes A, B, and C provide [[unicast]] addresses for networks of three different network sizes. Class D is for [[multicast]] networking and the class E address range is reserved for future or experimental purposes.
Line 31: Line 31:


==Classful addressing definition==
==Classful addressing definition==
Under classful network addressing, the 32-bit IPv4 address space was partitioned into five classes (A-E) as shown in the following tables.
Under classful network addressing, the 32-bit IPv4 address space was partitioned into five classes (A–E) as shown in the following tables.
;Classes
;Classes
{| class="wikitable"
{| class="wikitable"
! Class
! rowspan=3 | Class
! Leading bits
! rowspan=3 | Leading bits
! Size of ''network number'' bit field
! colspan=3 | Address space
! Size of ''rest'' bit field
! colspan=4 | [[Subnet mask]]
! Number of networks
! rowspan=3 | Number of networks
! Addresses per network
! rowspan=3 | Number of addresses per network
! Total addresses in class
! rowspan=3 | Total number of addresses
! Start address
|-
! End address
! rowspan=2 | [[CIDR notation]]
! Default [[subnet mask]] in [[dot-decimal notation]]
! colspan=2 | Address range
! [[CIDR notation]]
! colspan=2 | Lengths of bit fields
! rowspan=2 | CIDR notation
! rowspan=2 | [[Dot-decimal notation]]
|-
! Start
! End
! ''Network prefix''
! ''Rest field''
|-
|-
| Class A
| Class A
| 0
| 0
| 8
| {{IPaddr|0.0.0.0|1}}
| 24
| {{IPaddr|0.0.0.0}}
| {{IPaddr|127.255.255.255}}{{efn|{{IPaddr|127.0.0.0}} through {{IPaddr|127.255.255.255}} are reserved for [[localhost|loopback addresses]]. Although reserved, they are still part of the class A address group.}}
| {{nowrap|8 bits}}
| {{nowrap|24 bits}}
| {{IPaddr||8}}
| {{IPaddr||8|netmask=dotted}}
| 128 (2<sup>7</sup>)
| 128 (2<sup>7</sup>)
| 16,777,216 (2<sup>24</sup>)
| 16,777,216 (2<sup>24</sup>)
| 2,147,483,648 (2<sup>31</sup>)
| 2,147,483,648 (2<sup>31</sup>)
| {{IPaddr|0.0.0.0}}
| {{IPaddr|127.255.255.255}}{{efn|{{IPaddr|127.0.0.0}} through {{IPaddr|127.255.255.255}} are reserved for [[localhost|loopback addresses]]. Although reserved, they are still part of the class A address group.}}
| {{IPaddr||8|netmask=dotted}}
| {{IPaddr||8}}
|-
|-
| Class B
| Class B
| 10
| 10
| 16
| {{IPaddr|128.0.0.0|2}}
| 16
| {{IPaddr|128.0.0.0}}
| {{IPaddr|191.255.255.255}}
| {{nowrap|16 bits}}
| {{nowrap|16 bits}}
| {{IPaddr||16}}
| {{IPaddr||16|netmask=dotted}}
| 16,384 (2<sup>14</sup>)
| 16,384 (2<sup>14</sup>)
| 65,536 (2<sup>16</sup>)
| 65,536 (2<sup>16</sup>)
| 1,073,741,824 (2<sup>30</sup>)
| 1,073,741,824 (2<sup>30</sup>)
| {{IPaddr|128.0.0.0}}
| {{IPaddr|191.255.255.255}}
| {{IPaddr||16|netmask=dotted}}
| {{IPaddr||16}}
|-
|-
| Class C
| Class C
| 110
| 110
| 24
| {{IPaddr|192.0.0.0|3}}
| 8
| {{IPaddr|192.0.0.0}}
| {{IPaddr|223.255.255.255}}
| {{nowrap|24 bits}}
| {{nowrap|8 bits}}
| {{IPaddr||24}}
| {{IPaddr||24|netmask=dotted}}
| 2,097,152 (2<sup>21</sup>)
| 2,097,152 (2<sup>21</sup>)
| 256 (2<sup>8</sup>)
| 256 (2<sup>8</sup>)
| 536,870,912 (2<sup>29</sup>)
| 536,870,912 (2<sup>29</sup>)
| {{IPaddr|192.0.0.0}}
| {{IPaddr|223.255.255.255}}
| {{IPaddr||24|netmask=dotted}}
| {{IPaddr||24}}
|-
|-
| Class D ([[multicast]])
| Class D ([[multicast]])
| 1110
| 1110
| not defined
| {{IPaddr|224.0.0.0|4}}<ref>[https://www.ge.com/digital/documentation/cimplicity/version10/oxy_ex-2/advanced_features/topics/g_cimplicity_advanced_features_multicast_ip_addr.html MULTICAST_IP_ADDR]. [[General Electric]] Digital Solutions. [[CIMPLICITY]] 10.0. <q>In network prefix or Classless Inter-Domain Routing ( CIDR) notation, IP multicast addresses are summarized as 224.0.0.0/4.</q></ref>
| not defined
| not defined
| not defined
| 268,435,456 (2<sup>28</sup>)
| {{IPaddr|224.0.0.0}}
| {{IPaddr|224.0.0.0}}
| {{IPaddr|239.255.255.255}}
| {{IPaddr|239.255.255.255}}
| not defined
| {{n/a}}
| /4<ref>[https://www.ge.com/digital/documentation/cimplicity/version10/oxy_ex-2/advanced_features/topics/g_cimplicity_advanced_features_multicast_ip_addr.html MULTICAST_IP_ADDR]. [[General Electric]] Digital Solutions. [[CIMPLICITY]] 10.0. <q>In network prefix or Classless Inter-Domain Routing ( CIDR) notation, IP multicast addresses are summarized as 224.0.0.0/4.</q></ref>
| {{n/a}}
| {{n/a}}
| {{n/a}}
| {{n/a}}
| {{n/a}}
| 268,435,456 (2<sup>28</sup>)
|-
|-
| Class E (reserved)
| Class E (reserved)
| 1111
| 1111
| not defined
| {{IPaddr|240.0.0.0|4}}
| not defined
| not defined
| not defined
| 268,435,456 (2<sup>28</sup>)
| {{IPaddr|240.0.0.0}}
| {{IPaddr|240.0.0.0}}
| {{IPaddr|255.255.255.255}}{{efn|{{IPaddr|255.255.255.255}} is reserved as the IPv4 [[broadcast address]].}}
| {{IPaddr|255.255.255.255}}{{efn|{{IPaddr|255.255.255.255}} is reserved as the IPv4 [[broadcast address]].}}
| not defined
| {{n/a}}
| not defined
| {{n/a}}
| {{n/a}}
| {{n/a}}
| {{n/a}}
| {{n/a}}
| 268,435,456 (2<sup>28</sup>)
|}
|}


;Bit-wise representation
;Bit-wise representation
In the following bit-wise representation,
In the following bit-wise representation,
* ''n'' indicates a bit used for the network ID.
* ''n'' indicates a bit used for the ''network prefix''.
* ''H'' indicates a bit used for the host ID.
* ''h'' indicates a bit used for the ''rest field'', or ''host identifier''.
* ''X'' indicates a bit without a specified purpose.
* ''x'' indicates a bit without a specified purpose.
<!--127.255.255.255 is correct for Class A-->
<!--127.255.255.255 is correct for Class A-->
<pre>
<pre>
Line 132: Line 144:
224.  0.  0.  0 = 11100000.00000000.00000000.00000000
224.  0.  0.  0 = 11100000.00000000.00000000.00000000
239.255.255.255 = 11101111.11111111.11111111.11111111
239.255.255.255 = 11101111.11111111.11111111.11111111
                   1110XXXX.XXXXXXXX.XXXXXXXX.XXXXXXXX
                   1110xxxx.xxxxxxxx.xxxxxxxx.xxxxxxxx


Class E
Class E
240.  0.  0.  0 = 11110000.00000000.00000000.00000000
240.  0.  0.  0 = 11110000.00000000.00000000.00000000
255.255.255.255 = 11111111.11111111.11111111.11111111
255.255.255.255 = 11111111.11111111.11111111.11111111
                   1111XXXX.XXXXXXXX.XXXXXXXX.XXXXXXXX
                   1111xxxx.xxxxxxxx.xxxxxxxx.xxxxxxxx
</pre>
</pre>


The number of addresses usable for addressing specific hosts in each network is always {{nowrap|2<sup>N</sup> - 2}}, where N is the number of rest field bits, and the subtraction of 2 adjusts for the use of the all-bits-zero host value to represent the network address and the all-bits-one host value for use as a broadcast address. Thus, for a Class C address with 8 bits available in the host field, the maximum number of hosts is 254.
The number of addresses usable for addressing specific hosts in each network is always {{nowrap|2<sup>''n''</sup> 2}}, where ''n'' is the number of ''rest field'' bits, and the subtraction of two adjusts for the use of the all-bits-zero host value to represent the network address and the all-bits-one host value for use as a broadcast address. Thus, for a Class C address with 8 bits available in the host field, the maximum number of hosts is 254.


Today, IP addresses are associated with a [[subnet mask]]. This was not required in a classful network because the mask was implied by the address itself; any network device would inspect the first few bits of the IP address to determine the class of the address and thus its netmask.
Today, [[subnet mask]]s are explicit. This was not required in the classful scheme because the mask was implied by the address itself; any network device would inspect the first few bits of the IP address to determine the class of the address and thus its subnet mask.


The blocks numerically at the start and end of classes A, B and C were originally reserved for special addressing or future features, i.e., {{IPaddr|0.0.0.0|8}} and {{IPaddr|127.0.0.0|8}} are reserved in former class A; {{IPaddr|128.0.0.0|16}} and {{IPaddr|191.255.0.0|16}} were reserved in former class B but are now available for assignment; {{IPaddr|192.0.0.0|24}} and {{IPaddr|223.255.255.0|24}} are reserved in former class C. While the {{IPaddr|127.0.0.0|8}} network is a Class A network, it is designated for [[loopback]] and cannot be assigned to a network.<ref name="RFC 5735">{{cite IETF |title=Special Use IPv4 Addresses |author1=M. Cotton |author2=L. Vegoda |date=January 2010 |RFC=5735}}</ref>
The blocks numerically at the start and end of classes A, B and C were originally reserved for special addressing or future features, i.e., {{IPaddr|0.0.0.0|8}} and {{IPaddr|127.0.0.0|8}} are reserved in former class A; {{IPaddr|128.0.0.0|16}} and {{IPaddr|191.255.0.0|16}} were reserved in former class B but are now available for assignment; {{IPaddr|192.0.0.0|24}} and {{IPaddr|223.255.255.0|24}} are reserved in former class C. While the {{IPaddr|127.0.0.0|8}} network is a Class A network, it is designated for [[loopback]] and cannot be assigned to a network.<ref name="RFC 5735">{{cite IETF |title=Special Use IPv4 Addresses |author1=M. Cotton |author2=L. Vegoda |date=January 2010 |RFC=5735}}</ref>

Latest revision as of 11:33, 29 September 2025

Template:Short description

File:Internet map in February 82.png
Map of the prototype Internet in 1982, showing 8-bit-numbered networks (ovals) only, interconnected by routers (rectangles)

A classful network is an obsolete network addressing architecture used in the Internet from 1981 until the introduction of Classless Inter-Domain Routing (CIDR) in 1993. The method divides the IP address space for Internet Protocol version 4 (IPv4) into five address classes based on the leading four address bits. Classes A, B, and C provide unicast addresses for networks of three different network sizes. Class D is for multicast networking and the class E address range is reserved for future or experimental purposes.

Since its discontinuation, remnants of classful network concepts have remained in practice only in limited scope in the default configuration parameters of some network software and hardware components, most notably in the default configuration of subnet masks.

Background

In the original address definition, the most significant eight bits of the 32-bit IPv4 address was the network number field which specified the particular network a host was attached to. The remaining 24 bits specified the local address, also called rest field (the rest of the address), which uniquely identified a host connected to that network.Template:Ref RFC This format was sufficient at a time when only a few large networks existed, such as the ARPANET (network number 10), and before the wide proliferation of local area networks (LANs). As a consequence of this architecture, the address space supported only a low number (254) of independent networks.

Before the introduction of address classes, the only address blocks available were these large blocks which later became known as Class A networks.[1] As a result, some organizations involved in the early development of the Internet received very large address space allocations (16,777,216 IP addresses each).

Introduction of address classes

Expansion of the network had to ensure compatibility with the existing address space and the IPv4 packet structure, and avoid the renumbering of the existing networks. The solution was to expand the definition of the network number field to include more bits, allowing more networks to be designated, each potentially having fewer hosts. Since all existing network numbers at the time were smaller than 64, they had only used the 6 least-significant bits of the network number field. Thus it was possible to use the most-significant bits of an address to introduce a set of address classes while preserving the existing network numbers in the first of these classes.

The new addressing architecture was introduced by Template:IETF RFC in 1981 as a part of the specification of the Internet Protocol.Template:Ref RFC It divided the address space into primarily three address formats, henceforth called address classes, and left a fourth range reserved to be defined later.

The first class, designated as Class A, contained all addresses in which the most significant bit is zero. The network number for this class is given by the next 7 bits, therefore accommodating 128 networks in total, including the zero network, and including the IP networks already allocated. A Class B network was a network in which all addresses had the two most-significant bits set to 1 and 0 respectively. For these networks, the network address was given by the next 14 bits of the address, thus leaving 16 bits for numbering host on the network for a total of Template:Gaps addresses per network. Class C was defined with the 3 high-order bits set to 1, 1, and 0, and designating the next 21 bits to number the networks, leaving each network with 256 local addresses.

The leading bit sequence 111 designated an at-the-time unspecified addressing mode ("escape to extended addressing mode"),Template:Ref RFC which was later subdivided as Class D (1110) for multicast addressing, while leaving as reserved for future use the 1111 block designated as Class E.Template:Ref RFC

This architecture change extended the addressing capacity of the Internet but did not prevent IP address exhaustion. The problem was that many sites needed larger address blocks than a Class C network provided, and therefore they received a Class B block, which was in most cases much larger than required. Due to the rapid growth of the Internet, the pool of unassigned Class B addresses (214, or about 16,000) was rapidly being depleted. Starting in 1993, classful networking was replaced by Classless Inter-Domain Routing (CIDR),Template:Ref RFCTemplate:Ref RFC in an attempt to solve this problem.

Classful addressing definition

Under classful network addressing, the 32-bit IPv4 address space was partitioned into five classes (A–E) as shown in the following tables.

Classes
Class Leading bits Address space Subnet mask Number of networks Number of addresses per network Total number of addresses
CIDR notation Address range Lengths of bit fields CIDR notation Dot-decimal notation
Start End Network prefix Rest field
Class A 0 Template:IPaddr Template:IPaddr Template:IPaddrTemplate:Efn 8 bits 24 bits Template:IPaddr Template:IPaddr 128 (27) 16,777,216 (224) 2,147,483,648 (231)
Class B 10 Template:IPaddr Template:IPaddr Template:IPaddr 16 bits 16 bits Template:IPaddr Template:IPaddr 16,384 (214) 65,536 (216) 1,073,741,824 (230)
Class C 110 Template:IPaddr Template:IPaddr Template:IPaddr 24 bits 8 bits Template:IPaddr Template:IPaddr 2,097,152 (221) 256 (28) 536,870,912 (229)
Class D (multicast) 1110 Template:IPaddr[2] Template:IPaddr Template:IPaddr 268,435,456 (228)
Class E (reserved) 1111 Template:IPaddr Template:IPaddr Template:IPaddrTemplate:Efn 268,435,456 (228)
Bit-wise representation

In the following bit-wise representation,

  • n indicates a bit used for the network prefix.
  • h indicates a bit used for the rest field, or host identifier.
  • x indicates a bit without a 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

The number of addresses usable for addressing specific hosts in each network is always 2n − 2, where n is the number of rest field bits, and the subtraction of two adjusts for the use of the all-bits-zero host value to represent the network address and the all-bits-one host value for use as a broadcast address. Thus, for a Class C address with 8 bits available in the host field, the maximum number of hosts is 254.

Today, subnet masks are explicit. This was not required in the classful scheme because the mask was implied by the address itself; any network device would inspect the first few bits of the IP address to determine the class of the address and thus its subnet mask.

The blocks numerically at the start and end of classes A, B and C were originally reserved for special addressing or future features, i.e., Template:IPaddr and Template:IPaddr are reserved in former class A; Template:IPaddr and Template:IPaddr were reserved in former class B but are now available for assignment; Template:IPaddr and Template:IPaddr are reserved in former class C. While the Template:IPaddr network is a Class A network, it is designated for loopback and cannot be assigned to a network.[3]

Class D is reserved for multicast and cannot be used for regular unicast traffic. Class E is reserved and cannot be used on the public Internet. Many older routers will not accept using it in any context.Script error: No such module "Unsubst".

See also

Notes

Template:Notelist

References

<templatestyles src="Reflist/styles.css" />

  1. Template:Cite IETF
  2. MULTICAST_IP_ADDR. General Electric Digital Solutions. CIMPLICITY 10.0. In network prefix or Classless Inter-Domain Routing ( CIDR) notation, IP multicast addresses are summarized as 224.0.0.0/4.
  3. Template:Cite IETF

Script error: No such module "Check for unknown parameters".

External links