Network Prefix

A yellow Ghostie making an okay sign with its hand, standing in front of a depiction of devices on a network.

What Is a Network Prefix?

A network prefix is the part of an IP address that shows which network the address belongs to. It helps routers find out where to send data by guiding it to the correct network first. Once the data reaches the network, it can then be delivered to the right device.

For example, in 192.168.1.0/24, the “/24” is the network prefix. This means that the first 24 bits of the IP address belong to the network, while the rest are used for hosts (devices) on that network.

Writing out IP address ranges in this format is known as CIDR (Classless Inter-Domain Routing) notation. CIDR is a method for organizing and allocating IP addresses using prefixes of different lengths.

How a Network Prefix Works

IP addresses come in two versions: IPv4 and IPv6. Both use network prefixes, but they handle this in different ways.

IPv4

IPv4 addresses are 32 bits long. The network prefix defines how many of those bits belong to the network. For example, /8 uses the first 8 bits for the network, while /24 uses the first 24 bits. A /24 prefix leaves 8 bits for hosts.

IPv6

IPv6 addresses are 128 bits long, offering a much larger address space. Common network prefixes are /64 or /48. For example, /64 allows an enormous number of devices—over 18 quintillion. Computer scientists designed IPv6 to handle modern systems like mobile devices, cloud infrastructure, and IoT networks more efficiently.

While IPv4’s address space is limited, the protocol is still in use. IPv6 solves the problem of address exhaustion by providing a larger address space and more room for devices. As the internet grows, IPv6 is the future. It offers better scalability, simpler routing, and support for modern tech like cloud and IoT.

What Is the Network Prefix Length?

The network prefix length is defined by the number after the slash in the network prefix, like /16 in 10.0.0.0/16. It tells you (in bits) the length of the network prefix, which specifies how much of the address is for the network and how much is for hosts, like computers, devices, or interfaces.

Think of an IP address like a phone number. The prefix is the area code—it tells you which network it belongs to. The rest of the number tells you which device to reach inside that network.

Here are some examples of network prefix lengths using IPv4, which uses a 32-bit IP address:

The more bits used for the network, the fewer devices you can have in that network.

Network Prefix Use Cases

Network prefixes play a key role in how networks are organized, secured, and scaled. Here are some common use cases:

Network Prefix vs Subnet Mask

Many people think a network prefix and a subnet mask are the same thing. However, though they describe the same idea, they do so in different formats. A subnet mask looks like a full IP address, such as 255.255.255.0, while a network prefix uses a shorter form with a slash, like /24.

Both mean that the first 24 bits of the IP address are used for the network. But with a prefix like /24, it's easier to see that right away—you don’t have to calculate anything. That’s why the network prefix format is more common today.

Read More:

FAQ

You can find the network prefix length in your network settings, router configurations, or the IP address details on your device. It may be shown in CIDR (Classless Inter-Domain Routing) notation, which looks like an IP address followed by a slash and a number—for example, 192.168.1.0/24. The number after the slash is the prefix length. However, many consumer devices don’t display CIDR, and you’ll need to check the subnet mask to calculate the network prefix length.

An example of an IPv4 network prefix could be /24 in 192.168.1.0/24, which allows 254 usable IP addresses. Other common IPv4 prefixes include /8 (16,777,214 usable IPs), /16 (65,534), and /30 (2). In IPv6, a /64 prefix allows over 18 quintillion addresses, and a /48 allows over 1 septillion.

A prefix length of /24 means the first 24 bits of the IP address are for the network. This leaves 8 bits for devices, allowing for 256 addresses in that network—254 usable host addresses plus the network and broadcast addresses.

×

Time to Step up Your Digital Protection

The 2-Year Plan Is Now
Available for only /mo

undefined 45-Day Money-Back Guarantee