IPv6: Difference between revisions
No edit summary |
No edit summary |
||
| (12 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
[[Category:networking]] | |||
[[Category:Linux/Unix]] | |||
Testing your IPv6 connection: | |||
;https://ifconfig.co/ | |||
:Including CLI-support | |||
;https://ready.chair6.net/ | |||
:Nice as simple interface | |||
;https://test-ipv6.com/ | |||
Testing website security and connectivity | |||
;https://internet.nl | |||
Below seems to be broken December 2025 | |||
;https://ipv6-test.com/ | ;https://ipv6-test.com/ | ||
:Check your IPv6 configuration | :Check your IPv6 configuration | ||
;http://ipv6-test.com/validate.php | |||
:Check IPv6 support for websites | |||
| Line 18: | Line 30: | ||
<td>FC00::/7</td> | <td>FC00::/7</td> | ||
<td>Unique Local Unicast</td> | <td>Unique Local Unicast</td> | ||
<td>Local Unicast. For intranets, not routed, like IPv4 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16</td> | <td>Local Unicast. For intranets, not routed, like IPv4 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16. Currently FC00::/8 is undefined, only FD00::/8 is used</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td>FE80::/10</td> | <td>FE80::/10</td> | ||
<td>Link Local Unicast</td> | <td>Link Local Unicast</td> | ||
<td>Link Identification, addresses | <td>Link Identification, addresses can be based on the interface MAC address</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
| Line 33: | Line 45: | ||
</table> | </table> | ||
==Local Unicast (ULA)== | |||
Users were advised to generate a 40 bits Global ID for their intranets but it is unclear if there a valid use case for it[[https://en.wikipedia.org/wiki/Unique_local_address]]. It is advised to calculate the Global Id using a specified procedure to maximize the probability of an unique address. | |||
<strong>[http://tools.ietf.org/html/rfc4193#section-3.2 Local Unicast Address-format]:</strong> | |||
[http://tools.ietf.org/html/rfc4193#section-3.2 Local Unicast Address-format] | |||
<table> | <table> | ||
<tr> | <tr> | ||
| Line 52: | Line 63: | ||
Locally assigned</td> | Locally assigned</td> | ||
<td>40 bits<br /> | <td>40 bits<br /> | ||
User defined</td> | |||
<td>16 bits<br /> | <td>16 bits<br /> | ||
Local subnet</td> | Local subnet</td> | ||
<td>64 bits<br /> | <td>64 bits<br /> | ||
Locally assigned or by dhcp</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
| Line 67: | Line 78: | ||
</table> | </table> | ||
The Interface ID is in the so-called ‘Modified EUI-64 Format’. How to go from a MAC address to Modified EUI-64 format is described in appendix A of [href="http://tools.ietf.org/html/rfc4291 RFC 4291]. | The Interface ID is in the so-called ‘Modified EUI-64 Format’. How to go from a MAC address to Modified EUI-64 format is described in appendix A of [href="http://tools.ietf.org/html/rfc4291 RFC 4291]. When using ULA prefixes you must have Routing Advertising (radvd) to tell the network it should configure addresses and routes for it | ||
==Route Advertisement== | |||
Provides information for ‘Stateless Autoconfiguration’ to the local nodes. | |||
IPv6 systems can send a Route Solicitation (RS) messages. These are answered by a Route Advertisement (RA) message that tells with prefixes exist and, when needed where the gateway for that prefix is. The client then can configure IPv6 addresses and routes. | |||
On linux systems there is the radvd deamon to provide RA. | |||
To advertise there is a ULA prefix in the network put this in /etc/radvd.conf | |||
<syntaxhighlight lang=text> | |||
interface eth0 | |||
{ | |||
AdvSendAdvert on; | |||
AdvDefaultLifetime 0; | |||
prefix fdxx:xx:xx::/48 | |||
{ | |||
}; | |||
}; | |||
</syntaxhighlight> | |||
==Disable IPv6 on a system== | ==Disable IPv6 on a system== | ||
| Line 85: | Line 113: | ||
;cat /proc/sys/net/ipv6/conf/all/disable_ipv6 | ;cat /proc/sys/net/ipv6/conf/all/disable_ipv6 | ||
:Check if IPv6 has been disabled | :Check if IPv6 has been disabled: | ||
:0 => IPv6 is not disabled | |||
:1 => IPv6 is disabled | |||
==Check IPv6 autoconfiguration== | |||
;<code>cat /proc/sys/net/ipv6/conf/eth0/autoconf</code> | |||
:0 => autoconf is disabled | |||
:1 => autoconf is enabled | |||
==Misc commands== | |||
;/sbin/ip -6 addr del <ipv6address>/<prefixlength> dev <interface> | |||
:Remove ipv6 addres from an interface | |||
Latest revision as of 20:32, 4 January 2026
Testing your IPv6 connection:
- https://ifconfig.co/
- Including CLI-support
- https://ready.chair6.net/
- Nice as simple interface
- https://test-ipv6.com/
Testing website security and connectivity
Below seems to be broken December 2025
- https://ipv6-test.com/
- Check your IPv6 configuration
- http://ipv6-test.com/validate.php
- Check IPv6 support for websites
Address Assignment
The IPv6 address assignment is handled by IANA. Most important prefixes are:
| 2000::/3 | Global Unicast | Global scope |
| FC00::/7 | Unique Local Unicast | Local Unicast. For intranets, not routed, like IPv4 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16. Currently FC00::/8 is undefined, only FD00::/8 is used |
| FE80::/10 | Link Local Unicast | Link Identification, addresses can be based on the interface MAC address |
| FF00::/8 | Multicast |
Local Unicast (ULA)
Users were advised to generate a 40 bits Global ID for their intranets but it is unclear if there a valid use case for it[[1]]. It is advised to calculate the Global Id using a specified procedure to maximize the probability of an unique address.
| Prefix | L | Global ID | Subnet ID | Interface ID |
|---|---|---|---|---|
| 7 bits FC00::/7 |
1 bit Locally assigned |
40 bits User defined |
16 bits Local subnet |
64 bits Locally assigned or by dhcp |
| 1111110 | 1 |
The Interface ID is in the so-called ‘Modified EUI-64 Format’. How to go from a MAC address to Modified EUI-64 format is described in appendix A of [href="http://tools.ietf.org/html/rfc4291 RFC 4291]. When using ULA prefixes you must have Routing Advertising (radvd) to tell the network it should configure addresses and routes for it
Route Advertisement
Provides information for ‘Stateless Autoconfiguration’ to the local nodes.
IPv6 systems can send a Route Solicitation (RS) messages. These are answered by a Route Advertisement (RA) message that tells with prefixes exist and, when needed where the gateway for that prefix is. The client then can configure IPv6 addresses and routes.
On linux systems there is the radvd deamon to provide RA.
To advertise there is a ULA prefix in the network put this in /etc/radvd.conf
interface eth0
{
AdvSendAdvert on;
AdvDefaultLifetime 0;
prefix fdxx:xx:xx::/48
{
};
};
Disable IPv6 on a system
At the end of /etc/sysctl.conf add:
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1
- sysctl -p
- Force reload of the kernel parameters as in /etc/sysctl.conf
- cat /proc/sys/net/ipv6/conf/all/disable_ipv6
- Check if IPv6 has been disabled:
- 0 => IPv6 is not disabled
- 1 => IPv6 is disabled
Check IPv6 autoconfiguration
cat /proc/sys/net/ipv6/conf/eth0/autoconf- 0 => autoconf is disabled
- 1 => autoconf is enabled
Misc commands
- /sbin/ip -6 addr del <ipv6address>/<prefixlength> dev <interface>
- Remove ipv6 addres from an interface