IPv6 static config

Hey guys,

I've got a problem which I'm stuck at a bit..

I have an IPv6 /64 range set on my linode and tried setting that IPv6 as static config but for some reason it fails.

I'm running Debian..

This is the /etc/network/interfaces file:

auto lo
iface lo inet loopback

source /etc/network/interfaces.d/*

auto eth0

allow-hotplug eth0

iface eth0 inet static
address 178.79.163.135/24
gateway 178.79.163.1
up ip addr add 192.168.195.151/17 dev eth0 label eth0:1
down ip addr del 192.168.195.151/17 dev eth0 label eth0:1

IPv6 gateway and primary address.

iface eth0 inet6 static
address 2a01:7e00::f03c:91ff:fe93:84c3/64
gateway fe80::1

IPv6 secondary address (in assigned block).

iface eth0 inet6 static
address 2a01:7e00:e000:0301::1/64

The result is if I restart linode via linode manager, everything dies.. Emails do no longer work, web does not work and I of course cannot login via SSH anymore.. I have to enable network helper so that it resets this file and then it works.

What on earth am I missing here?

2 Replies

Hi @lessthanweb - The first thing that stands out to me is these lines:

up ip addr add 192.168.195.151/17 dev eth0 label eth0:1
down ip addr del 192.168.195.151/17 dev eth0 label eth0:1

Try removing them and see if that'll work for you. If not, you don't have to reboot with network helper just log in via Lish:

https://www.linode.com/docs/networking/using-the-linode-shell-lish/

We have a guide on static IP configuration here that may help for reference:

https://www.linode.com/docs/guides/linux-static-ip-configuration/#debian

@mjones Sorry for slow response..

I've removed the two lines and it's the same thing.. After reboot I cannot login via SSH anymore or login to email and so on..

I can login via Lish..

After reboot this is how things are:

/etc/network/interfaces:

auto lo
iface lo inet loopback

source /etc/network/interfaces.d/*

auto eth0

allow-hotplug eth0

iface eth0 inet static
address 178.79.163.135/24
gateway 178.79.163.1

IPv6 gateway and primary address.

iface eth0 inet6 static
address 2a01:7e00::f03c:91ff:fe93:84c3/64
gateway fe80::1

IPv6 secondary address (in assigned block).

iface eth0 inet6 static
address 2a01:7e00:e000:0301::1/64

After reboot if I execute the following commands, this is what the output is..

ip addr | grep inet

inet 127.0.0.1/8 scope host lo
inet6 ::1/128 scope host

ip -6 r

::1 dev lo proto kernel metric 256 pref medium
default via fe80::1 dev eth0 metric 1024 onlink pref medium

I have no idea what else to do or look at..

I've followed the guides but this is the result..

Any help from someone please..

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct