As you have already learned, IPv6 addresses are allocated to companies with a prefix. The host part of the address is always 64 bits and the standard prefix is usually 48 bits or /48. This leaves 16 bits free for network administrators to use for subnetting.
Because the same rules apply to both IPv4 and IPv6, as far as network addressing is concerned, you can have only one network per network segment. You can’t break the address and use some host bits on one part of the network and some on another.
If you look at the addressing in the chart below, the situation should make more sense:
|
Global Routing Prefix |
Subnet ID |
Interface ID |
|
48 bits or /48 |
16 bits (65,536 possible subnets) |
64 bits |
You need never concern yourself about running out of host bits per subnet because each subnet has over 18 quintillion hosts. It’s unlikley that any organisation would ever run out of subnets, but even if this were the case, another global routing prefix could easily be provided by the ISP.
Let’s say, for example, that you are allocated the global routing prefix 0:123:abc/48. This address is occupying three sections of a full IPv6 address and each section or quartet is 16 bits, so you have 48 bits used so far. The host portion will require 64 bits, leaving you 16 bits for allocation as subnets.
You would simply start counting up in hex from zero (zero is legal) and keep going. For your hosts you would do the same, unless you wanted to reserve the first few addresses for servers on the segment, for example.
Let me use a simpler prefix for our example – 2001:123:abc/48. The first subnet would be all zeros and, of course, the first host on each subnet would be all zeros, which is legal (since you don’t reserve the all 0s and all 1s addresses in IPv6). You would represent the all zeros host by using the abbreviated format of ::. Here are the first few subnets and host addresses:
|
Global Prefix |
Subnet |
First Address |
|
2001:123:abc |
0000 |
:: |
|
2001:123:abc |
0001 |
:: |
|
2001:123:abc |
0002 |
:: |
|
2001:123:abc |
0003 |
:: |
|
2001:123:abc |
0004 |
:: |
|
2001:123:abc |
0005 |
:: |
|
2001:123:abc |
0006 |
:: |
|
2001:123:abc |
0007 |
:: |
|
2001:123:abc |
0008 |
:: |
|
2001:123:abc |
0009 |
:: |
|
2001:123:abc |
000A |
:: |
|
2001:123:abc |
000B |
:: |
|
2001:123:abc |
000C |
:: |
|
2001:123:abc |
000D |
:: |
|
2001:123:abc |
000E |
:: |
|
2001:123:abc |
000F |
:: |
|
2001:123:abc |
0010 |
:: |
|
2001:123:abc |
0011 |
:: |
|
2001:123:abc |
0012 |
:: |
|
2001:123:abc |
0013 |
:: |
|
2001:123:abc |
0014 |
:: |
|
2001:123:abc |
0015 |
:: |
|
2001:123:abc |
0016 |
:: |
|
2001:123:abc |
0017 |
:: |
You have already noticed a difference from IPv4 addressing rules, I’m sure, in that you can use the all zeros subnet and the first subnet address is always all zeros. Looking at a simple network topology, you could allocate the subnets in the fashion below:
Figure 7.20 – Allocating IPv6 Subnets
Can it really be that easy? If you recall from the IPv4 subnetting section, it can become somewhat of a nightmare to figure that out, as well as having to work out how many hosts and subnets and remembering to exclude certain addresses. IPv6 subnetting is far easier. You may not be allocated a 48-bit prefix, it could be /56 for a home network or smaller, but the principle would be the same. You can also subnet off the bit boundary, but this would be most unusual and unfair of Cisco to expect you to go into that amount of detail in the short amount of time you have in the exam. Hopefully, the exam won’t be a mean attempt to catch you out, but you never know. Just in case, here is an example of a /56 prefix length address:
2001:123:abc:8bbc:1221:cc32:8bcc:4231/56
The prefix is 56 bits, which translates to 14 hex digits (14 x 4 = 56), so you know that the prefix will take you to the middle of a quartet. This is where you could make a mistake in the exam. You must zero hex bits 3 and 4 in the quartet before the prefix breaks:
2001:123:abc:8b00:0000:0000:0000:0000/56
I’ve underlined the quartet where the bit boundary is broken. In haste and due to time pressures in the exam, you could well miss this important step. Remember that you would also abbreviate this address (the first host on the first subnet) to:
2001:123:abc:8b00::/56
If they do try to catch you out in the exam, it would probably be an attempt to have you remove the trailing zeros from the quartet before the bit boundary is broken:
2001:123:abc:8b::/56
The above abbreviation is illegal.
You can steal bits from the host portion to use for subnets, but there should never be a reason to and it would break the ability to use many of the features IPv6 was invented to utilise, including stateless autoconfiguration.
