A subnet mask splits an IP address, such as 255.255.255.0
, into host and network addresses. The bits (digits) in a subnet mask indicates the number of bits that have been alloted to the network’s address and the number of bits available for host addresses in the network.
In the example subnet mask 255.255.255.0
, the first three octets indicate that the first 24 bits of the IP address make up the network’s address and the remaining eight bits have been alloted to host addresses on the network. In this case, the network would have 255 available IP addresses to assign to devices. In this example, the first 24 bits of the subnet mask essentially block out or mask the network address and make it easier to determine where the network address ends and where the block of host addresses begin in a network.
A prefix length or prefix is the subnet mask equivalent for IPv6 networks. The prefix represents the number of bits of the address that represent the network address. For example, IPv6 address 1999:1ab2:bbbb:2222::::100:/64
has a prefix length of /64
which is the first 64 bits of the IPv6 address (1999:1ab2:bbbb:2222...
).
A subnet mask also defines the used range of IP addresses within a network.
Prefix Length or Prefix is the subnet mask equivalent for IPv6. The Prefix represents the number of bits of the address that represent the network portion. For example, IPv6 address, 1999:1ab2:bbbb:2222::::100:/64
, has a Prefix Length of /64
which is the first 64 bits of the IPv6 address (1999:1ab2:bbbb:2222...
).