[GLLUG] Using IPv6 addresses with Debian
Chris Bell
chrisbell at chrisbell.org.uk
Thu Mar 11 15:42:20 UTC 2021
On Thursday, 11 March 2021 15:22:11 GMT Andy Smith via GLLUG wrote:
> 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.
>
> Cheers,
> Andy
In fact I want to be able to use the addresses as source addresses under
specific conditions, such as local or global use. This has been working for
some time, and RADVD is configured to specify which to use. Given a choice of
prefix the one chosen should automatically be the one which has the nearest to
the destination prefix.
--
Chris Bell
Website http://chrisbell.org.uk
More information about the GLLUG
mailing list