In CIDR notation, the prefix length is indicated with a slash. For example,
What is a network prefix for?
The prefix length determines the size of the subnet and affects the structure of the entire network. It allows administrators to divide the infrastructure into segments, distribute the address space among departments or branches, and configure routing.
Correctly chosen prefixes simplify network management, reduce the likelihood of IP address conflicts, and make it possible to limit broadcast traffic. In carrier networks, prefix information is used by routing systems, DPI platforms, BNG, and other solutions for traffic analysis and access policy management.
How to calculate the prefix
The prefix length affects the number of possible devices in a subnet. For IPv4, the number of addresses can be calculated using the formula:
IPv6 uses a different approach. The most common prefix is /64, which provides an enormous address space for a single network segment and is used in most modern networks.
Why the right prefix matters
Subnet size directly affects network performance, scalability, and security. Segments that are too large increase the volume of broadcast traffic and complicate administration, while segments that are too small lead to inefficient use of the address space.
A correctly chosen prefix helps to:
- simplify routing;
- isolate user and service segments;
- reduce the risk of IP address conflicts;
- improve security by localizing network failures;
- manage access policies and quality of service more effectively.
FAQ:
What does the /0 prefix mean in IPv6?
The /0 prefix in IPv6 denotes the entire address space and is used as the default route. If a device cannot find a more specific route for a packet, traffic is directed through the route with the /0 prefix. This prefix is mainly used in routing tables and border gateways rather than for creating user subnets.
What do the /32, /48, and /64 prefixes mean in IPv6?
An IPv6 prefix shows which part of the 128-bit address belongs to the network and which part can be used to form device and subnet addresses. The smaller the number after the slash, the larger the available address space.
- /32 is usually allocated to internet providers and large organizations for further distribution of address space.
- /48 is a prefix often assigned to enterprises or branches that need to create multiple local networks.
- /64 is the standard size of a single IPv6 local subnet. The first 64 bits define the network, and the remaining 64 are used to identify devices. This is the prefix used in most user and corporate networks and is required for the proper operation of the SLAAC (Stateless Address Autoconfiguration) mechanism.
What are the minimum and maximum network prefix lengths?
In IPv4, the prefix length can range from /0 to /32. A /0 prefix covers the entire address space, while /32 corresponds to a single IP address. In IPv6, the range is from /0 to /128, where /128 denotes the address of a single device. The longer the prefix, the smaller the available address range within the subnet, and the more precisely its boundary is defined.