IPv6 addresses are 128 bits long and are represented in hexadecimal format. They are typically written as eight groups of four hexadecimal digits separated by colons (:). For example:
``` 2001:0db8:85a3:0000:0000:8a2e:0370:7334 ```
While the full representation can include leading zeros in each group, IPv6 allows for abbreviation to make the addresses more concise. This abbreviation is done by:
1. Omitting leading zeros within each group. 2. Consolidating consecutive groups of zeros into a double colon (::) once within an address, provided it's done without altering the value of the address.
For example, the address above can be abbreviated as:
``` 2001:db8:85a3::8a2e:370:7334 ```
Here, the leading zeros within groups are removed, and the consecutive groups of zeros are replaced by a double colon (::).
It's important to note that IPv6 addresses are case-insensitive, so uppercase and lowercase letters can be used interchangeably. However, the standard convention is to use lowercase letters in IPv6 addresses.
Additionally, IPv6 addresses can include the special link-local addresses, which always start with the fe80::/10 prefix. An example of a link-local address is:
``` fe80::1 ```
IPv6 addresses may also include zone indices, which are used to specify the interface on which a packet should be transmitted when multiple interfaces are configured on the same link. Zone indices are appended to the address with a percent sign (%), followed by the interface identifier. For example:
``` fe80::1%eth0 ```
Here, “eth0” is the interface identifier.
Overall, the format and notation of IPv6 addresses make them more concise and easier to read compared to IPv4 addresses, which can help in managing and configuring networks with the larger address space provided by IPv6.