Friday, October 11, 2024

dhcp6leased: problem configuring a public IPv6 address on the external interface

Hi all,

I'm switching from dhcpcd to dhcp6leased. After switching, I ran into the problem that my externally facing interface did not get a public IPv6 address. It only had a link-local address, through which dhcp6leased apparently was able to get a /56 from my ISP and configure the internally facing interfaces correctly. Nothing could reach the IPv6 outside world however.

dhcp6leased.conf was as follows:

request rapid commit
request prefix delegation on em1 for { em0 vlan4 wg0 vlan5 vlan3 }

hostname.em1 is as follows:

inet autoconf
inet6 autoconf

slaacd seems to be running just fine (but it looks like it only configures a link-local address):

# slaacctl show interface
em1:
         index:   2 running: yes temporary: yes
        lladdr: 80:ee:73:f1:11:c2
         inet6: fe80::82ee:73ff:fef1:11c2%em1
        Router Advertisement from fe80::201:5cff:febf:7612%em1
                received: 2024-10-11 20:27:47; 8s ago
                Cur Hop Limit:   0, M: 1, O: 1, Router Lifetime:  1800s
                Default Router Preference: Medium
                Reachable Time:   3600000ms, Retrans Timer:         0ms
        Default router proposals
                id:    1, state: PROPOSAL_CONFIGURED
                router: fe80::201:5cff:febf:7612%em1
                router lifetime:       1800
                Preference: Medium
                updated: 2024-10-11 20:27:47; 8s ago, timeout:       1780s
#

Back when using dhcpcd, hostname.em1 just contained a single line "autoconf". dhcpcd was able to get a /128 using router solicitations, configure that address on the external interface, and then get a prefix to configure the other interfaces:

interface em1
       ipv6rs
       ia_na 1
       ia_pd 2 em0/1 vlan4/2 wg0/3 vlan5/4 vlan3/5

The /128 was in a way different range than the prefix.


I was able to get things working with dhcp6leased by assigning an address from the prefix itself the external interface, like so (note that em1 appears both in the "on" and the "for" part):

request prefix delegation on em1 for { em1/128 em0 vlan4 wg0 vlan5 vlan3 }

This doesn't feel right though, but I'm not sure why. I don't know why em1 doesn't get a public IPv6 address from slaacd.

Should the external interface get an external IPv6 address from slaacd using router solicitations, and if so, what am I doing wrong here?

Regards,
Jurjen Oskam

No comments:

Post a Comment