User:Vazhnov/Knowledge Base:IPv6 only

From Gentoo Wiki
Jump to:navigation Jump to:search
Even though this page is in the user namespace, corrections and additions are much appreciated! This is simply wiki policy, this page can be moved to the main wiki as soon as it achieves critical mass more.

With default settings from Gentoo handbook, it is easy to work with dualstack IPv4 + IPv6, if corresponding network settings are made.

This how-to describes how to work with IPv6 only, without IPv4 address on the network interface.


Internet connection

Check IPv6 connection works properly:

user $ping -c3 2600::
PING 2600::(2600::) 56 data bytes
64 bytes from 2600::: icmp_seq=1 ttl=50 time=135 ms
64 bytes from 2600::: icmp_seq=2 ttl=50 time=138 ms
64 bytes from 2600::: icmp_seq=3 ttl=50 time=135 ms

--- 2600:: ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2003ms
rtt min/avg/max/mdev = 135.092/136.223/138.327/1.489 ms

Check the router answer with ICMPv6 router Discovery tool (from net-misc/ndisc6):

user $rdisc6 eth0
Soliciting ff02::2 (ff02::2) on eth0...

Hop limit                 :           64 (      0x40)
Stateful address conf.    :          Yes
Stateful other conf.      :          Yes
Mobile home agent         :           No
Router preference         :       medium
Neighbor discovery proxy  :           No
Router lifetime           :         1800 (0x00000708) seconds
Reachable time            :  unspecified (0x00000000)
Retransmit time           :  unspecified (0x00000000)
 Source link-layer address: D8:58:D7:01:XX:XX
 MTU                      :         1480 bytes (valid)
 Prefix                   : 2001:XXX:XX:XXX::/64
  On-link                 :          Yes
  Autonomous address conf.:          Yes
  Valid time              :     infinite (0xffffffff)
  Pref. time              :     infinite (0xffffffff)
 Prefix                   : fd84:5168:xxxx::/64
  On-link                 :          Yes
  Autonomous address conf.:          Yes
  Valid time              :     infinite (0xffffffff)
  Pref. time              :     infinite (0xffffffff)
 Route                    : fd84:5168:xxxx::/48
  Route preference        :       medium
  Route lifetime          :         1800 (0x00000708) seconds
 Recursive DNS server     : fd84:5168:xxxx::1
  DNS server lifetime     :         1800 (0x00000708) seconds
 from fe80::da58:d7ff:xxxx:xxxx

Gentoo mirrors

Check if mirror(s) are accessible by IPv6.


user $portageq gentoo_mirrors

Check: both

HTTP/1.1 200 OK
Server: nginx/1.6.2
Date: Sat, 01 Jan 2022 19:42:12 GMT
Content-Type: text/html
Connection: keep-alive
HTTP/1.1 200 OK
Date: Sat, 01 Jan 2022 19:44:19 GMT
Content-Type: text/html;charset=UTF-8
Connection: keep-alive
alt-svc: quic=""; ma=2592000; v="44,43,39"

Get rsync mirrors:

user $portageq repositories_configuration /|grep 'sync-uri'
sync-uri = rsync://
user $rsync -6

  IPv6:    2a03:b0c0:3:d0::c3:f001 

gentoo-portage 	Gentoo Linux Portage tree mirror

Network interface

no GUI


FILE /etc/conf.d/net


NetworkManager settings:

  • IPv4 settings tab: method = disabled,
  • IPv6 settings tab: method = automatic.

DNS settings

no GUI

net-misc/ndisc6 is needed to update DNS settings in /etc/resolv.conf by information from the router via RDNSS (router advertisement DNS).


NetworkManager automatically fill /etc/resolv.conf with correct information.


If you use .local addresses in local network, then you have to adjust Zeroconf settings.

By some reason, Zeroconf client in Linux is configured to be IPv4-only by default (mdns4_minimal in /etc/nsswitch.conf).

Check how it works before change, you need some real hostname of device in local network:

user $getent hosts some-real-hostname.local

Replace IPv4-only mdns4_minimal by IPv6-only mdns6_minimal:

root #sed -i -- s/mdns4_minimal/mdns6_minimal/g /etc/nsswitch.conf
Don't use dualstack mdns_minimal parameter in /etc/nsswitch.conf because it causes some programs (like OpenSSH client) to wait for seconds for IPv4 resolution, and then start IPv6 resolution. See Please update/clarify/justify recommendations for IPv4-only vs. any-protocol and libnss-mdns: Replace mdns4* by mdns* in /etc/nsswitch.conf for more details.

No need to restart anything. Run the test again:

user $getent hosts some-real-hostname.local

Also, check configs of all devices in local network:

FILE /etc/avahi/avahi-daemon.conf


Reboot the OS?

root #shutdown -r now

NAT64 and DNS64

These services are needed to reach IPv4-only resources from IPv6-only workstation.

More information: Wikipedia:NAT64, Wikipedia:IPv6 transition mechanism#DNS64.

It is possible to setup your own NAT64 and DNS64 stack (if your router has public IPv4 address?).

Also, it is possible to use some public service, for example :

FILE /etc/resolv.conf
nameserver 2001:67c:2b0::4
nameserver 2001:67c:2b0::6

How to check

Check OS updating work.

Check web-sites in the web-browser.

Check IM software works.

Known issues

NFS shares mount from fstab

Compared to config_eth0="auto" or config_eth0="dhcp", the functionality of auto-mounting network file systems will be lost (netmount service of Nfs-utils?).

dhclient overwrites resolv.conf

If you run

root #dhclient

to receive IPv4 once, configuration /etc/resolv.conf will be overwritten.