Setup IPv6

tested on Slackware Linux current (Sep 2020)

SLAAC

All you need is your kernel to listen to RAs

Accept Router Advertisements (default is 1)

0 -- Do not accept Router Advertisements
1 -- Accept Router Advertisements if forwarding is disabled
2 -- Overrule forwarding behaviour. Accept Router Advertisements even if forwarding is enabled

and eventually enforce them over forwarding (assuming xenbr0 is your public facing interface)

    echo 2 > /proc/sys/net/ipv6/conf/xenbr0/accept_ra

check

    cat /proc/sys/net/ipv6/conf/*/accept_ra
    cat /proc/sys/net/ipv6/conf/*/autoconf

DHCPv6

You still need SLAAC to be enabled here (see right above).

Then use a good DHCP client to tell your ISP about your DUID

vi /etc/dhclient6.conf

interface "xenbr0" {
    send dhcp6.client-id YOUR-DUID;
        #request;
}

Ready to go

enable SLAAC at boot-time

vi /etc/rc.d/rc.inet1

    echo IPv6 SLAAC
    echo 2 > /proc/sys/net/ipv6/conf/xenbr0/accept_ra

enable SLAAC + static IP at boot-time

vi /etc/rc.d/rc.inet1

    echo IPv6 SLAAC
    echo 2 > /proc/sys/net/ipv6/conf/xenbr0/accept_ra

    echo IPv6
/sbin/ifconfig xenbr0 inet6 add x::x/56 up

    echo -n DUID...
    /sbin/dhclient -cf /etc/dhclient6.conf -6 -P xenbr0 -v && echo done || echo FAIL

status

ifconfig
ps auxfww | grep dhclient

stop

ip addr del x::x/56 dev xenbr0
/sbin/dhclient -x -pf /var/run/dhclient6.pid
pkill dhclient

Acceptance

who’s your router

#netstat -rn --inet6 | grep ^::/0
ip -6 neigh show
ping6 ...

grab some advertisements from the network

tcpdump -vvvv -ttt -i xenbr0 icmp6 and 'ip6[40] = 134'

everything is good?

cat /etc/resolv.conf
ping6 2001:bc8:401::3
ping6 2001:bc8:1::16
ping6 ipv6.google.com
traceroute6 ipv6.google.com
curl -si www.kame.net | grep /img/kame

Become a router

see IPv6 RA router

Additional notes

Other means of enforcing RA over forwarding

    #sysctl -w net.ipv6.conf.eth0.accept_ra=2
    #echo net.ipv6.conf.eth0.accept_ra = 2 >> /etc/sysctl.conf
    #sysctl -p

To entirely disable IPv6 at boot time

disable_ipv6=1

and to disable IPv6 while the system is running

/sbin/sysctl -w net.ipv6.conf.all.disable_ipv6=1
/sbin/sysctl -w net.ipv6.conf.default.disable_ipv6=1

Resources

DebianIPv6 https://wiki.debian.org/DebianIPv6

For clients https://wiki.archlinux.org/index.php/IPv6#For_clients

6.2. Add an IPv6 address https://mirrors.deepspace6.net/Linux+IPv6-HOWTO/x1055.html

6.2. Add an IPv6 address https://linux.die.net/HOWTO/Linux+IPv6-HOWTO/x1054.html

dedibox

IPV6 https://documentation.online.net/en/dedicated-server/network/ipv6/start

PRÉFIXE IPV6 /48 https://documentation.online.net/fr/dedicated-server/network/ipv6/prefix

IPV6 SLAAC https://documentation.online.net/fr/dedicated-server/network/ipv6/slaac

IPV6 CONFIGURATION USING NETWORKD https://documentation.online.net/en/dedicated-server/network/ipv6/networkd

IPV6 sur une dedibox d'Online.net en Debian Jessie https://blog.cpy.re/ipv6-sur-son-serveur-debian-jessie-sur-une-dedibox-donline-net/

CONFIGURER L’IPV6 CHEZ ONLINE.NET https://www.abyssproject.net/2016/08/configurer-ipv6-chez-online-net/

How to setup IPV6 on Online.net Dedibox with DHCPv6 Client https://germanystudy.net/how-to-setup-ipv6-on-online-net-dedibox-with-dhcpv6-client/

Ipv6 online.net et routage http://wiki.csnu.org/index.php/Ipv6_online.net_et_routage

slaac

Stateless address autoconfiguration (SLAAC) https://en.wikipedia.org/wiki/IPv6#Stateless_address_autoconfiguration_(SLAAC)

Stateless address autoconfiguration https://en.wikipedia.org/wiki/IPv6_address#Stateless_address_autoconfiguration

/proc/sys/net/ipv4/* Variables https://www.kernel.org/doc/Documentation/networking/ip-sysctl.txt

accept_ra https://sysctl-explorer.net/net/ipv6/accept_ra/

autoconf https://sysctl-explorer.net/net/ipv6/autoconf/

dhcpv6

DHCP and SLAAC on IPv6 Networks https://www.hpc.mil/program-areas/networking-overview/2013-10-03-17-24-38/ipv6-knowledge-base-infrastructure/dhcp-on-ipv6-networks

disable ipv6

How to disable IPv6 on Linux https://www.techrepublic.com/article/how-to-disable-ipv6-on-linux/

How to Disable IPv6 on Ubuntu Linux https://itsfoss.com/disable-ipv6-ubuntu-linux/

How to disable IPv6 on CentOS / RHEL 7 https://www.thegeekdiary.com/centos-rhel-7-how-to-disable-ipv6/

How To Disable IPv6 on Linux/Ubuntu? https://support.purevpn.com/how-to-disable-ipv6-linuxubuntu

troubleshooting

PROBLEM: IPv6 autoconf/accept_ra default values https://patchwork.ozlabs.org/project/netdev/patch/alpine.LNX.2.00.0903180200590.10453@firda.kolla.no/

\2. Enabling and Disabling IPv6 http://www.telecom.otago.ac.nz/tele301/student_html/v6bootcamp-enable-disable.html

The kernel’s command-line parameters https://www.kernel.org/doc/html/latest/admin-guide/kernel-parameters.html

acceptance

LookingGlass form http://lg.mtu.ru/cgi-bin/lg_img.cgi

traviscross / mtr https://github.com/traviscross/mtr

IPv6 test https://ipv6-test.com/

netbsd (untested)

IPv6 Networking FAQ https://www.netbsd.org/docs/network/ipv6/

IPv6 configuration in NetBSD http://jornane.me/doc/netbsd-ipv6/

IPv6 in NetBSD UNIX https://www.hpc.mil/program-areas/networking-overview/2013-10-03-17-24-38/ipv6-knowledge-base-ip-transport/ipv6-in-netbsd-unix


GUIDES | LECTURES | BENCHMARKS | SMTP HEALTH