core: dhcpd6 doesn't start automatically when no IPv6 address is assigned to the WAN interface

Hi there! 😃

Important notices

Before you add a new report, we ask you kindly to acknowledge the following:

Describe the bug

While I imagine this is not unusual, my ISP - Orange France - doesn’t support ia-na and only provides me with a PD (that I can flawlessly use with interface tracking for the LAN interface). Unsurprisingly, the WAN interface only gets a link-local IPv6 address but no globally routable one.

The problem is that the dhcpd6 service doesn’t automatically start when no IPv6 address is assigned to the WAN interface, most likely due to this short circuit in rc.newwanipv6:

https://github.com/opnsense/core/blob/ecb34928fb0792154cfd79490fab8605654c03d8/src/etc/rc.newwanipv6#L74-L77

… which seems to be confirmed by the logs:

/usr/local/etc/rc.newwanipv6: Failed to detect IP for WAN[wan]

One way to fix that would probably consist in assigning a global IPv6 address to the WAN interface using the PD sent by the ISP but I haven’t been able to find a way to achieve that. Is that even possible?

As a workaround, I tweaked rc.newwanipv6 to always call plugins_configure('dhcp', false, array('inet6')) before exiting. While it works fine (after all, dhcpd6 doesn’t really care if the WAN interface doesn’t have an address), it seems a bit gross 😄

Am I overlooking something?

Thanks! 🤗

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 47 (29 by maintainers)

Commits related to this issue

Most upvoted comments

Quick info: this will be shipped in today’s 22.1.7 😃

@kevinchalet @fichtner I just updated to 22.1.4 + checked “Request IPv6 prefix only” in the basic tab and yay, thanks! Just a quick heads up for anyone reading this thread in the future (and before new release with @fichtner’s patches is published) : I had to 1/ switch to “basic” tab and enable checkbox 2/ save 3/ go to “advanced” 4/ save

Interesting. I’m half way between two ISPs at present, my old static provider and my new FTTP provider, who I have to use dhcp/dhcpv6 with. Now, I do have the option to request an IA on the WAN as well as a PD, and I notices after a reboot that the dhcpdv6 needed to be started, I put that down to just momentary madness. I’ll try and confirm and see if it is because of no wan address, I don’t think it is though.

I think I understand the dilemma better now. Can somebody with the issue provide the following output on 22.1.4?

I finally moved to 22.1.4 so here we go:

