|
IPv6 Address Basics
IPv6 works the same as IPv4 for purposes of IP assignment, routing, and more. But rather than use dotted decimal notation as we do with IPv4, this has been changed to a slightly different notation to prevent confusion. This notation swaps colons (:) for dots. It also changes from decimal to hexadecimal notation (to keep the numbers manageable), and just plain has more of them, specifically, it has 8 groups of them.
An IPv6 address has 8 "hextets" rather than 4 octets. This means our colon separated numbers, instead of running from 0-255 (00-FF in hex), now run from 0000-FFFF (0-65535 in decimal). So an IPv6 address looks something like this: 2001:05c0:9168:0000:0000:0000:0000:0001/128.
Now a couple of rules:
1. leading zeros may be dropped, so 05c0 becomes 5c0, and 0001 becomes 1
2. one time, and one time only, you may drop contiguous zeros completely and just use ::
Using the rules above, the IP 2001:05c0:9168:0000:0000:0000:0000:0001 becomes 2001:05c0:9168::1
Now we can read and write IPv6 IPs. But what is that /128 on the end above? Well, when we describe an IPv4 IP and network, we use a netmask to define the network. IPv6 has decided, rather than use the old 255.255.255.0 notation, that it's better just to use /# notation. So our netmask would be 128 to describe something similar to /32 (255.255.255.255) or one host. Note that `expr 16 \* 8` gives us 128.
Private IPv6 address range
Here is a unique private IPv6 address range generated just for you (refresh page to get another one):
Prefix/L: fd
Global ID: bf28770ea9
Subnet ID: 4645
Combined/CID: fdbf:2877:0ea9:4645::/64
IPv6 addresses: fdbf:2877:0ea9:4645:xxxx:xxxx:xxxx:xxxx
If you have multiple locations/sites/networks, you should assign each one a different "Subnet ID", but use the same "Global" ID for all of them.
The IPv6 address space is so huge (2128) that everyone should be able to get a public IP address for every device they will ever own. So theoretically it shouldn't be necessary to have private IPv6 addresses like the 192.168.x.x and 10.x.x.x addresses in IPv4.
However until you can actually get an IPv6 address range from your ISP, you may want to use "private" addresses for internal networks and testing etc.
In IPv6 there is a special "Unique Unicast" IP range of fc00::/7 which should be used for this as per RFC4193.
The official definition looks like this:
| 7 bits |1| 40 bits | 16 bits | 64 bits |
+--------+-+------------+-----------+----------------------------+
| Prefix |L| Global ID | Subnet ID | Interface ID |
+--------+-+------------+-----------+----------------------------+
In practice such address will always start with "fd" because the 8th (L) bit must be one.
The "Global ID" and "Subnet ID" must be random to ensure uniqueness (which is what this page does).
You are free to assign addresses from the rest (Interface ID).
Please note:
A former standard proposed the use of so-called "site-local" addresses in the fec0::/10 range.
This has been deprecated (see RFC3879) and should no longer be used. |