Difference between revisions of "IP Classes"
m (→Reserver address blocks) |
m |
||
(4 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | + | =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: | 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: | ||
{| Border=1 | {| Border=1 | ||
− | |- bgcolor= | + | |- bgcolor=lightgrey |
! Class | ! Class | ||
! Leading <br>Bits | ! Leading <br>Bits | ||
Line 10: | Line 10: | ||
! Number <br>of Networks | ! Number <br>of Networks | ||
! Hosts <br>per Network | ! Hosts <br>per Network | ||
+ | ! IP<br>From IP - to IP | ||
|- | |- | ||
| Class A | | Class A | ||
Line 17: | Line 18: | ||
| 128 | | 128 | ||
| 16,777,214 | | 16,777,214 | ||
+ | | 1.0.0.0 - 127.0.0.0 | ||
|- | |- | ||
| Class B | | Class B | ||
Line 24: | Line 26: | ||
| 16,384 | | 16,384 | ||
| 65,534 | | 65,534 | ||
+ | | 128.0.0.0 - 191.255.0.0 | ||
|- | |- | ||
| Class C | | Class C | ||
Line 31: | Line 34: | ||
| 2,097,152 | | 2,097,152 | ||
| 254 | | 254 | ||
+ | | 192.0.0.0 - 223.255.255.0 | ||
|- | |- | ||
| Class D ([[IP Multicast]]) | | Class D ([[IP Multicast]]) | ||
Line 38: | Line 42: | ||
| not defined | | not defined | ||
| not defined | | not defined | ||
+ | | 224.0.0.0 - 239.255.255.255 | ||
|- | |- | ||
| Class E (reserved) | | Class E (reserved) | ||
Line 45: | Line 50: | ||
| not defined | | not defined | ||
| not defined | | not defined | ||
+ | | 240.0.0.0 - 255.255.255.255 | ||
|} | |} | ||
Line 55: | Line 61: | ||
The method of comparing two IP addresses' physical networks did not change, however (see [[Subnetwork|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. | The method of comparing two IP addresses' physical networks did not change, however (see [[Subnetwork|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. | ||
− | + | =Allocation= | |
Originally, an IP address was divided into two parts: | Originally, an IP address was divided into two parts: | ||
* Network ID: first octet | * Network ID: first octet | ||
Line 64: | Line 70: | ||
To overcome this limit, different ''classes'' of network were defined, in a system which later became known as [[classful network]]ing. | To overcome this limit, different ''classes'' of network were defined, in a system which later became known as [[classful network]]ing. | ||
Five classes were created (A, B, C, D, and E), three of which (A, B, and C) had different lengths for the network field. The rest of an address was used to identify a host within a network, which meant that each network class had a different maximum number of hosts. Thus there were a few networks with each having many host addresses and numerous networks with each only having a few host addresses. | Five classes were created (A, B, C, D, and E), three of which (A, B, and C) had different lengths for the network field. The rest of an address was used to identify a host within a network, which meant that each network class had a different maximum number of hosts. Thus there were a few networks with each having many host addresses and numerous networks with each only having a few host addresses. | ||
− | Class D was for [[ | + | Class D was for [[IP Multicast]] addresses and Class E was reserved. |
Around 1993, these classes were replaced with a [[Classless Inter-Domain Routing]] (CIDR) scheme, and the previous scheme was dubbed "classful", by contrast. | Around 1993, these classes were replaced with a [[Classless Inter-Domain Routing]] (CIDR) scheme, and the previous scheme was dubbed "classful", by contrast. | ||
Line 70: | Line 76: | ||
The actual assignment of an address is not arbitrary. The fundamental principle of [[routing]] is that the address of a device encodes information about the device's location within a network. This implies that an address assigned to one part of a network will not function in another part of the network. A hierarchical structure, created by CIDR and overseen by the [[Internet Assigned Numbers Authority]] (IANA) and its [[Regional Internet Registry|Regional Internet Registries]] (RIRs), manages the assignment of Internet addresses worldwide. Each RIR maintains a publicly-searchable [[WHOIS]] database that provides information about IP address assignments; information from these databases plays a central role in numerous tools that attempt to locate IP addresses geographically. | The actual assignment of an address is not arbitrary. The fundamental principle of [[routing]] is that the address of a device encodes information about the device's location within a network. This implies that an address assigned to one part of a network will not function in another part of the network. A hierarchical structure, created by CIDR and overseen by the [[Internet Assigned Numbers Authority]] (IANA) and its [[Regional Internet Registry|Regional Internet Registries]] (RIRs), manages the assignment of Internet addresses worldwide. Each RIR maintains a publicly-searchable [[WHOIS]] database that provides information about IP address assignments; information from these databases plays a central role in numerous tools that attempt to locate IP addresses geographically. | ||
− | = | + | |
+ | = Reservered address blocks = | ||
{| border=1 | {| border=1 | ||
|+ Reserved address blocks | |+ Reserved address blocks |
Latest revision as of 14:19, 5 September 2011
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 |
IP From IP - to IP |
---|---|---|---|---|---|---|
Class A | 0 | 8 | 24 | 128 | 16,777,214 | 1.0.0.0 - 127.0.0.0 |
Class B | 10 | 16 | 16 | 16,384 | 65,534 | 128.0.0.0 - 191.255.0.0 |
Class C | 110 | 24 | 8 | 2,097,152 | 254 | 192.0.0.0 - 223.255.255.0 |
Class D (IP Multicast) | 1110 | not defined | not defined | not defined | not defined | 224.0.0.0 - 239.255.255.255 |
Class E (reserved) | 1111 | not defined | not defined | not defined | not defined | 240.0.0.0 - 255.255.255.255 |
The number of valid host addresses available is always 2N - 2 (where N is the number of bits used, and the subtraction of 2 adjusts for the invalidity of the first and last addresses). Thus, for a class C address with 8 bits available for hosts, the number of hosts is 254.
The larger 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 IP 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 two IP addresses' physical networks did not change, however (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.
Allocation
Originally, an IP address was divided into two parts:
- Network ID: first octet
- Host ID: last three octets
This created an upper limit of 256 networks. As the networks began to be allocated, this was soon seen to be inadequate.
To overcome this limit, different classes of network were defined, in a system which later became known as classful networking. Five classes were created (A, B, C, D, and E), three of which (A, B, and C) had different lengths for the network field. The rest of an address was used to identify a host within a network, which meant that each network class had a different maximum number of hosts. Thus there were a few networks with each having many host addresses and numerous networks with each only having a few host addresses. Class D was for IP Multicast addresses and Class E was reserved.
Around 1993, these classes were replaced with a Classless Inter-Domain Routing (CIDR) scheme, and the previous scheme was dubbed "classful", by contrast. CIDR's primary advantage is to allow re-division of Class-A, -B and -C networks so that smaller (or larger) blocks of addresses may be allocated to various entities (such as Internet service providers, or their customers) or local area networks.
The actual assignment of an address is not arbitrary. The fundamental principle of routing is that the address of a device encodes information about the device's location within a network. This implies that an address assigned to one part of a network will not function in another part of the network. A hierarchical structure, created by CIDR and overseen by the Internet Assigned Numbers Authority (IANA) and its Regional Internet Registries (RIRs), manages the assignment of Internet addresses worldwide. Each RIR maintains a publicly-searchable WHOIS database that provides information about IP address assignments; information from these databases plays a central role in numerous tools that attempt to locate IP addresses geographically.
Reservered address blocks
CIDR address block | Description | Reference |
---|---|---|
0.0.0.0/8 | Current network (only valid as source address) | RFC 1700 |
10.0.0.0/8 | Private network | RFC 1918 |
127.0.0.0/8 | Loopback | RFC 3330 |
128.0.0.0/16 | Reserved (IANA) | RFC 3330 |
169.254.0.0/16 | Link-Local | RFC 3927 |
172.16.0.0/12 | Private network | RFC 1918 |
191.255.0.0/16 | Reserved (IANA) | RFC 3330 |
192.0.0.0/24 | Reserved (IANA) | RFC 3330 |
192.0.2.0/24 | Documentation and example code | RFC 3330 |
192.88.99.0/24 | IPv6 to IPv4 relay | RFC 3068 |
192.168.0.0/16 | Private network | RFC 1918 |
198.18.0.0/15 | Network benchmark tests | RFC 2544 |
223.255.255.0/24 | Reserved (IANA) | RFC 3330 |
224.0.0.0/4 | IP Multicasts (former Class D network) | RFC 3171 |
240.0.0.0/4 | Reserved (former Class E network) | RFC 1700 |
255.255.255.255 | Broadcast |