OPNsense Forum

Archive => 21.1 Legacy Series => Topic started by: blusens on June 17, 2021, 12:03:21 am

Title: Windows does not renew IPv6 via DHCPv6
Post by: blusens on June 17, 2021, 12:03:21 am
My Windows VMs are not renewing their DHCPv6 leases from Opnsense but Linux VMs don't have issues.

On a network with opn 2.1.6, the hosts don't renew unless I reboot or apply ipconfig /renew6 via cmd. On another network with opn 2.1.5, they won't renew even when I try /renew6. The sites and windows VMs are setup largely the same.

In wireshark I can see the RAs to ff02::01 (the lines are marked with pink if this matters).

How can I troubleshoot this?

Edit:
I believe I've encountered this (https://github.com/opnsense/core/issues/4691) open issue w/ regard to this part

On another network with opn 2.1.5, they won't renew even when I try /renew6.

If I restart the dhcpv6 service, then ipfconfig /renew6 works on the Windows host
Title: Re: Windows does not renew IPv6 via DHCPv6
Post by: blusens on June 19, 2021, 09:17:21 am
I've tried a variety of settings but I can't get to the bottom of this.

When I switch the Windows VMs to other test VLANs that have DHCPv6 and RA enabled, Windows picks up an IPv6 address and works. I've compared the wireshark icmpv6 RA packets and they look almost identical (LAN vs test  VLAN). It's not just the VMs, I've a baremetal Windows host with the same behavior.

The radvd settings for LAN and test VLAN interfaces look almost identical. I found only 2 differences between the them:

1. radvd for LAN shows and MTU of 1492 (same as WAN) whereas the test VLAN has an MTU of 1500. I've tried setting LAN AdvLinkTMU to 1500 in RAs but it's ignored and the generated radvd.conf file has 1492.

But I don't think that's the issue either. If I set an AdvLinkMTU of 1492 in the test VLAN when the interface has an MTU of 1500, Windows still works. When I set an interface MTU of 1492, it works.

So, I don't think MTU is the issue.

2. AdvRouteLifetime was 0 for LAN and 1800 for the test VLAN (even though the respective fields were left empty by default). So I've set an AdvRouteLifetime of 1800 for LAN with no effect.

I've enabled radvd logging with:
Code: [Select]
/usr/local/sbin/radvd -d 5 -p /var/run/radvd.pid -C /var/etc/radvd.conf -m logfile -l /var/log/radvd.log
but the only weird thing is this message via pppoe0 (WAN):

Code: [Select]
pppoe0 received icmpv6 RS/RA packet on an unknown interface with index 22

This is my generated radvd.conf file

Quote
# Automatically generated, do not edit
# Generated for DHCPv6 server lan
interface vtnet1 {
   AdvSendAdvert on;
   MinRtrAdvInterval 200;
   MaxRtrAdvInterval 600;
   AdvLinkMTU 1492;
   AdvDefaultPreference high;
   AdvManagedFlag on;
   AdvOtherConfigFlag on;
   prefix [LAN ipv6 prefix]::/64 {
      DeprecatePrefix off;
      AdvOnLink on;
      AdvAutonomous off;
   };
   route ::/0 {
      RemoveRoute off;
   };
   RDNSS [ipv6] {
   };
   DNSSL [local domain] {
   };
};
# Generated for DHCPv6 server opt12
interface vtnet1_vlan117 {
   AdvSendAdvert on;
   MinRtrAdvInterval 200;
   MaxRtrAdvInterval 600;
   AdvLinkMTU 1500;
   AdvDefaultPreference medium;
   AdvManagedFlag on;
   AdvOtherConfigFlag on;
   prefix [vlan ipv6 prefix]::/64 {
      DeprecatePrefix on;
      AdvOnLink on;
      AdvAutonomous off;
   };
   RDNSS [ipv6] {
   };
   DNSSL [local domain] {
   };
};