IPv6 subnetting is the process of dividing an IPv6 network into smaller subnets. This is done to increase network security, performance, and scalability.
At the end of the article you will find a small test that will allow you assess the knowledge acquired in this reading
IPv6 subnetting is done using a subnet mask. The subnet mask is a 128-bit binary number used to identify the network bits and host bits in an IPv6 address. To subnet an IPv6 address, you must first convert the address and subnet mask to decimal. Then you can use the subnet mask to calculate the number of network bits and the number of host bits.
Once you know the number of network bits and the number of host bits, you can determine the number of hosts each subnet can host.
IPv6 subnetting is used for a variety of purposes, including:
Increase security
Subnetting can help increase the security of a network by isolating devices on different subnets. This can make it difficult for attackers to access devices on a specific subnet.
Improve performance
Subnetting can help improve a network's performance by grouping devices into subnets that have similar bandwidth usage. This can help avoid network congestion.
Increase scalability
Subnetting can help increase the scalability of a network by allowing it to be easily expanded by adding new subnets.
IPv6 subnetting is an important tool for network administrators. By understanding how subnetting works, network administrators can design and manage secure, efficient, and scalable IPv6 networks.
Tips for using IPv6 subnetting:
- Always use the most specific subnet mask possible. This will help increase network security and performance.
- Do not use subnetting to create overly large subnets. This can make network administration difficult.
- Use subnetting to isolate devices into different subnets based on their function. This will help increase network security.
- Regularly update your subnetting plan based on your network's changing needs.
Subnetting process in IPv6 step by step:
1. Representation of IPv6 addresses
IPv6 addresses are represented in hexadecimal format, and each IPv6 address consists of 128 bits, divided into 8 blocks of 16 bits separated by a colon (:). Each hexadecimal block represents four binary digits.
2. Network prefix and prefix length
In IPv6, a network prefix refers to the part of the address that identifies the network. The prefix length indicates how many bits of the prefix are used to identify the network, while the remaining bits are used to identify devices within the network.
3. CIDR notation
Classless Inter-Domain Routing (CIDR) notation is used to specify the length of the network prefix in the notation of an IPv6 address. For example, if you have an IPv6 address with a prefix length of /64, it means that the first 64 bits represent the network part, and the remaining 64 bits are the host part.
4. Choose the length of the prefix
When designing an IPv6 network, you must determine how many subnets you need and how many devices you want to have on each subnet. This will help you decide the network prefix length for each subnet.
5. IPv6 address structure
A typical IPv6 address is divided into three parts:
- Network prefix: represents the address of the network and its length is determined based on the number of subnets required.
- Subnet ID: It identifies each subnet within the global network and its length is deduced from the number of devices you need on each subnet.
- Interface ID: uniquely identifies devices within a subnet and is obtained from the MAC address or by other methods.
6. Subnetting in practice
To subnet an IPv6 network, follow these steps:
Decide how many subnets you need and how many devices you want to have on each subnet.
Calculate the network prefix length and subnet prefix length based on your network needs.
Applies the network prefix to each of the subnets, ensuring that the subnets do not overlap and that they cover all the necessary address space.
Assign IPv6 addresses to devices on each subnet using the address structure mentioned above.
Example 1
Suppose we have a network with the IPv6 address 2001:0db8:85a3:0000::/64 and you want to divide it into several smaller subnets for different departments in your organization.
For this example, we are going to create three subnets, each with capacity for 1000 hosts. We will use a /64 prefix length for each subnet, meaning each subnet will have 64 bits for the network prefix and 64 bits for the hosts.
Subnet 1: Sales Department
Dirección de red: 2001:0db8:85a3:0001::/64
Host range:
2001:0db8:85a3:0001:0000:0000:0000:0000 a 2001:0db8:85a3:0001:ffff:ffff:ffff:ffff
Total available addresses: 2^64 = 18,446,744,073,709,551,616 (approximately 18 quintillion)
Subnet 2: Marketing Department
Dirección de red: 2001:0db8:85a3:0002::/64
Host range:
2001:0db8:85a3:0002:0000:0000:0000:0000 a 2001:0db8:85a3:0002:ffff:ffff:ffff:ffff
Total available addresses: 2^64 = 18,446,744,073,709,551,616 (approximately 18 quintillion)
Subnet 3: IT Department
Dirección de red: 2001:0db8:85a3:0003::/64
Host range:
2001:0db8:85a3:0003:0000:0000:0000:0000 a 2001:0db8:85a3:0003:ffff:ffff:ffff:ffff
Total available addresses: 2^64 = 18,446,744,073,709,551,616 (approximately 18 quintillion)
Example 2
Suppose we have IPv6 address assigned by the Internet provider: 2001:0db8:85a3:0000::/48. You have an office building and you want to divide this network into several subnets for different departments and areas within the building.
Requirements:
- Subnet for the Sales department: 2000 hosts.
- Subnet for the Marketing department: 500 hosts.
- Subnet for the IT department: 200 hosts.
- Subnet for the Servers area: 50 hosts.
To perform subnetting, we will first calculate the prefix lengths of each subnet to accommodate the number of hosts needed.
1. Subnet for the Sales department
Number of hosts: 2000 (closest to 2048, which is a power of 2).
Prefix length for this subnet: /54 (64 – 10 = 54 bits for hosts).
2. Subnet for the Marketing department
Number of hosts: 500 (closest to 512, which is a power of 2).
Prefix length for this subnet: /59 (64 – 5 = 59 bits for hosts).
3. Subnet for the IT department
Number of hosts: 200 (closest to 256, which is a power of 2).
Prefix length for this subnet: /56 (64 – 8 = 56 bits for hosts).
4. Subnet for the Servers area
Number of hosts: 50 (closest to 64, which is a power of 2).
Prefix length for this subnet: /58 (64 – 6 = 58 bits for hosts).
Now we can assign IPv6 addresses to each of the subnets:
1. Subnet for the Sales department
Dirección de red: 2001:0db8:85a3:0001::/54
Rango de hosts: 2001:0db8:85a3:0001:0000:0000:0000:0000 a 2001:0db8:85a3:0001:3fff:ffff:ffff:ffff
Total available addresses: 2^54 ≈ 18,446,744,073,709,551,616 (approximately
18 quintillion)
2. Subnet for the Marketing department
Dirección de red: 2001:0db8:85a3:0002::/59
Rango de hosts: 2001:0db8:85a3:0002:0000:0000:0000:0000 a 2001:0db8:85a3:0002:001f:ffff:ffff:ffff
Total available addresses: 2^59 ≈ 576,460,752,303,423,488 (approximately 576 billion)
3. Subnet for the IT department
Dirección de red: 2001:0db8:85a3:0003::/56
Rango de hosts: 2001:0db8:85a3:0003:0000:0000:0000:0000 a 2001:0db8:85a3:0003:00ff:ffff:ffff:ffff
Total available addresses: 2^56 ≈ 72,057,594,037,927,936 (approximately 72 billion)
4. Subnet for the Servers area
Dirección de red: 2001:0db8:85a3:0004::/58
Rango de hosts: 2001:0db8:85a3:0004:0000:0000:0000:0000 a 2001:0db8:85a3:0004:0003:ffff:ffff:ffff
Total available addresses: 2^58 ≈ 288,230,376,151,711,744 (approximately 288 billion)
With this example, we have subnetted the original 2001:0db8:85a3:0000::/48 network into four smaller subnets, each designed to meet the specific needs of each department or area of the building. Each subnet has enough space for the required hosts and allows for more efficient management of IPv6 addresses on the network.
Brief knowledge quiz
What do you think of this article?
Do you dare to evaluate your learned knowledge?
Recommended book for this article
IPv6 book with MikroTik, RouterOS v7
Study material for the MTCIPv6E Certification Course updated to RouterOS v7