[GLLUG] Using IPv6 addresses with Debian

Andy Smith andy at bitfolk.com
Thu Mar 11 15:22:14 UTC 2021

Hi Chris,

On Thu, Mar 11, 2021 at 03:14:42PM +0000, Chris Bell via GLLUG wrote:
> 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 don't see a concrete question in your email, but for what it's
worth I add multiple IPv6 addresses on Debian by using pre-up hooks
in the /etc/network/interfaces file, e.g.:

iface eth0 inet6 static
    address 2001:ba8:1f1:f019::2
    netmask 64
    gateway fe80::fcff:ffff:feff:ffff
    pre-up ip -6 addr add 2001:ba8:1f1:f019::3/64 dev $IFACE preferred_lft 0
    pre-up ip -6 addr add 2001:ba8:1f1:f019::4/64 dev $IFACE preferred_lft 0

The "preferred_lft 0" bit is so that the addresses are present and
usable for daemons to bind to, but will never be used as a source
address for outgoing traffic. Without that, the last added address
will be used as the source address.


https://bitfolk.com/ -- No-nonsense VPS hosting

More information about the GLLUG mailing list