Is it possible to configure a range of IPv6 IPs on Debian?

Linode Staff

The Linux Static IP Configuration guide shows how to configure IPv6 addresses from my /64 routed range.

I was expecting the /64 mask to cover the entire range of addresses that could point at the machine, but searching around it seems this isn't the case. Is it possible to configure a range of IPs, or must I configure each one as I need them?

2 Replies

Hey there,

That's a great question! I was looking for other posts in the Community Questions site but didn't find any pointing to that. Honestly, I'm not quite sure but when I tried doing that in my own Debian image it didn't seem to work. So maybe Debian doesn't allow for that?

It certainly seems odd to me, but that's as far as I could get tonight. I can definitely confirm that configuring IPv6 addresses individually in the "/etc/network/interfaces" file is possible and easy to do.

Here's a few links I came across online that might have a better solution aside from what may be in the man page for interfaces:

I hope that helps! if there's indeed no way to do that, you might at least be able to get the job done quickly by simply creating a shell script that iterates through a loop of addresses and then echoes the output to your interfaces file.

Oh, and don't forget to include the IPv6 SLAAC address for your Linode as the first IPv6 address configuration. I forgot to do that earlier and ended up having 5 puzzling minutes of IPv6 network downtime!


I was recently going over this again and I got a bit stumped getting my additional IPv6 /64 address configs. Finally got things to work as expected. In case anybody runs into some issues interpreting the details in the Debian network configs guide, I'm including a sample of what my network interface looks like with my currently working config:

# Generated by Linode Network Helper
# Mon Jan  2 22:51:06 2023 UTC
#
# This file is automatically generated on each boot with your Linode's
# current network configuration. If you need to modify this file, please
# first disable the 'Auto-configure Networking' setting within your Linode's
# configuration profile:
#  - https://cloud.linode.com/linodes/41319517/advanced
#
# For more information on Network Helper:
#  - https://www.linode.com/docs/platform/network-helper
#
# A backup of the previous config is at /etc/network/.interfaces.linode-last
# A backup of the original config is at /etc/network/.interfaces.linode-orig
#
# /etc/network/interfaces

auto lo
iface lo inet loopback

source /etc/network/interfaces.d/*

auto eth0

allow-hotplug eth0

iface eth0 inet6 static
    address 2600:3c03::f03c:93ff:fea2:bc7f/128
    gateway fe80::1

iface eth0 inet6 static
    address 2600:3c03:e000:0b4f::/64

iface eth0 inet6 static
    address 2600:3c03:e000:0b4f::1/64

iface eth0 inet6 static
    address 2600:3c03:e000:0b4f::2/64

iface eth0 inet static
    address 45.79.187.44/24
    gateway 45.79.187.1

I hope that helps!

This guide is also really helpful for configuring IPv6:

Good luck!
Arty

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