[GLLUG] Using IPv6 addresses with Debian

John Winters john at sinodun.org.uk
Fri Mar 12 10:15:09 UTC 2021

On 11/03/2021 15:14, Chris Bell via GLLUG wrote:
> Hello,
> IPv6 is designed so that a single address can be allocated to multiple
> interfaces, for example in a round-robin, and a single interface can have
> multiple addresses.
> I am using Debian 10 Buster on various computers including RaspberryPi and find
> that I can manually add addresses to a running computer, but if I attempt to
> configure multiple addresses only the last is accepted, and all but one is lost
> after a reboot.

I've found various ways of configuring additional IPv6 addresses on 
Raspbian / Debian Buster.  It depends to a large extent on whether it's 
headless or using a graphical desktop - where there are desktop client 
components which want to get involved.

On a plain (headless) Raspbian system, what I did was to edit 
/etc/dhcpcd.conf and added the following two lines at the end:

interface eth0
static ip6_address=2001:<more of it>:4001/64

That causes dhcpcd to allocate that one in addition to the one it 
calculates from the MAC address.

On another headless Raspberry Pi, but running plain Debian Buster (not 
Raspbian) I put the following in /etc/network/interfaces.d/eth0

auto eth0
allow-hotplug eth0
iface eth0 inet dhcp

iface eth0 inet6 static
	address 2001:<the rest>
	netmask 64

This causes the interface to be configured with *just* that IPv6 address 
(no auto-calculated one) but you can always put additional ones there too.

I suppose it depends on whether you're running dhcpcd or not.  Raspbian 
does by default, but Debian doesn't.


Xronos Scheduler - https://xronos.uk/
All your school's schedule information in one place.
Timetable, activities, homework, public events - the lot
Live demo at https://schedulerdemo.xronos.uk/

More information about the GLLUG mailing list