dhcpcd icon indicating copy to clipboard operation
dhcpcd copied to clipboard

Static IPv6 Fallback not getting enabled when DHCPv6 and SLAAC is disabled

Open Kenny-a11y opened this issue 10 months ago • 6 comments
trafficstars

` hostname clientid persistent option rapid_commit option domain_name_servers, domain_name, domain_search, host_name option classless_static_routes option ntp_servers option interface_mtu require dhcp_server_identifier noipv6rs slaac private

reboot 10

interface eth0 metric 100

fallback static_ipv4

profile static_ipv4 static ip_address=10.xxx.xxx.100/24 static routers=10.xxx.xxx.101 static domain_name_servers=8.8.8.8 1.1.1.1

fallback static_ipv6

profile static_ipv6 static ip6_address=2001:xxxx:xxxx:xxxx::10/64 static ip6routers=2001:xxxx:xxxxx:xxxx::2`

Could it be that my static_ipv6 profile is not getting triggered? My intended aim is to make dhcpcd.conf file work for 4 cases

Case 1: DHCPv4 and DHCPv6 works, get dynamic IPv4 and IPv6 (successful)

Case 2: DHCPv4 does not work and DHCPv6 works, set static IPv4 and get dynamic IPv6 (successful)

Case 3: DHCPv4 works and DHCPv6 does not works, get dynamic IPv4 and set static IPv6 (unsuccessful as static IPv6 is not set)

Case 4: DHCPv4 does not work and DHCPv6 does not works, set static IPv4 and IPv6 (unsuccessful as static IPv6 is not set)

Kenny-a11y avatar Jan 15 '25 09:01 Kenny-a11y

Also this is version 8.1.2 running on debian raspi (linux 11)

Kenny-a11y avatar Jan 15 '25 09:01 Kenny-a11y

Debian stable has 9.4.1 and testing currently has 10.1.0. You might wanna test using one of these instead.

perkelix avatar Jan 15 '25 09:01 perkelix

fallback is currently only for DHCP, not DHCPv6.

rsmarples avatar Jan 15 '25 10:01 rsmarples

Ok thanks for the confirmation

Kenny-a11y avatar Jan 15 '25 10:01 Kenny-a11y

also quick question what is the line i should add to to let me add a ipv6 dns server? I want to it to append it to resolv.conf

Kenny-a11y avatar Jan 21 '25 02:01 Kenny-a11y

dhcpcd doesn't support prefixing/appending configs directly.

But you have a few options:

  • Massage the new_dhcp6_name_servers variable in dhcpcd.enter-hook
  • Configure resolvconf(8) to do append any dns server you want

rsmarples avatar Jan 21 '25 11:01 rsmarples