this post was submitted on 21 Dec 2023
0 points (NaN% liked)

Linux

47900 readers
983 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
 

I operate a Debian router. IPv4 works perfectly. However, I am facing issues with IPv6.

In my sysctl.conf, I have the following configuration:

# accept router advertisements on WAN interface
net.ipv6.conf.1und1.accept_ra = 2

In /etc/systemd/network/1und1.network, the configuration is as follows:

[Match]
Name=1und1

[Network]
Description=Fritz!Box 7510 providing 1und1 VDSL
IPv6AcceptRA=yes
DHCP=yes

[DHCPv4]
Hostname=claptrap
UseHostname=no
UseDNS=no
UseNTP=no
UseSIP=no
UseRoutes=no
UseGateway=yes

[IPv6AcceptRA]
UseDNS=no
# Force starting the DHCPv6 client even if the Router Advertisement
# indicates it's not required.
DHCPv6Client=yes

[DHCPv6]
UseHostname=no
UseDNS=no
UseNTP=no

In my dnsmasq.conf, the configuration is as follows:

dhcp-range=interface:br0,::,constructor:br0,ra-stateless,ra-names,12h

Additionally, the /etc/nftables.conf contains:

icmpv6 type {
    echo-request,
    nd-neighbor-solicit,
    nd-router-solicit,
    mld-listener-query,
    nd-neighbor-advert,
    nd-router-advert
} accept

On the WAN interface.

I receive a /64 IP on the 1und1 interface; however, I do not receive a prefix on br0. What am I doing wrong? Do I need to instruct systemd-networkd to request a larger prefix somehow?

top 3 comments
sorted by: hot top controversial new old
[–] progandy@feddit.de 0 points 10 months ago (1 children)

You'll have to enable prefix delegation. dnsmasq should not be necessary though, I think. This appears to explain all steps:

https://major.io/p/dhcpv6-prefix-delegation-with-systemd-networkd/

[–] Helix@feddit.de 0 points 10 months ago* (last edited 10 months ago) (1 children)

I don't want systemd-networkd to delegate the prefixes and instead use dnsmasq for that.

However, systemd-networkd should at least be able get the prefix on the 1und1 interface, where I configured IPv6AcceptRA, but for whatever reason it only gets a single address with a /64 prefix.

The following configuration pulled from your article didn't help either:

[DHCPv6]
PrefixDelegationHint=::/56

Apparently, the article has a few minor errors as well, e.g. they configure lanbridge.network twice with different settings and once call a setting ConfigureWithoutCarrier=yes and once ConfigureWithoutCarrier=true. I don't really trust inconsistent tutorials 😅


Checking systemd-networkd logs, I also get the following error:

Could not set NDisc address: Invalid argument

Currently upgrading to Debian 12, maybe this is a bug…>

[–] progandy@feddit.de 0 points 10 months ago* (last edited 10 months ago)

The tutorials give a good overview for further research, though. If you do not want to use systemd to manage the delegation you probably need a separate dhcpv6 client that does this and disable dhcp for systemd-networkd (slaac is probably ok to keep)