For IPv6, the octets are usually represented as hexadecimal numbers, whereas IPv4 uses decimal. So, an extremely simplified method is to first convert each of the decimal octets (8 bits) to hexadecimal:
129 becomes 81
130 becomes 82
100 becomes 64
11 becomes 0B
Then concatenate the results with a colon between the first two and the last two octets:
8182:640B
And add ::FFFF:
to the front of the string:
::FFFF:8182:640B
There are however a few different formats for an IPv6 address. I left these out above as you can see they all include some type of decimal-hexadecimal conversion and some simple string formatting. Other alternatives include:
- 6 to 4 address:
- 2002:8182:640B:0:0:0:0:0
- 2002:8182:640B::
- IPv4-mapped address:
- 0:0:0:0:0:FFFF:129.130.100.11
- ::FFFF:129.130.100.11
- ::FFFF:8182:640B
- IPv4-compatibility address:
- 0:0:0:0:0:0:129.130.100.11
- ::129.130.100.11
- ::8182:640B