IPv6 addresses are 128 bits long;
IPv6 chose a hexadecimal format with a colon as separator after each block of 16 bits(2 bytes). That means an IPv6 address is devided into 8 blocks and each block has 16 bits(2 bytes):
1 2 3
- For simplifications, leading zeros of each 16 bit block can be omitted:
- One sequence of 16 bit blocks containing only zeroes can be replaced with “::“. But not more than one at a time, otherwise it is no longer a unique representation.
- The biggest reduction is seen by the IPv6 localhost address:
- The ”Base85 coded” IPv6 presentation:
- Netmask and subnetting of IPv6:
The host bits in IPv6 take up at least the lower 64 bits (and maybe more), so the netmask is always <= 64 bits. The only exception is the loopback address ::1 which has a netmask of /128. For a LAN, usually just use /64 as the netmask. The ISP may assign a /64, /56 or /48 address block to a site.
That means the netmask number is bigger, the maximum hosts number in the subnet is lesser, and vise versa.
Why there is no IPv5? Here is the answer.
Some commands with using IPv6: