IPv6 Address
Structure
To generate the host we can use:
To generate the whole ip, we can use:
We have first 64
bits for the network address and last 64
bit for the host address
Prefix
When writing an ipv6 prefix, you set all the hostbit to 0
. For example:
3ffe:1944:100:a::/64
In here the ::
represents 0000:0000:0000...
Rules
The following rules are applied to ipv6
- Any
0000
can be ommited to0
- Any groups of
0000:0000:0000:0000...
can be simplify to::
- In an IPv6 there can only be 1
::
Check if local ip
There are two types of ipv6 local ip:
Global unicast address
An address to identify a single device.
Link local (Local unicast address)
More here: Link local IP
Start with fe80::/10
. Can't be route (not forwarded by router). And can be used to communicate over a single network segment (within a same lan). Automatically created on Layer 3
interfaces running Ipv6 (i.e Router)
Used by the Router as the next hop addresses.
Unique local (ipv6 only)
Start with fc00::/8
. Can be route, main purpose is to use locally. Globally within the private scope
Multicast addressing
In ff00::/8
is used for Multicasting purpose. Allow the device to send packet to a subset of multicast group.
All node multicast (Multicast address)
There is no broad cast address. However there is an "all nodes multicast" address which is basically the same purpose.
- Link local:
ff02::1
- For local multicast to all nodes on the local link (subnet)
- All routers mutli cast address:
ff02::2
- Target all routers in the local link. The message is only intended for routers.
Special address
::
— unknown host
::1
— loop back address
Embedded IPv4 address
There are multiple technique that embed ipv4 address in ipv6 for compatibility. For example, we can have these following:
FE80::5EfE:10.23.1.5 (An ISATAP address)
::FFFF:10.23.1.5 and ::FFFF:0:10.23.1.5 (SIIT addresses)
FEC0:0:0:1::10.23.1.5 (TRT address)
In here the last 32 bits are IPv4