Boot up ipv6 in Linux

Published: by Creative Commons Licence

Time to read: Less than 1 minute

To additionally set up IPv6 after starting an IPv4 interface, you can create a skipt, e.g.

/etc/network/if-up.d/ipv6

The script contains all addresses you want to assign and set the routes.

# IP1
ifconfig eth0 inet6 add fe80::2/10
# IP2
ifconfig eth0 inet6 add fe80::3/10

# Routing
ip -6 route add fe80::2 dev eth0
ip -6 route add fe80::3 dev eth0
ip -6 route add default via fe80::1 dev eth0

You can check the created routes with

ip -6 route show