06-02-2018 11:39 AM - edited 03-05-2019 10:32 AM
Your Internet Service Provider sells you the IPv6 network of 2001:1111:2222::/48. Your company has a total of one hundred (100) broadcast domains so you decide to divide this network into IPv6 subnets using the technique of same-length subnet masking.
Your plan is to start with Subnet-Zero as your first subnet, and to have as few networking bits as possible per subnet so you can maximize your quantity of hosts-per-subnet.
Given above-mentioned design, which of the IPv6 networks below represents the twenty-eighth (28th) IPv6 subnet?
Solved! Go to Solution.
06-02-2018 12:22 PM
Hello,
Looks like some test question :)
Either way, for 100 networks, you need to borrow additional 7 bits, extending the prefix length from /48 to /48+7 = /55. This will actually create 128 new subnets, out of which 28 won't be utilized momentarily.
Now, let's see what happens with this extended prefix. The 2001:1111:2222 part is already 48 bits long and it cannot be changed. From the next 2-byte field "after" the 2222, we will consume additional 7 bits, so it will be, written out in bits:
SSSS SSSH HHHH HHHH
where 'S' stands for a subnet bit, and 'H' stands for a host bit. The red 'S' bits are the ones we have borrowed into the subnet part, and whenever they change, they create a new subnet. So the actual combinations are, with the host bits zeroed out (since not relevant for an address prefix):
0000 0000 0000 0000 = 0x0000 => 2001:1111:2222:0000::/55 (1st)
0000 0010 0000 0000 = 0x0200 => 2001:1111:2222:0200::/55 (2nd)
0000 0100 0000 0000 = 0x0400 => 2001:1111:2222:0400::/55 (3rd)
0000 0110 0000 0000 = 0x0600 => 2001:1111:2222:0600::/55 (4th)
0000 1000 0000 0000 = 0x0800 => 2001:1111:2222:0800::/55 (5th)
... and so on.
Note that the because we "mask out" the lowest bit in the 7th byte of the IPv6 address (that is the one with the red S bits), each next subnet comes in a multiple of 2 in the value of this byte. Since all zeros is the first subnet, the 28th subnet is 27x2 = 54 = 0x36, so 2001:1111:2222:3600::/55.
Do note, however, that this kind of subnetting is possible but not used with IPv6. Typically, you would just extend the prefix length from /48 to /64, yielding 65536 possible subnets, each one of them still large beyond imagination (2^64 hosts, which is 4.2 billion times larger than the whole IPv4 internet), and the numbering would be much simpler:
2001:1111:2222:0000::/64 for the 1st subnet
2001:1111:2222:0001::/64 for the 2nd subnet
2001:1111:2222:0002::/64 for the 3rd subnet
...
2001:1111:2222:001b::/64 for the 28th subnet (0x1b = 27 since we're numbering from 0)
...
Also, the IPv6 addressing architecture requires that the host part is 64 bits long; using a prefix length of /55 would violate this requirement.
Feel welcome to ask further!
Best regards,
Peter
06-02-2018 12:22 PM
Hello,
Looks like some test question :)
Either way, for 100 networks, you need to borrow additional 7 bits, extending the prefix length from /48 to /48+7 = /55. This will actually create 128 new subnets, out of which 28 won't be utilized momentarily.
Now, let's see what happens with this extended prefix. The 2001:1111:2222 part is already 48 bits long and it cannot be changed. From the next 2-byte field "after" the 2222, we will consume additional 7 bits, so it will be, written out in bits:
SSSS SSSH HHHH HHHH
where 'S' stands for a subnet bit, and 'H' stands for a host bit. The red 'S' bits are the ones we have borrowed into the subnet part, and whenever they change, they create a new subnet. So the actual combinations are, with the host bits zeroed out (since not relevant for an address prefix):
0000 0000 0000 0000 = 0x0000 => 2001:1111:2222:0000::/55 (1st)
0000 0010 0000 0000 = 0x0200 => 2001:1111:2222:0200::/55 (2nd)
0000 0100 0000 0000 = 0x0400 => 2001:1111:2222:0400::/55 (3rd)
0000 0110 0000 0000 = 0x0600 => 2001:1111:2222:0600::/55 (4th)
0000 1000 0000 0000 = 0x0800 => 2001:1111:2222:0800::/55 (5th)
... and so on.
Note that the because we "mask out" the lowest bit in the 7th byte of the IPv6 address (that is the one with the red S bits), each next subnet comes in a multiple of 2 in the value of this byte. Since all zeros is the first subnet, the 28th subnet is 27x2 = 54 = 0x36, so 2001:1111:2222:3600::/55.
Do note, however, that this kind of subnetting is possible but not used with IPv6. Typically, you would just extend the prefix length from /48 to /64, yielding 65536 possible subnets, each one of them still large beyond imagination (2^64 hosts, which is 4.2 billion times larger than the whole IPv4 internet), and the numbering would be much simpler:
2001:1111:2222:0000::/64 for the 1st subnet
2001:1111:2222:0001::/64 for the 2nd subnet
2001:1111:2222:0002::/64 for the 3rd subnet
...
2001:1111:2222:001b::/64 for the 28th subnet (0x1b = 27 since we're numbering from 0)
...
Also, the IPv6 addressing architecture requires that the host part is 64 bits long; using a prefix length of /55 would violate this requirement.
Feel welcome to ask further!
Best regards,
Peter
06-03-2018 02:28 PM
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide