cloudbase / windows-imaging-tools

Tools to automate the creation of a Windows image for OpenStack, supporting KVM, Hyper-V, ESXi and more.
Apache License 2.0
684 stars 229 forks source link

IPv6 Not Working By Default In OpenStack Clouds on KVM Hosts #192

Closed timway closed 5 years ago

timway commented 6 years ago

Neutron doesn't support randomized EUI-64 addressing or privacy extensions. By default both of these settings are enabled in MS Windows. For sure in Windows 7 through 2012R2. This results in IPv6 addressing in the Horizon dashboard to show as what a normal EUI-64 address would be but when looking at the command-line inside the instance you'll see a different address. The result is a non-functioning IPv6 environment.

Below is a set of netsh commands that would disable them and reset the IP subsystem. These can be ran on a booted instance in an administrative prompt if the underlying cannot or won't be updated. These also could be inserted after line 30 in specialize.ps1 (https://github.com/cloudbase/windows-openstack-imaging-tools/blob/master/UnattendResources/Specialize.ps1#L30).

Switch to using EUI-64 derived interface IDs

netsh interface ipv6 set global randomizeidentifiers=disabled store=active netsh interface ipv6 set global randomizeidentifiers=disabled store=persistent

Disable IPv6 Privacy Extensions (RFC-4941, recommended in RFC to be disabled by default but Windows enabled it by default)

netsh interface ipv6 set privacy state=disabled store=active netsh interface ipv6 set privacy state=disabled store=persistent

You must enable and then disable all

netsh int ip reset

ader1990 commented 5 years ago

Issue solved by PR #290