CIDR table and subnet masks
Prefixes /0 to /8
-
/0
- Subnet mask
- 0.0.0.0
- Wildcard
- 255.255.255.255
- Addresses
- 4,294,967,296
- Usable hosts
- 4,294,967,294
- Networks of this size in IPv4
- 1
The entire IPv4 address space. The network 0.0.0.0/0 is the default route, and in firewall rules it means any address. Equal to 16,777,216 /24 networks.
-
/1
- Subnet mask
- 128.0.0.0
- Wildcard
- 127.255.255.255
- Addresses
- 2,147,483,648
- Usable hosts
- 2,147,483,646
- Networks of this size in IPv4
- 2
Equal to 8,388,608 /24 networks.
-
/2
- Subnet mask
- 192.0.0.0
- Wildcard
- 63.255.255.255
- Addresses
- 1,073,741,824
- Usable hosts
- 1,073,741,822
- Networks of this size in IPv4
- 4
Equal to 4,194,304 /24 networks.
-
/3
- Subnet mask
- 224.0.0.0
- Wildcard
- 31.255.255.255
- Addresses
- 536,870,912
- Usable hosts
- 536,870,910
- Networks of this size in IPv4
- 8
Equal to 2,097,152 /24 networks.
-
/4
- Subnet mask
- 240.0.0.0
- Wildcard
- 15.255.255.255
- Addresses
- 268,435,456
- Usable hosts
- 268,435,454
- Networks of this size in IPv4
- 16
Equal to 1,048,576 /24 networks.
-
/5
- Subnet mask
- 248.0.0.0
- Wildcard
- 7.255.255.255
- Addresses
- 134,217,728
- Usable hosts
- 134,217,726
- Networks of this size in IPv4
- 32
Equal to 524,288 /24 networks.
-
/6
- Subnet mask
- 252.0.0.0
- Wildcard
- 3.255.255.255
- Addresses
- 67,108,864
- Usable hosts
- 67,108,862
- Networks of this size in IPv4
- 64
Equal to 262,144 /24 networks.
-
/7
- Subnet mask
- 254.0.0.0
- Wildcard
- 1.255.255.255
- Addresses
- 33,554,432
- Usable hosts
- 33,554,430
- Networks of this size in IPv4
- 128
Equal to 131,072 /24 networks.
-
/8
- Subnet mask
- 255.0.0.0
- Wildcard
- 0.255.255.255
- Addresses
- 16,777,216
- Usable hosts
- 16,777,214
- Networks of this size in IPv4
- 256
The size of a Class A network in the old classful system. The private range 10.0.0.0/8 and the range 127.0.0.0/8, reserved for loopback addresses, are this size. Equal to 65,536 /24 networks.
Prefixes /9 to /16
-
/9
- Subnet mask
- 255.128.0.0
- Wildcard
- 0.127.255.255
- Addresses
- 8,388,608
- Usable hosts
- 8,388,606
- Networks of this size in IPv4
- 512
Equal to 32,768 /24 networks.
-
/10
- Subnet mask
- 255.192.0.0
- Wildcard
- 0.63.255.255
- Addresses
- 4,194,304
- Usable hosts
- 4,194,302
- Networks of this size in IPv4
- 1,024
The range 100.64.0.0/10 is reserved for internet service providers, which assign addresses from it to customers who share one public address through CGNAT. Equal to 16,384 /24 networks.
-
/11
- Subnet mask
- 255.224.0.0
- Wildcard
- 0.31.255.255
- Addresses
- 2,097,152
- Usable hosts
- 2,097,150
- Networks of this size in IPv4
- 2,048
Equal to 8,192 /24 networks.
-
/12
- Subnet mask
- 255.240.0.0
- Wildcard
- 0.15.255.255
- Addresses
- 1,048,576
- Usable hosts
- 1,048,574
- Networks of this size in IPv4
- 4,096
The private range 172.16.0.0/12, from 172.16.0.0 to 172.31.255.255, is this size. Equal to 4,096 /24 networks.
-
/13
- Subnet mask
- 255.248.0.0
- Wildcard
- 0.7.255.255
- Addresses
- 524,288
- Usable hosts
- 524,286
- Networks of this size in IPv4
- 8,192
Equal to 2,048 /24 networks.
-
/14
- Subnet mask
- 255.252.0.0
- Wildcard
- 0.3.255.255
- Addresses
- 262,144
- Usable hosts
- 262,142
- Networks of this size in IPv4
- 16,384
Equal to 1,024 /24 networks.
-
/15
- Subnet mask
- 255.254.0.0
- Wildcard
- 0.1.255.255
- Addresses
- 131,072
- Usable hosts
- 131,070
- Networks of this size in IPv4
- 32,768
Equal to 512 /24 networks.
-
/16
- Subnet mask
- 255.255.0.0
- Wildcard
- 0.0.255.255
- Addresses
- 65,536
- Usable hosts
- 65,534
- Networks of this size in IPv4
- 65,536
The size of a Class B network in the old classful system. The private range 192.168.0.0/16 and the range 169.254.0.0/16, reserved for link-local addresses, are this size. Equal to 256 /24 networks.
Prefixes /17 to /24
-
/17
- Subnet mask
- 255.255.128.0
- Wildcard
- 0.0.127.255
- Addresses
- 32,768
- Usable hosts
- 32,766
- Networks of this size in IPv4
- 131,072
Equal to 128 /24 networks.
-
/18
- Subnet mask
- 255.255.192.0
- Wildcard
- 0.0.63.255
- Addresses
- 16,384
- Usable hosts
- 16,382
- Networks of this size in IPv4
- 262,144
Equal to 64 /24 networks.
-
/19
- Subnet mask
- 255.255.224.0
- Wildcard
- 0.0.31.255
- Addresses
- 8,192
- Usable hosts
- 8,190
- Networks of this size in IPv4
- 524,288
Equal to 32 /24 networks.
-
/20
- Subnet mask
- 255.255.240.0
- Wildcard
- 0.0.15.255
- Addresses
- 4,096
- Usable hosts
- 4,094
- Networks of this size in IPv4
- 1,048,576
Equal to 16 /24 networks.
-
/21
- Subnet mask
- 255.255.248.0
- Wildcard
- 0.0.7.255
- Addresses
- 2,048
- Usable hosts
- 2,046
- Networks of this size in IPv4
- 2,097,152
Equal to 8 /24 networks.
-
/22
- Subnet mask
- 255.255.252.0
- Wildcard
- 0.0.3.255
- Addresses
- 1,024
- Usable hosts
- 1,022
- Networks of this size in IPv4
- 4,194,304
Equal to 4 /24 networks.
-
/23
- Subnet mask
- 255.255.254.0
- Wildcard
- 0.0.1.255
- Addresses
- 512
- Usable hosts
- 510
- Networks of this size in IPv4
- 8,388,608
Equal to 2 /24 networks.
-
/24
- Subnet mask
- 255.255.255.0
- Wildcard
- 0.0.0.255
- Addresses
- 256
- Usable hosts
- 254
- Networks of this size in IPv4
- 16,777,216
The size of a Class C network in the old classful system, and the most common size for a home or office local network, for example 192.168.1.0/24. The documentation ranges, such as 192.0.2.0/24, are also this size.
Prefixes /25 to /32
-
/25
- Subnet mask
- 255.255.255.128
- Wildcard
- 0.0.0.127
- Addresses
- 128
- Usable hosts
- 126
- Networks of this size in IPv4
- 33,554,432
One /24 network splits into 2 networks of this size.
-
/26
- Subnet mask
- 255.255.255.192
- Wildcard
- 0.0.0.63
- Addresses
- 64
- Usable hosts
- 62
- Networks of this size in IPv4
- 67,108,864
One /24 network splits into 4 networks of this size.
-
/27
- Subnet mask
- 255.255.255.224
- Wildcard
- 0.0.0.31
- Addresses
- 32
- Usable hosts
- 30
- Networks of this size in IPv4
- 134,217,728
One /24 network splits into 8 networks of this size.
-
/28
- Subnet mask
- 255.255.255.240
- Wildcard
- 0.0.0.15
- Addresses
- 16
- Usable hosts
- 14
- Networks of this size in IPv4
- 268,435,456
One /24 network splits into 16 networks of this size.
-
/29
- Subnet mask
- 255.255.255.248
- Wildcard
- 0.0.0.7
- Addresses
- 8
- Usable hosts
- 6
- Networks of this size in IPv4
- 536,870,912
A network of this size suits a small block of public addresses, for example for a router and a few servers, with 6 usable addresses. One /24 network splits into 32 networks of this size.
-
/30
- Subnet mask
- 255.255.255.252
- Wildcard
- 0.0.0.3
- Addresses
- 4
- Usable hosts
- 2
- Networks of this size in IPv4
- 1,073,741,824
The traditional size for a point-to-point link between two routers: 2 usable addresses, alongside the network address and the broadcast address. One /24 network splits into 64 networks of this size.
-
/31
- Subnet mask
- 255.255.255.254
- Wildcard
- 0.0.0.1
- Addresses
- 2
- Usable hosts
- 2 (point-to-point)
- Networks of this size in IPv4
- 2,147,483,648
Under RFC 3021, both addresses in a /31 network on a point-to-point link are usable, and there is no network or broadcast address. This saves two addresses compared with a /30 network. One /24 network splits into 128 networks of this size.
-
/32
- Subnet mask
- 255.255.255.255
- Wildcard
- 0.0.0.0
- Addresses
- 1
- Usable hosts
- 1 (single host)
- Networks of this size in IPv4
- 4,294,967,296
A single address of one host, used in firewall rules and allowlists to specify one address, and in routing tables for a route to a specific host. One /24 network splits into 256 networks of this size.
No matching prefixes.
How to read CIDR notation
In CIDR notation, you write the network address, a slash, and the prefix length, for example 192.0.2.0/24. The prefix states how many bits from the start of the address, out of 32, belong to the network part, and the remaining bits identify hosts within the network. The number of addresses in a network is 2 to the power of the number of host bits, so each time the prefix grows by 1, the network splits into two networks of half the size.
The subnet mask shows the same prefix in dotted decimal notation: /26 is 26 bits set to 1, which is 255.255.255.192. The wildcard mask is its inverse, 0.0.0.63, and it is used in router access control lists (ACLs) and in some configuration files. Under RFC 4632, this method replaced the old division into Class A, B, and C networks, and today a prefix can be any number from 0 to 32.
Network address and broadcast address
The first address in a network, where all the host bits are 0, is the network address, and the last address, where all the host bits are 1, is the broadcast address. Neither one is assigned to devices, so the number of usable hosts is 2 less than the number of addresses. For example, the address 192.0.2.130/26 belongs to the network 192.0.2.128/26: its broadcast address is 192.0.2.191, and its hosts are 192.0.2.129 to 192.0.2.190. The exceptions are a /31 network on a point-to-point link, where both addresses are usable, and a /32 network, which is a single address.
To calculate a specific address, with its network address, broadcast address, and host range, use the subnet calculator.
Splitting a network into smaller subnets
The example uses the 192.0.2.0/24 range, reserved for documentation under RFC 5737. Splitting it into four /26 networks gives 64 addresses and 62 usable hosts in each network:
192.0.2.0/26: network address 192.0.2.0, hosts from 192.0.2.1 to 192.0.2.62, and broadcast address 192.0.2.63.192.0.2.64/26: network address 192.0.2.64, hosts from 192.0.2.65 to 192.0.2.126, and broadcast address 192.0.2.127.192.0.2.128/26: network address 192.0.2.128, hosts from 192.0.2.129 to 192.0.2.190, and broadcast address 192.0.2.191.192.0.2.192/26: network address 192.0.2.192, hosts from 192.0.2.193 to 192.0.2.254, and broadcast address 192.0.2.255.
In the same way, a /24 network splits into 2 /25 networks with 126 hosts each, 8 /27 networks with 30 hosts each, 16 /28 networks with 14 hosts each, 32 /29 networks with 6 hosts each, and 64 /30 networks with 2 hosts each. You can also combine different sizes in the same network, for example one /25 network and two /26 networks, as long as each network starts at an address divisible by its size and the networks do not overlap.
IPv6 prefix sizes
An IPv6 address is 128 bits long, and the protocol has no broadcast addresses. These are the common prefixes:
/128: a single address, such as the loopback address::1/128, or one address in firewall rules./64: the standard size for a single local network. Under RFC 4291, the interface ID in most unicast addresses is 64 bits long, and under RFC 7421, a network with a prefix longer than/64cannot use SLAAC (stateless address autoconfiguration)./56: contains 256/64networks. Under RFC 6177, regional internet registries encourage assignments of this size to end sites, for example a home connection./48: contains 65,536/64networks, and suits an organization or a site with many networks.2001:db8::/32: the range reserved for examples in documentation under RFC 3849.
To calculate IPv6 addresses and networks, use the IPv6 calculator.
Every server on a Linux VPS plan gets a dedicated, static IPv4 address, and some plans include two addresses. Additional IPv4 addresses are available on request, for an additional fee. On a Windows VPS, every server also gets a static IPv4 address of its own, and on both server types a PTR (reverse DNS) record is set up on request.
CIDR and subnet mask FAQ
How many addresses are in a network with the 255.255.255.0 mask?
A /24 network has 256 addresses, and 254 of them are usable for devices, because the first address is the network address and the last one is the broadcast address. The subnet mask of a /24 is 255.255.255.0, and it is the most common size for a local network, for example 192.168.1.0/24.
How do I calculate the number of hosts in a network?
Subtract the prefix from 32 to get the number of host bits. The number of addresses is 2 to the power of that number, and the number of usable hosts is 2 less. For example, a /27 network leaves 5 host bits, so it has 32 addresses and 30 usable hosts. On a point-to-point link, both addresses in a /31 network are usable, and a /32 network is a single address.
What is the difference between a subnet mask and a wildcard mask?
The subnet mask marks the network part of the address with bits set to 1, for example 255.255.255.0 for a /24. The wildcard mask is its inverse, 0.0.0.255 for the same network, and it marks the host part. Wildcard masks are used mainly in router access control lists (ACLs) and in some configuration files, and the table on this page shows both for every prefix.
Why is a two-address network enough for a point-to-point link?
Under RFC 3021, a /31 network on a point-to-point link between two routers does not need a network address or a broadcast address, so both addresses go to the two ends of the link. This saves two addresses compared with a /30 network, which has 4 addresses and only 2 usable ones. Both ends of the link need to support this method.
What prefix is standard for an IPv6 network?
A local IPv6 network usually gets a /64 prefix, even when only a few devices connect to it, because automatic address configuration (SLAAC) requires a 64-bit interface ID. A whole site or connection is usually assigned a /56 or a /48, which contain 256 or 65,536 /64 networks.