After connecting to my new ISP (Deutsche Glasfaser) successfully via IPv4 (systemd-networkd got a CGNATt’ed address like expected), I noticed that I had no IPv6 address. I then spent days on researching PPPoE, 6rd and what parameters/prefixes/relays my ISP may use, as neither systemd-networkd, NetworkManager nor dhcpcd were even able to find a DHCPv6 server, neither in unconfigured nor configured (routable IPv4) state. Scanning with nmap (sudo nmap (-6) --script broadcast-dhcp(6)-discover) didn’t find anything either.

However, dhclient did, without a hitch.

(0) 30p87@30p87-dns-db:[/etc/systemd/network]$ sudo dhcpcd -6 enp2s0
dhcpcd-10.3.1 starting
DUID 00:01:00:01:31:63:a3:c6:00:10:18:35:c3:1e
enp2s0: IAID 18:35:c3:1e
enp2s0: soliciting an IPv6 router
enp2s0: Router Advertisement from fe80::23
Dropped protocol specifier '.ra' from 'enp2s0.ra'. Using 'enp2s0' (ifindex=2).
enp2s0: soliciting a DHCPv6 lease
timed out
(0) 30p87@30p87-dns-db:[~]$ sudo dhclient -6 enp2s0 -v
Internet Systems Consortium DHCP Client 4.4.3-P1
Copyright 2004-2022 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on Socket/enp2s0
Sending on   Socket/enp2s0
PRC: Confirming active lease (INIT-REBOOT).
XMT: Forming Confirm, 0 ms elapsed.
XMT:  X-- IA_NA 18:35:c3:1e
XMT:  | X-- Confirm Address 2a00:6020:5340::29b4
XMT:  V IA_NA appended.
XMT: Confirm on enp2s0, interval 910ms.
RCV: Reply message on enp2s0 from fe80::23.
RCV:  X-- Server ID: 00:03:00:01:18:c3:00:c3:88:24
message status code Success: "All addresses still on link"
PRC: Bound to lease 00:03:00:01:18:c3:00:c3:88:24.

What really wonders me is that there are no indications from any DHCP client that they even got a response for requesting a v6 address. So it’s not a problem with expecting an address but getting a prefix instead, ig? Configuring that (as seen in https://github.com/systemd/systemd/issues/31820) also doesn’t change anything.

So, ig, either everything but dhclient is borked, or it just automates stuff I don’t know about.

I’d guess I’ll try to capture all packets with wireshark now, and compare eg. systemd-networkd with dhclient.

P.S.: It’s very ironic that a networking community lives on an instance named “itjust.works”

    • Lucy :3@feddit.orgOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      2 days ago

      From a successful DHCP request by dhclient I can read that I just get a single address. First, the client tries to solicit, gets an advertisement, then requests/confirms the IP and then the server confirms the lease. Then, systemd continues to send DHCPv6 solicits for various options on the correct interface (:18:35:c3:1e) but with a IAID different from what dhclient uses (1835c31e vs 5de26c15) and T1/T2’s of 0. Don’t know if that’s important, as the IF is already configured when that happens.

      https://30p87.de/dhclient_success_clean.pcapng

  • litchralee@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    3
    ·
    4 days ago

    At first glance, I couldn’t tell you why one client works but the other one doesn’t. The answer to that may require monitoring the traffic using Wireshark to get an idea of how the DHCP6 server is responding.

    So it’s not a problem with expecting an address but getting a prefix instead, ig?

    As for this, be advised that obtaining a single address+subnet – which is what DHCPv4 also did – is distinct from the new feature which only DHCP6 supports, which is prefix delegation (PD) where a whole subnet is routed toward the requestor. This feature is meant to be used between routers, but since a desktop or mobile phone can become a router simply by turning on WiFi Hotspot mode, it’s also supported by most DHCP6 clients.

    The odd thing is that, combined with link-local addressing (which was a thing in Legacy IP too, but rarely used), it’s entirely possible to obtain a prefix delegation and then assign for yourself an address+subnet from that prefix.

    Suffice it to say, there are many ways to obtain an IPv6 address, and not all ISPs consistently support all of them.

  • theit8514@lemmy.world
    link
    fedilink
    English
    arrow-up
    3
    ·
    4 days ago

    Ipv6 is a wild beast. It often doesn’t need a dhcp server and instead will rely on routers sending out periodic router advertisement/announcement messages with a prefix to be used and your device will configure its address based on that prefix.

    • Lucy :3@feddit.orgOP
      link
      fedilink
      English
      arrow-up
      3
      ·
      4 days ago

      well, the problem here is that the device we’re talking about is my router, directly connected to the modem. and the ISP didn’t send RA’s apparently, and manually requesting anything also only worked with dhclient. Now I need to choose a way to configure my LAN though