docs / linux / debian-ipv6
debian + ipv6
1. Disable cloud-init networking (if not already)
Create the disable file exactly as their own header suggests:
textcopy
sudo mkdir -p /etc/cloud/cloud.cfg.d
cat << 'EOF' | sudo tee /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg
network: {config: disabled}
EOFThis tells cloud-init to stop reconfiguring network on boot so only your ifupdown files control eth0.
2. Build one canonical eth0 config
We’ll move away from 50-cloud-init and 99-additional-ip.yaml and put everything into a single file, which removes the “file exists” duplication and ensures your extra IPs always apply.
Replace /etc/network/interfaces with:
auto lo iface lo inet loopback source /etc/network/interfaces.d/*.cfg
Create a new file /etc/network/interfaces.d/60-eth0.cfg:
textcopy
auto eth0
iface eth0 inet static
address 2.8.1.157/24
gateway 2.8.1.1
iface eth0 inet6 static
address 2642:aaaa:bbbb::da/128
gateway 2642:aaaa:bbbb::1
up ip -6 addr add 2702:aaaa:13d9:cab9:ca38::1/64 dev eth0
up ip -6 addr add 2702:aaaa:13d9:ec72:7c::1/64 dev eth0
down ip -6 addr del 2702:aaaa:13d9:cab9:ca38::1/64 dev eth0 || true
down ip -6 addr del 2702:aaaa:13d9:ec72:7c::1/64 dev eth0 || trueTrim or change those /64s/hosts as needed; the structure is what matters.
Move the old cloud-init file out of the way so it’s not read:
textcopy
mv /etc/network/interfaces.d/50-cloud-init /root/50-cloud-init.bak
mv /etc/network/interfaces.d/99-additional-ip.yaml /root/99-additional-ip.yaml.bakFrom console/ VNC
textcopy
ip addr flush dev eth0 # clear any residual state from cloud-init