dhcpcd-discuss

Re: AW: Re: [Feature Request] Extended SLAAC option: Multiple options, per prefix, preferred lifetime, inform6, temporary addresses

M. Buecher

Thu Aug 31 21:22:49 2017

On 2017-08-26 01:57, M. Buecher wrote:
On 2017-08-25 20:50, Roy Marples wrote:

On 25/08/2017 17:40, harald.albrecht wrote:

Debian Stretch 9 has systemd-network enabled in full glory. Can someone please explain how networkd and dhcpcd relate to reach other? I'm still scratching my head!

They're not related!

However, you can run Debian without systemd the last time I checked, which also means no networkd either.

Also, Debian (and also Ubuntu) act as package managers for other dpkg based distributions which may use something else such as NetworkManager or dhcpcd and dhcpcd-ui.

Roy

I use the Raspbian [1] release of the Raspberry Pi Founddation [2]
which is a Debian derivative that uses dhcpcd in its releases.

[1] https://www.raspbian.org/
[2] https://www.raspberrypi.org/downloads/raspbian/


I'm still using /etc/network/interfaces.d/ifcfg-ethernet for my IPv6
static addresses for incoming connections and to enable Privacy
Extensions for outgoing connections on "eth0".
Works via systemd's fallback support of /etc/network/interfaces* on
Debian/Raspbian.
Reasons are...
a) that I haven't got to systemd network configuration in my leisure
time yet. Maybe it's dead simple and easy.
b) the Debian package only includes dhcpcd 6.10.1 without "static
ip6_address" or temporary addresses according to its man page.


Goals I want to achieve with dhcpcd on my Raspbian server:
a) ULA
* Static ULA address (currently via
/etc/network/interfaces.d/ifcfg-ethernet, due to old dhcpcd version)
  The host is the DHCPv6 server for the managed ULA with
dynamic+static DHCP addresses.

b) GUA
Prefixes are advertised by the FRITZ!Box router, delegated from the
ISP German Telekom
* Temporary GUA addresses for outgoing connections
* Stable GUA address for services and to allow "port forwarding" on
the FRITZ!Box router (prefix changes are already considered by the
router)
  * Idea was to use the same interface id from the ULA address (e.g.
::0:0:0:1), because it is easy to remember as already known from the
ULA and does not provide any hardware informations.
    Right now implementation needs a dhcpcd hook script to add this
address for each advertised prefix.
    Stable private addresses are only stable for the same
network/prefix, so not useable with changing prefixes from the ISP.
  * On a new prefix reload dnsmasq, so that it can assign new stable
GUA addresses from its static DHCP pool to the other servers.
    Implementation needs a dhcpcd hook script to reload dnsmasq.

  * Unfortunately during my tests the FRITZ!Box always re-calculated
the hardware-based address for the host :(
    So for now I additionally need that old hardware-based stable
address, until I get the router to accept my changes.
For testing it is helpful to have all possibile stable addresses assigned.

c) Do everything via dhcpcd as a "Single-Point-of-Contact"
   Have already some other feature requests in mind related to my
goals, but get the first one right, then do the others :)

Maddes

Thanks to Harald I just checked out the systemd-networkd.service, it was easy and it already gave my the options to configure my IPv6 addresses as I want [2]. It supports static interface ids over changing prefixes via IPv6Token, so that I could configure my router accordingly.
Created a feature request T136 [1] to support this in dhcpcd too.

Still going to prefer dhcpcd as it supports DHCPv4 inform messages, so that when I temporally use my router's DHCP & DNS the host with its static IPv4 address is still reachable via its name. Additionally I want to use the event-driven script calls to reload dnsmasq whenever the GUA prefix changes.

Maddes

P.S.:
Debian defaults to the ifupdown legacy compatibility networking.service instead of the "real(TM)" systemd-networkd.service.
 systemctl enable systemd-networkd.service
 systemctl disable networking.service
systemctl stop networking.service ; systemctl start systemd-networkd.service

[1] https://dev.marples.name/T136
[2] /etc/systemd/network/eth0.network:
[Match]
Name=en*

[Network]
IPv6AcceptRA=yes
LinkLocalAddressing=ipv6
IPv6Token=::a:b:c:d
IPv6PrivacyExtensions=yes

## ULA
[Address]
Address=fd00:1:2:4:a:b:c:d/64


References:
AW: Re: [Feature Request] Extended SLAAC option: Multiple options, per prefix, preferred lifetime, inform6, temporary addressesharald.albrecht
Re: AW: Re: [Feature Request] Extended SLAAC option: Multiple options, per prefix, preferred lifetime, inform6, temporary addressesRoy Marples
Re: AW: Re: [Feature Request] Extended SLAAC option: Multiple options, per prefix, preferred lifetime, inform6, temporary addressesM. Buecher
Archive administrator: postmaster@marples.name