IPv4 subnetting reference
Encyclopedia
In the IPv4
address space
certain address blocks are specially allocated or reserved for special uses such as loopback
interfaces, private network
s (RFC 1918), and state-less autoconfiguration (Zeroconf
, RFC 3927) of interfaces. Such addresses may be used without registration or allocation from Regional Internet Registries
(RIRs). However, these address ranges must not be routed into the public Internet infrastructure.
The netmask is a bitmask that can be used to separate the bits of the network identifier from the bits of the host identifier. It is often written in the same notation used to denote IP addresses.
Not all sizes of prefix announcement may be routable on the public Internet: see routing
, peering
.
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., 0.0.0.0/8 and 127.0.0.0/8 are reserved in former class A; 128.0.0.0/16 and 191.255.0.0/16 are reserved in former class B; 192.0.0.0/24 and 223.255.255.0/24 are reserved in former class C.
While the 127.0.0.0/8 network is a Class A network, it is designated for loopback
and cannot be assigned to a network.
In common usage, the "host all zeros" address is reserved for referring to the entire network, while the "host all ones" address is used as a broadcast address
in the given subnet; this reduces the number of addresses available for hosts by 2. This explains the reference to /31 networks as "Rarely Used," as the only possible addresses on a /31 network are "host all ones" and "host all zeros." RFC 3021 creates an exception to the "host all ones" and "host all zeros" broadcast usage to make /31 networks usable for point-to-point links. In practice, however, point-to-point links are still typically implemented using /30 networks, or occasionally by /32 and point-to-point explicit host routes. There is generally no technical advantage to /31 versus /32, although one or the other may be more convenient based on other issues. A /30 is always wasteful and has as its sole advantage that it behaves "as expected" for any other subnetwork.
IPv4
Internet Protocol version 4 is the fourth revision in the development of the Internet Protocol and the first version of the protocol to be widely deployed. Together with IPv6, it is at the core of standards-based internetworking methods of the Internet...
address space
IP address
An Internet Protocol address is a numerical label assigned to each device participating in a computer network that uses the Internet Protocol for communication. An IP address serves two principal functions: host or network interface identification and location addressing...
certain address blocks are specially allocated or reserved for special uses such as loopback
Loopback
Loopback describes ways of routing electronic signals, digital data streams, or flows of items from their originating facility back to the source without intentional processing or modification...
interfaces, private network
Private network
In the Internet addressing architecture, a private network is a network that uses private IP address space, following the standards set by RFC 1918 and RFC 4193. These addresses are commonly used for home, office, and enterprise local area networks , when globally routable addresses are not...
s (RFC 1918), and state-less autoconfiguration (Zeroconf
Zeroconf
Zero configuration networking , is a set of techniques that automatically creates a usable Internet Protocol network without manual operator intervention or special configuration servers....
, RFC 3927) of interfaces. Such addresses may be used without registration or allocation from Regional Internet Registries
Regional Internet Registry
A regional Internet registry is an organization that manages the allocation and registration of Internet number resources within a particular region of the world...
(RIRs). However, these address ranges must not be routed into the public Internet infrastructure.
The netmask is a bitmask that can be used to separate the bits of the network identifier from the bits of the host identifier. It is often written in the same notation used to denote IP addresses.
Not all sizes of prefix announcement may be routable on the public Internet: see routing
Routing
Routing is the process of selecting paths in a network along which to send network traffic. Routing is performed for many kinds of networks, including the telephone network , electronic data networks , and transportation networks...
, peering
Peering
In computer networking, peering is a voluntary interconnection of administratively separate Internet networks for the purpose of exchanging traffic between the customers of each network. The pure definition of peering is settlement-free or "sender keeps all," meaning that neither party pays the...
.
Class | Leading bits | Start | End | Default Subnet Mask in dotted decimal | CIDR notation CIDR notation CIDR notation is a compact specification of an Internet Protocol address and its associated routing prefix. Classless Inter-Domain Routing is an Internet Protocol address allocation and route aggregation methodology used within the Internet addressing architecture that replaced the IPv4 classful... |
---|---|---|---|---|---|
A | 0 | 0.0.0.0 | 127.255.255.255 | 255.0.0.0 | /8 |
B | 10 | 128.0.0.0 | 191.255.255.255 | 255.255.0.0 | /16 |
C | 110 | 192.0.0.0 | 223.255.255.255 | 255.255.255.0 | /24 |
D | 1110 | 224.0.0.0 | 239.255.255.255 | not defined | not defined |
E | 1111 | 240.0.0.0 | 255.255.255.254 | not defined | not defined |
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., 0.0.0.0/8 and 127.0.0.0/8 are reserved in former class A; 128.0.0.0/16 and 191.255.0.0/16 are reserved in former class B; 192.0.0.0/24 and 223.255.255.0/24 are reserved in former class C.
While the 127.0.0.0/8 network is a Class A network, it is designated for loopback
Loopback
Loopback describes ways of routing electronic signals, digital data streams, or flows of items from their originating facility back to the source without intentional processing or modification...
and cannot be assigned to a network.
CIDR CIDR notation CIDR notation is a compact specification of an Internet Protocol address and its associated routing prefix. Classless Inter-Domain Routing is an Internet Protocol address allocation and route aggregation methodology used within the Internet addressing architecture that replaced the IPv4 classful... |
host bit Bit A bit is the basic unit of information in computing and telecommunications; it is the amount of information stored by a digital device or other physical system that exists in one of two possible distinct states... s |
Netmask | Hosts in subnet | Classful Classful network A classful network is a network addressing architecture used in the Internet from 1981 until the introduction of Classless Inter-Domain Routing in 1993. The method divides the address space for Internet Protocol Version 4 into five address classes. Each class, coded in the first four bits of the... name |
Typical usage |
---|---|---|---|---|---|
/8 | 24 | 255.0.0.0 | 16777216 = 224 | Class A (see this list) | Largest block allocation made by IANA Internet Assigned Numbers Authority The Internet Assigned Numbers Authority is the entity that oversees global IP address allocation, autonomous system number allocation, root zone management in the Domain Name System , media types, and other Internet Protocol-related symbols and numbers... |
/9 | 23 | 255.128.0.0 | 8388608 = 223 | ||
/10 | 22 | 255.192.0.0 | 4194304 = 222 | ||
/11 | 21 | 255.224.0.0 | 2097152 = 221 | ||
/12 | 20 | 255.240.0.0 | 1048576 = 220 | ||
/13 | 19 | 255.248.0.0 | 524288 = 219 | ||
/14 | 18 | 255.252.0.0 | 262144 = 218 | ||
/15 | 17 | 255.254.0.0 | 131072 = 217 | ||
/16 | 16 | 255.255.0.0 | 65536 = 216 | Class B | |
/17 | 15 | 255.255.128.0 | 32768 = 215 | ISP / large business | |
/18 | 14 | 255.255.192.0 | 16384 = 214 | ISP / large business | |
/19 | 13 | 255.255.224.0 | 8192 = 213 | ISP / large business | |
/20 | 12 | 255.255.240.0 | 4096 = 212 | Small ISP / large business | |
/21 | 11 | 255.255.248.0 | 2048 = 211 | Small ISP / large business | |
/22 | 10 | 255.255.252.0 | 1024 = 210 | ||
/23 | 9 | 255.255.254.0 | 512 = 29 | ||
/24 | 8 | 255.255.255.0 | 256 = 28 | Class C | Large LAN Län Län and lääni refer to the administrative divisions used in Sweden and previously in Finland. The provinces of Finland were abolished on January 1, 2010.... |
/25 | 7 | 255.255.255.128 | 128 = 27 | Large LAN |
|
/26 | 6 | 255.255.255.192 | 64 = 26 | Small LAN |
|
/27 | 5 | 255.255.255.224 | 32 = 25 | Small LAN |
|
/28 | 4 | 255.255.255.240 | 16 = 24 | Small LAN | |
/29 | 3 | 255.255.255.248 | 8 = 23 | Smallest multi-host network | |
/30 | 2 | 255.255.255.252 | 4 = 22 | "Glue network" (point to point links) | |
/31 | 1 | 255.255.255.254 | 2 = 21 | Rarely used, point to point links (RFC 3021) | |
/32 | 0 | 255.255.255.255 | 1 = 20 | Host route |
In common usage, the "host all zeros" address is reserved for referring to the entire network, while the "host all ones" address is used as a broadcast address
Broadcast address
A broadcast address is a logical address at which all devices connected to a multiple-access communications network are enabled to receive datagrams...
in the given subnet; this reduces the number of addresses available for hosts by 2. This explains the reference to /31 networks as "Rarely Used," as the only possible addresses on a /31 network are "host all ones" and "host all zeros." RFC 3021 creates an exception to the "host all ones" and "host all zeros" broadcast usage to make /31 networks usable for point-to-point links. In practice, however, point-to-point links are still typically implemented using /30 networks, or occasionally by /32 and point-to-point explicit host routes. There is generally no technical advantage to /31 versus /32, although one or the other may be more convenient based on other issues. A /30 is always wasteful and has as its sole advantage that it behaves "as expected" for any other subnetwork.
See also
- SubnetworkSubnetworkA subnetwork, or subnet, is a logically visible subdivision of an IP network. The practice of dividing a network into subnetworks is called subnetting....
- Classless Inter-Domain RoutingClassless Inter-Domain RoutingClassless Inter-Domain Routing is a method for allocating IP addresses and routing Internet Protocol packets. The Internet Engineering Task Force introduced CIDR in 1993 to replace the previous addressing architecture of classful network design in the Internet...
(CIDR) - IP/CIDR subnet calculation
- IPv6 subnetting referenceIPv6 subnetting referenceThis IPv6 subnetting reference lists the sizes for IPv6 computer networks. Different types of network links may require different subnet sizes. The CIDR netmask separates the bits of the network identifier prefix from the bits of the interface identifier...
- IPv4 Address Subnet/Supernet Tools