What is prefix and prefix length in IPv6, Similarity between IPv4 subnet mask and IPv6 prefix

We already learned from our IPv4 lessons that an IP addresses (IPv4 or IPv6) consists of twoi parts; a NETWORK part and HOST part. NETWORK part is used to identify the network and the HOST part is used to identify a host (a server, a workstation, a printer etc) within the network. In IPv4, we use subnet masks to differentiate the network part and host part in an IPv4 address.

For example, consider the below IPv4 address: - IPv4 address - Subnet mask

Here 172.16 - denotes the network part and 133.18 denotes the host part.

 What is IPv6 Network Prefix

IPv6 has a similar mechanism as described above, called IPv6 network prefixes. The leftmost fields of the IPv6 address along with the network bits lenth represented in CIDR format is known as the network prefix. The prefixes in IPv6 can be considered similar to the subnet mask used in IPv4 addresses. In IPv6, we use a notation similar to CIDR mask (using an integer between 1-128 to represent the network bits) representation in IPv4.

For example, in IPv6 address 2001:0DB8:0000:000b:0000:0000:0000:001A/64, 2001:0DB8:0000:000b::/64 represents the network prefix and the possible IPv6 addresses ranges from 2001:0DB8:0000:000b:0000:0000:0000:0001/64 to 2001:0DB8:0000:000b:ffff:ffff:ffff:ffff/64.

You can see that the above IPv6 network prefix representation is similar to IPv4 network address and subnet mask representation. represents all IPv4 addresses from to

Note that the network prefix shown above, 2001:0DB8:0000:000b::/64, includes the 48 bit IPv6 global routing prefix 2001:0DB8:0000::/48 and the next 16 bits "000b" are used for internal subnetting within an organization.

What is IPv6 Prefix Length

IPv6 Prefix Length is used to identify how many bits of a Gobal Unicast IPv6 Address are there in network part. For example, in 2001:0DB8:0000:000b::/64, the number 64 is used to identify that the first 64 bits are in network part.

Related Tutorials