A. Since IPv6 address's are 128-bit and hence four times longer than an IPv4 address, addresses are expressed as:
where each X is a 4-digit hexadecimal integer (16 bits) and each digit is 4 bits and so can be between 0 and F (F is 15 in hexadecimal) and so examples of valid addresses would be
Notice in the second address you can leave off any leading zeros, but you must have at least one numeral in each part. For example :0800: can be written as :800:.
Obviously you may have a large sequence of zero's in the address and so it is possible to have a single gap by writing :: which will fill the gap with zero's, for example
may be written as
0:0:0:0:0:0:0:1 the loopback address (the same as 127.0.0.1 in IPv4) can be written as ::1.
A third format is available, when dealing with a mixed environment of IPv4 and IPv6 nodes is
where the 'x's are the hexadecimal values of the six high-order 16-bit pieces of the address, and the 'd's are the decimal values of the four low-order 8-bit pieces of the address (standard IPv4 representation). Examples:
or in compressed form:
The subnet mask is now replaced by a number appended to the network address specifying the number of bits making up the network part (CIDR notation), e.g. ipv6-address/prefix-length:
Means the first 60 bits make up the network part of the address.
When writing both a node address and a prefix of that node address (e.g., the node's subnet prefix), the two can combined as follows:
the node address 11AC:0:0:CA20:123:4567:89AB:CDEF
and its subnet number 11AC:0:0:CA20::/60
can be abbreviated as 11AC:0:0:CA20:123:4567:89AB:CDEF/60