Re: [GLLUG] Using IPv6 addresses with Debian

2021-03-12 Thread Chris Bell via GLLUG
On Friday, 12 March 2021 10:15:04 GMT John Winters via GLLUG wrote:
> 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::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:
>   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.
> 
> HTH
> John

Thanks for the suggestion, which I will try, but I have had problems with even 
dhcpcd.conf on a raspberrypi. Systemd instructions go into great detail, but 
it still does not enable more than one IPv6 address per interface. I hope that 
debian 11 Bullseye will work.

-- 
Chris Bell
Website http://chrisbell.org.uk



-- 
GLLUG mailing list
GLLUG@mailman.lug.org.uk
https://mailman.lug.org.uk/mailman/listinfo/gllug

Re: [GLLUG] Using IPv6 addresses with Debian

2021-03-12 Thread John Winters via GLLUG

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::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:
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.


HTH
John

--
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/

--
GLLUG mailing list
GLLUG@mailman.lug.org.uk
https://mailman.lug.org.uk/mailman/listinfo/gllug

Re: [GLLUG] Using IPv6 addresses with Debian

2021-03-12 Thread Chris Bell via GLLUG
> 
> 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.

There are valid reasons for a single interface to have more than one current 
source prefix, including multi-homed sites with connections provided by more 
than one ISP for reliability (perhaps one preferred if available for cost 
reasons) and when using site-local addresses.

RFC3513 Internet Protocol Version 6 (IPv6) Addressing Architecture
defines fe80::/64 as link local, still current
defines fec0::/10 as site local, now deprecated by

RFC 4291 IP Version 6 Addressing Architecture

but

RFC4193 Unique Local IPv6 Unicast Addresses
defines fc00::/7 as site local, although fd00::/8 is the only one currently in 
use, (October 2005, and has no current amendments)

RFC6724 Default Address Selection for Internet Protocol Version 6 (IPv6)
specifies how the correct address should be selected

The Shorewall(6) firewall system is designed to cope with these possibilities 
and can be used to enforce the way different addresses may be used.

I have been receiving SMTP to my RaspberryPi email gateway using exim and 
spamassassin, and the gateway could only access my RaspberryPi hubbed host 
mail server, again running exim and spamassassin, using my site local network 
addresses, and the gateway managed to block huge numbers of direct attacks.

-- 
Chris Bell
Website http://chrisbell.org.uk



-- 
GLLUG mailing list
GLLUG@mailman.lug.org.uk
https://mailman.lug.org.uk/mailman/listinfo/gllug

Re: [GLLUG] Using IPv6 addresses with Debian

2021-03-11 Thread Chris Bell via GLLUG
On Thursday, 11 March 2021 15:22:35 GMT Martin A. Brooks via GLLUG wrote:
> On 2021-03-11 15:14, Chris Bell via GLLUG wrote:
> > IPv6 is designed so that a single address can be allocated to multiple
> > interfaces, for example in a round-robin
> 
> That's not a "design" of IPv6 but rather a function of 802.3ad.
Thankfully the IETF have spent a lot of time and effort designing and 
specifying that, with multiple RFC's.


-- 
Chris Bell
Website http://chrisbell.org.uk



-- 
GLLUG mailing list
GLLUG@mailman.lug.org.uk
https://mailman.lug.org.uk/mailman/listinfo/gllug

Re: [GLLUG] Using IPv6 addresses with Debian

2021-03-11 Thread Chris Bell via GLLUG
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 +, 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::feff:
> 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



-- 
GLLUG mailing list
GLLUG@mailman.lug.org.uk
https://mailman.lug.org.uk/mailman/listinfo/gllug

Re: [GLLUG] Using IPv6 addresses with Debian

2021-03-11 Thread Chris Bell via GLLUG
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 +, 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::feff:
> 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
Thanks for the reply, I will try that.

-- 
Chris Bell
Website http://chrisbell.org.uk



-- 
GLLUG mailing list
GLLUG@mailman.lug.org.uk
https://mailman.lug.org.uk/mailman/listinfo/gllug

Re: [GLLUG] Using IPv6 addresses with Debian

2021-03-11 Thread Martin A. Brooks via GLLUG

On 2021-03-11 15:14, Chris Bell via GLLUG wrote:

IPv6 is designed so that a single address can be allocated to multiple
interfaces, for example in a round-robin


That's not a "design" of IPv6 but rather a function of 802.3ad.


--
GLLUG mailing list
GLLUG@mailman.lug.org.uk
https://mailman.lug.org.uk/mailman/listinfo/gllug

Re: [GLLUG] Using IPv6 addresses with Debian

2021-03-11 Thread Andy Smith via GLLUG
Hi Chris,

On Thu, Mar 11, 2021 at 03:14:42PM +, 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::feff:
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

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

-- 
GLLUG mailing list
GLLUG@mailman.lug.org.uk
https://mailman.lug.org.uk/mailman/listinfo/gllug