1. IPV6 Address text representation
Different from IPV4, IPV6 uses Hex format to represent. An IPv6 address is split into 8 elements each of which is 16 bits represented by 4 Hex number.
XXXX : XXXX : XXXX : XXXX : XXXX : XXXX : XXXX : XXXX
EXAMPLE:
FC00:0000:0000:005A:00BB:0000:0000: 9C44
For each element, the leading 0 can be omitted. So the above address can be rewritten as below.
FC00: 0: 0: 5A: BB: 0: 0: 9C44
Furthermore, the first group of consecutive "0" elements can be omitted. So the above address can be rewritten as below.
FC00: : 5A: BB: 0: 0: 9C44
Be careful here, as only the first group of 0 elements can be omitted. If all zero groups are omitted, it will not be distinguishable.
Another useful expression of IPV6 address is to let the last 32 bits represented as IPV4.
FC00::5A:BB:0:0.0.156.68
Actually, the above method is mostly used to translate an IPv4 to IPv6. e.g.
192.168.0.1 ----> ::192.168.0.1 --->::C0A1:1
2. Specail IPV6 addresses
2.1 Private address
FC00::/7 is used as private addresses which are not routed by internet routers, similar to IPV4's 192.168.0.0/16
2.2 Link-local address
FE80::/10 is used as link-local addresses similar to IPV4's 169.254.0.0/16
2.3 loop address
::1 is used as a loop address similar to IPv4's 127.0.0.1
3. IPV6 commands
- ping6 or "ping -6"
- ip -6
- ss -6
- mmcli to configure IPv6 address
4. Configure IPV6 address via "nmcli"
nmcli connection modify eth0 ipv6.addresses "::192.168.100.236/64"
nmcli connection modify eth0 ipv6.method manual
nmcli connection down eth0
nmcli connection up eth0
ip -6 a
ping6 ::192.168.100.236
4.Useful links
- RFC5952, https://tools.ietf.org/html/rfc5952
No comments:
Post a Comment