Mar 30 05:42:17 OPNsense.home opnsense[45029]: /usr/local/etc/rc.newwanipv6: On (IP address: ) (interface: WAN[wan]) (real interface: re0_vlan832).
Mar 30 05:42:19 OPNsense.home opnsense[82631]: /usr/local/etc/rc.newwanipv6: On (IP address: ) (interface: WAN[wan]) (real interface: re0_vlan832).
Mar 30 05:42:27 OPNsense.home opnsense[22225]: /usr/local/etc/rc.newwanipv6: On (IP address: ) (interface: WAN[wan]) (real interface: re0_vlan832).
Mar 30 05:42:28 OPNsense.home opnsense[45004]: /usr/local/etc/rc.newwanip: On (IP address: 172.17.1.1) (interface: LAN832[opt1]) (real interface: em0_vlan832).
Mar 30 05:42:29 OPNsense.home opnsense[95381]: /usr/local/etc/rc.newwanipv6: On (IP address: ) (interface: WAN[wan]) (real interface: re0_vlan832).
Mar 30 05:49:11 OPNsense.home opnsense[81246]: /usr/local/etc/rc.newwanip: On (IP address: [MY IPV4 WAN ADDRESS]) (interface: WAN[wan]) (real interface: re0_vlan832).
Mar 30 05:49:16 OPNsense.home opnsense[68780]: /usr/local/etc/rc.newwanipv6: On (IP address: ) (interface: WAN[wan]) (real interface: re0_vlan832).
Mar 30 05:50:35 OPNsense.home opnsense[919]: /usr/local/etc/rc.newwanipv6: On (IP address: ) (interface: WAN[wan]) (real interface: re0_vlan832).
Mar 30 05:50:40 OPNsense.home opnsense[89257]: /usr/local/etc/rc.newwanipv6: On (IP address: ) (interface: WAN[wan]) (real interface: re0_vlan832).
Mar 30 05:50:46 OPNsense.home opnsense[24724]: /usr/local/etc/rc.newwanipv6: On (IP address: ) (interface: WAN[wan]) (real interface: re0_vlan832).
Mar 30 05:50:49 OPNsense.home opnsense[81427]: /usr/local/etc/rc.newwanip: On (IP address: 172.17.1.1) (interface: LAN832[opt1]) (real interface: em0_vlan832).
Mar 30 05:50:51 OPNsense.home opnsense[24745]: /usr/local/etc/rc.newwanipv6: On (IP address: ) (interface: WAN[wan]) (real interface: re0_vlan832).
Mar 30 05:52:43 OPNsense.home opnsense[34563]: /usr/local/etc/rc.newwanipv6: On (IP address: ) (interface: WAN[wan]) (real interface: re0_vlan832).
Mar 30 05:52:47 OPNsense.home opnsense[50738]: /usr/local/etc/rc.newwanipv6: On (IP address: ) (interface: WAN[wan]) (real interface: re0_vlan832).
Mar 30 05:52:54 OPNsense.home opnsense[96653]: /usr/local/etc/rc.newwanipv6: On (IP address: ) (interface: WAN[wan]) (real interface: re0_vlan832).
Mar 30 05:52:55 OPNsense.home opnsense[49434]: /usr/local/etc/rc.newwanip: On (IP address: 172.17.1.1) (interface: LAN832[opt1]) (real interface: em0_vlan832).
Mar 30 05:52:56 OPNsense.home opnsense[45505]: /usr/local/etc/rc.newwanipv6: On (IP address: ) (interface: WAN[wan]) (real interface: re0_vlan832).
Mar 30 05:57:09 OPNsense.home opnsense[15635]: /usr/local/etc/rc.newwanip: On (IP address: [MY IPV4 WAN ADDRESS]) (interface: WAN[wan]) (real interface: re0_vlan832).
Mar 30 05:57:15 OPNsense.home opnsense[12296]: /usr/local/etc/rc.newwanipv6: On (IP address: ) (interface: WAN[wan]) (real interface: re0_vlan832).
Mar 30 05:58:35 OPNsense.home opnsense[67227]: /usr/local/etc/rc.newwanipv6: On (IP address: ) (interface: WAN[wan]) (real interface: re0_vlan832).
Mar 30 05:58:39 OPNsense.home opnsense[92703]: /usr/local/etc/rc.newwanipv6: On (IP address: ) (interface: WAN[wan]) (real interface: re0_vlan832).
Mar 30 05:58:44 OPNsense.home opnsense[54603]: /usr/local/etc/rc.newwanipv6: On (IP address: ) (interface: WAN[wan]) (real interface: re0_vlan832).
Mar 30 05:58:55 OPNsense.home opnsense[7159]: /usr/local/etc/rc.newwanip: On (IP address: 172.17.1.1) (interface: LAN832[opt1]) (real interface: em0_vlan832).
Mar 30 05:58:57 OPNsense.home opnsense[47553]: /usr/local/etc/rc.newwanipv6: On (IP address: ) (interface: WAN[wan]) (real interface: re0_vlan832).
Mar 30 05:59:04 OPNsense.home opnsense[45383]: /usr/local/etc/rc.newwanipv6: On (IP address: ) (interface: WAN[wan]) (real interface: re0_vlan832).
Mar 30 05:59:07 OPNsense.home opnsense[92782]: /usr/local/etc/rc.newwanipv6: On (IP address: ) (interface: WAN[wan]) (real interface: re0_vlan832).
Mar 30 05:59:15 OPNsense.home opnsense[29231]: /usr/local/etc/rc.newwanipv6: On (IP address: ) (interface: WAN[wan]) (real interface: re0_vlan832).
Mar 30 05:59:16 OPNsense.home opnsense[70074]: /usr/local/etc/rc.newwanip: On (IP address: 172.17.1.1) (interface: LAN832[opt1]) (real interface: em0_vlan832).
Mar 30 05:59:17 OPNsense.home opnsense[3734]: /usr/local/etc/rc.newwanipv6: On (IP address: ) (interface: WAN[wan]) (real interface: re0_vlan832).
<11>1 2022-03-30T06:08:50+02:00 OPNsense.home opnsense 35924 - [meta sequenceId="4"] /usr/local/etc/rc.newwanip: On (IP address: [MY IPV4 WAN ADDRESS]) (interface: WAN[wan]) (real interface: re0_vlan832).
<11>1 2022-03-30T06:08:50+02:00 OPNsense.home opnsense 37060 - [meta sequenceId="21"] /usr/local/etc/rc.newwanipv6: On (IP address: ) (interface: WAN[wan]) (real interface: re0_vlan832).
<11>1 2022-03-30T06:10:08+02:00 OPNsense.home opnsense 1141 - [meta sequenceId="23"] /usr/local/etc/rc.newwanipv6: On (IP address: ) (interface: WAN[wan]) (real interface: re0_vlan832).
<11>1 2022-03-30T06:10:19+02:00 OPNsense.home opnsense 6154 - [meta sequenceId="29"] /usr/local/etc/rc.newwanip: On (IP address: 172.17.1.1) (interface: LAN832[opt1]) (real interface: em0_vlan832).
<11>1 2022-03-30T06:10:21+02:00 OPNsense.home opnsense 20651 - [meta sequenceId="71"] /usr/local/etc/rc.newwanipv6: On (IP address: ) (interface: WAN[wan]) (real interface: re0_vlan832).
<11>1 2022-03-30T06:10:57+02:00 OPNsense.home opnsense 47404 - [meta sequenceId="94"] /usr/local/etc/rc.newwanipv6: On (IP address: ) (interface: WAN[wan]) (real interface: re0_vlan832).
<11>1 2022-03-30T06:11:04+02:00 OPNsense.home opnsense 51503 - [meta sequenceId="100"] /usr/local/etc/rc.newwanip: On (IP address: 172.17.1.1) (interface: LAN832[opt1]) (real interface: em0_vlan832).
<11>1 2022-03-30T06:11:05+02:00 OPNsense.home opnsense 56937 - [meta sequenceId="120"] /usr/local/etc/rc.newwanipv6: On (IP address: ) (interface: WAN[wan]) (real interface: re0_vlan832).
<11>1 2022-03-30T06:16:25+02:00 OPNsense.home opnsense 82505 - [meta sequenceId="4"] /usr/local/etc/rc.newwanip: On (IP address: [MY IPV4 WAN ADDRESS]) (interface: WAN[wan]) (real interface: re0_vlan832).
<11>1 2022-03-30T06:16:25+02:00 OPNsense.home opnsense 85749 - [meta sequenceId="21"] /usr/local/etc/rc.newwanipv6: On (IP address: ) (interface: WAN[wan]) (real interface: re0_vlan832).
<11>1 2022-03-30T06:17:42+02:00 OPNsense.home opnsense 68832 - [meta sequenceId="22"] /usr/local/etc/rc.newwanipv6: On (IP address: ) (interface: WAN[wan]) (real interface: re0_vlan832).
<11>1 2022-03-30T06:17:49+02:00 OPNsense.home opnsense 77346 - [meta sequenceId="28"] /usr/local/etc/rc.newwanip: On (IP address: 172.17.1.1) (interface: LAN832[opt1]) (real interface: em0_vlan832).
<11>1 2022-03-30T06:17:51+02:00 OPNsense.home opnsense 17446 - [meta sequenceId="70"] /usr/local/etc/rc.newwanipv6: On (IP address: ) (interface: WAN[wan]) (real interface: re0_vlan832).
<11>1 2022-03-30T06:24:19+02:00 OPNsense.home opnsense 62626 - [meta sequenceId="22"] /usr/local/etc/rc.newwanipv6: On (IP address: ) (interface: WAN[wan]) (real interface: re0_vlan832).
<11>1 2022-03-30T06:24:26+02:00 OPNsense.home opnsense 71258 - [meta sequenceId="28"] /usr/local/etc/rc.newwanip: On (IP address: 172.17.1.1) (interface: LAN832[opt1]) (real interface: em0_vlan832).
<11>1 2022-03-30T06:24:27+02:00 OPNsense.home opnsense 88682 - [meta sequenceId="48"] /usr/local/etc/rc.newwanipv6: On (IP address: ) (interface: WAN[wan]) (real interface: re0_vlan832).
<11>1 2022-03-30T06:28:38+02:00 OPNsense.home opnsense 31344 - [meta sequenceId="4"] /usr/local/etc/rc.newwanip: On (IP address: [MY IPV4 WAN ADDRESS]) (interface: WAN[wan]) (real interface: re0_vlan832).
<11>1 2022-03-30T06:28:38+02:00 OPNsense.home opnsense 36478 - [meta sequenceId="21"] /usr/local/etc/rc.newwanipv6: On (IP address: ) (interface: WAN[wan]) (real interface: re0_vlan832).
<11>1 2022-03-30T06:29:56+02:00 OPNsense.home opnsense 95394 - [meta sequenceId="24"] /usr/local/etc/rc.newwanipv6: On (IP address: ) (interface: WAN[wan]) (real interface: re0_vlan832).
<11>1 2022-03-30T06:29:57+02:00 OPNsense.home opnsense 7612 - [meta sequenceId="28"] /usr/local/etc/rc.newwanip: On (IP address: 172.17.1.1) (interface: LAN832[opt1]) (real interface: em0_vlan832).
<11>1 2022-03-30T06:29:59+02:00 OPNsense.home opnsense 73666 - [meta sequenceId="70"] /usr/local/etc/rc.newwanipv6: On (IP address: ) (interface: WAN[wan]) (real interface: re0_vlan832).
<11>1 2022-03-30T07:15:17+02:00 OPNsense.home opnsense 92011 - [meta sequenceId="22"] /usr/local/etc/rc.newwanipv6: On (IP address: ) (interface: WAN[wan]) (real interface: re0_vlan832).
<11>1 2022-03-30T07:15:24+02:00 OPNsense.home opnsense 8100 - [meta sequenceId="28"] /usr/local/etc/rc.newwanip: On (IP address: 172.17.1.1) (interface: LAN832[opt1]) (real interface: em0_vlan832).
<11>1 2022-03-30T07:15:25+02:00 OPNsense.home opnsense 24509 - [meta sequenceId="44"] /usr/local/etc/rc.newwanipv6: On (IP address: ) (interface: WAN[wan]) (real interface: re0_vlan832).
<11>1 2022-03-30T07:19:42+02:00 OPNsense.home opnsense 38451 - [meta sequenceId="4"] /usr/local/etc/rc.newwanip: On (IP address: [MY IPV4 WAN ADDRESS]) (interface: WAN[wan]) (real interface: re0_vlan832).
<11>1 2022-03-30T07:19:42+02:00 OPNsense.home opnsense 45566 - [meta sequenceId="21"] /usr/local/etc/rc.newwanipv6: On (IP address: ) (interface: WAN[wan]) (real interface: re0_vlan832).
<11>1 2022-03-30T07:21:00+02:00 OPNsense.home opnsense 25 - [meta sequenceId="24"] /usr/local/etc/rc.newwanipv6: On (IP address: ) (interface: WAN[wan]) (real interface: re0_vlan832).
<11>1 2022-03-30T07:21:01+02:00 OPNsense.home opnsense 9718 - [meta sequenceId="28"] /usr/local/etc/rc.newwanip: On (IP address: 172.17.1.1) (interface: LAN832[opt1]) (real interface: em0_vlan832).
<11>1 2022-03-30T07:21:03+02:00 OPNsense.home opnsense 83508 - [meta sequenceId="70"] /usr/local/etc/rc.newwanipv6: On (IP address: ) (interface: WAN[wan]) (real interface: re0_vlan832).

I think I understand the dilemma better now. Can somebody with the issue provide the following output on 22.1.4?

# opnsense-log | grep IP.address:

Thanks, Franco

@kevinchalet I assume that is still the case for you on 22.1?

Hi, I’m also using Orange France as ISP, with IPv6 interface tracking and I had the same issue since a long time. Just to add, I upgraded to 22.1 (and now 22.1.4) and the issue is still present.