IPv6: Disabilitare o Non Disabilitare?

Il supporto a IPv6 è stato introdotto in modo completo a partire dalle versioni di sistema operativo Windows Server 2008 e Windows Vista, mentre per quanto riguarda Windows Server 2003 e Windows XP SP1 il supporto per l’IPv6 andava installato manualmente a riguardo si vedano la KB2478747 How to install and uninstall IPv6 in Windows XP e la KB325449 Installazione e configurazione di IP versione 6 in Windows Server 2003 Enterprise Server.

Scendendo più nel dettaglio di come il supporto all’IPv6 sia stato migliorato a partire da Windows Server 2008 e Windows Vista è possibile analizzare come viene gestito a livello applicativo l’IPV6. A riguardo si veda l’articolo IPv6 Support pubblicato su MSDN in cui viene descritto quanto segue:

  • In Windows Server 2003 e Windows XP SP1 il supporto all’indirizzamento IPv4 e IPv6 veniva gestito creando due socket separati uno per IPv4 e uno per IPv6 e gestendo il listening degli stessi in modo separato.
  • A partire da Windows Server 2008 e Windows Vista è stata prevista la possibilità di creare un singolo socket tramite cui gestire sia il traffico IPv4 che IPv6. In altre parole è possibile creare ad esempio un listening socket TCP in modalità dual stack connesso alla porta 5001 che sarà in grado di accettare sia connessioni iPv4 che IPv6. Grazie a questa feature è possibile semplificare lo sviluppo di applicazioni e ridurre l’ overhead di risorse richiesto

image

La modifica architetturale che è stata apportata a partire da Windows Server 2008 e Windows Vista per gestire l’IPV6 tramite un Dual IP Layer anziché un Dual Stack implica anche che non è tecnicamente possibile rimuovere l’IPv6 dallo stack di rete (tcpip.sys).

Scendendo nel dettaglio dell’architettura dello stack TCP/IP introdotto a partire da Windows Server 2008 e Windows Vista si può notare come alcune tecnologie di transizione da IPv4 a IPv6 (ovvero 6to4, ISATAP e Teredo) sono integrate nativamente nel sistema operativo.

image

Per la precisione è possibile limitare alcune funzionalità del protocollo, ma non disabilitarlo. Infatti anche applicando le configurazioni illustrate nella KB 929852 How to disable IPv6 or its components in Windows sarà ancora possibile eseguire il ping verso il localhost tramite l’IPv6 (::1) perché l’interfaccia di lookback non viene disabilita in quanto il core del sistema operativo deve essere in grado di eseguire chiamate a determinate funzioni indipendentemente che siano o meno disponibili sulla rete esterna intesa come rete non locale.

Dal momento che a partire da Windows Server 2008 e Windows Vista IPv4 e IPv6  sono combinati all’interno dell’Tcpip.sys l’unico modo per disabilitare l’IPV6 è rimuovere il TCP/IP.

Infatti se si analizza con attenzione la KB 929852 How to disable IPv6 or its components in Windows si nota infatti che ciò che è possibile fare è agire sul valore DWORD DisabledComponents nella chiave di registro HKLM\SYSTEM\CurrentControlSet\Services\tcpip6\Parameters\ impostando un opportuna maschera di bits per disabilitare selettivamente o completamente i componenti dell’IPv6, ma non l’intero IPv6 e non tutte le sue funzionalità (come ad esempio l’interfaccia di loopback il ping sul localhost come visto precedentemente):

Type 0 to re-enable all IPv6 components (Windows default setting).

Type 0xff to disable all IPv6 components except the IPv6 loopback interface. This value also configures Windows to prefer using IPv4 over IPv6 by changing entries in the prefix policy table. For more information, see Source and destination address selection.

Type 0x20 to prefer IPv4 over IPv6 by changing entries in the prefix policy table.

Type 0x10 to disable IPv6 on all nontunnel interfaces (both LAN and Point-to-Point Protocol [PPP] interfaces).

Type 0x01 to disable IPv6 on all tunnel interfaces. These include Intra-Site Automatic Tunnel Addressing Protocol (ISATAP), 6to4, and Teredo.

Type 0x11 to disable all IPv6 interfaces except for the IPv6 loopback interface.

Di seguito il significato dei bit del valore DisabledComponents:

image

Mentre di seguito un riepilogo delle combinazioni di valori che può assumere valore DisabledComponents:

image

Le modifiche all’architettura dello stack TCP/IP introdotte a partire da Windows Server 2008 e Windows Vista implicano oltre all’impossibilità di disabilitare totalmente l’IPv6 anche il fatto che la disabilitazione delle componenti dell’IPv6 o l’unbinding dell’IPv6 dalla scheda di rete  non è raccomandato per una serie di ragioni in primis per evitare che alcune funzionalità del sistema operativo cessino di funzionare e ne rallentino l’avvio come indicato anche nella KB 929852 How to disable IPv6 or its components in Windows :

“Internet Protocol version 6 (IPv6) is a mandatory part of Windows Vista and later versions. We do not recommend that you disable IPv6 or its components, or some Windows components may not function. Additionally, system startup will be delayed for 5 seconds if IPv6 is disabled by incorrectly setting the DisabledComponents registry setting to a value of 0xfffffff. The correct value should be 0xff.”

Per un’analisi approfondita circa la differenza tra impostare DisabledComponents a 0xfffffff oppure a 0xff si veda il post A 5 Second Boot Optimization If You’ve Disabled IPv6 on Windows Client and Server by setting DisabledComponents to 0xFFFFFFFF:

“It was recently discovered that disabling IPv6 with the above registry value causes a 5 second boot delay in the Pre-Session Init Phase of OS startup.

OS versions impacted by the 5 second boot delay include Windows Vista, Windows 7, Windows 8 and Windows 8.1 clients. Affected server versions include Windows Server 2008, Server Windows Server 2008 R2, Windows Server 2012 and Windows Server 2012 R2. 5 second boot delays aren’t very interesting on servers that rarely reboot but are increasingly interesting on client operating systems, especially those that are configured with SSD disk drives where full OS (as opposed to wake from hibernate) boot times are approaching 30 seconds.”

In ogni caso la best practices da seguire su client e server è quella di lasciare i componenti dell’IPv6 abilitati come indicato nelle IPv6 for Microsoft Windows: Frequently Asked Questions:

Q. What are Microsoft’s recommendations about disabling IPv6?

A. It is unfortunate that some organizations disable IPv6 on their computers running Windows 7, Windows Vista, Windows Server 2008 R2, or Windows Server 2008, where it is installed and enabled by default. Many disable IPv6-based on the assumption that they are not running any applications or services that use it. Others might disable it because of a misperception that having both IPv4 and IPv6 enabled effectively doubles their DNS and Web traffic. This is not true.

From Microsoft’s perspective, IPv6 is a mandatory part of the Windows operating system and it is enabled and included in standard Windows service and application testing during the operating system development process. Because Windows was designed specifically with IPv6 present, Microsoft does not perform any testing to determine the effects of disabling IPv6. If IPv6 is disabled on Windows 7, Windows Vista, Windows Server 2008 R2, or Windows Server 2008, or later versions, some components will not function. Moreover, applications that you might not think are using IPv6—such as Remote Assistance, HomeGroup, DirectAccess, and Windows Mail—could be.

Therefore, Microsoft recommends that you leave IPv6 enabled, even if you do not have an IPv6-enabled network, either native or tunneled. By leaving IPv6 enabled, you do not disable IPv6-only applications and services (for example, HomeGroup in Windows 7 and DirectAccess in Windows 7 and Windows Server 2008 R2 are IPv6-only) and your hosts can take advantage of IPv6-enhanced connectivity.

L’IPv6 è stato inserito tra le Common Engineering Criteria (CEC) dei prodotti server ovvero nel set engineering requirements a cui tali prodotti devono essere compliance, per la matrice di supporto all’IPv6 dei prodotti e servizi Microsofts veda IPv6 Support in Microsoft Products and Services.

Per quanto riguarda gli issues che possono derivare dalla disabilitazione dei componenti e funzionalità dell’IPv6 si veda a esempio il post Arguments against disabling IPv6 in cui viene descritto come ad esempio l’UDP 389 utilizzata da LDAP smetta di rispondere come anche descritto nella KB816103 How to use Portqry to troubleshoot Active Directory connectivity issues:

“Be aware that the LDAP test over UDP may not work against domain controllers that are running Windows Server 2008. One reason for this can be that you have disabled IPv6 on the Domain Controller. To re-enable IPv6, set the value discussed in the article below to the default of “0”:”

Sempre nel post Arguments against disabling IPv6 viene descritto invece come in Exchange 2007 era consigliato disabilitare i componenti dell’IPv6 per consentire la funzionalità di Outlook Anywhere sul server che ospitava il ruolo Client Access, a riguardo di veda la KB2794253 Outlook Anywhere does not work if IPv6 is enabled on an Exchange Server 2007 multi-role server. Va però precisato che già in Exchange 2007 SP1 questo problema è stato risolto, a riguardo si veda il post IPv6 and Exchange 2007Disabling IPv6 And Exchange – Going All The Way e IP_V6 is a must if you are trying to install Exchange 2010. Per il dettaglio del supporto all’IPv6 in Exchange 2013 si veda IPv6 support in Exchange 2013, mentre per il supporto all’IPv6 in Lync 2013 si veda New IPv6 features in Lync Server 2013, Lync 2013 al contrario delle versioni precedenti supporta l’IPv6.

Nel libro Practical IPv6 for Windows Administrators viene riportato che il Microsoft clustering per default utilizza l’IPv6:

Clustering utilizes IPv6 when left with the default settings.
If you did not know this, trying to understand why clustering may not be working with Hyper-V virtual networking
and Network Virtualization with Generic Routing Encapsulation (NVGRE) could be difficult if you did not plan on
supporting IPv6 in your virtual network.

Sempre nel libro Practical IPv6 for Windows Administrators viene riportato che potrebbe essere consigliabile disabilitare le transition technologies (6to4, ISATAP e Teredo) a meno che i server e i client non partecipino ad una infrastruttura  DirectAccess:

“Best practices are to leave IPv6 ON but to disable all transition technologies. Specifically, turn OFF 6to4,

ISATAP , and Teredo on both Windows Server and Client hosts. If you are deploying DirectAccess then depending on your

design you may use one of the transition technologies. This is fine as the design is accounting for the specific use of the

transition technology.”

“Not all Windows servers would be required to participate in the ISATAP configuration.

Typically a domain controller, DNS server, Exchange Server CAS and UM role and/or a Lync Server plus file and print

servers, and a SharePoint server would be considered. By having those servers participate in the ISATAP deployment,

they are reachable from the DA clients. While previous versions of Lync had issues interoperating with DA, Lync 2013

has IPv6 support and can operate in a DA environment”

“As a general rule of thumb all three transition services should be disabled. If you have no specific solution

in place that uses these technologies TURN THEM OFF! Do make careful note that if you are doing a Microsoft

DirectAccess solution, you may indeed be using one of these. If so, you will need to make sure its configuration on

your platform OS matches the requirements for the deployment. The Get-NetTeredoState will not display any output

unless the Teredo state is active. This is how you can quickly verify if a Windows client is utilizing Teredo.”

Le versioni di SBS 2008 e 2011 presentavano problemi di avvio del sistema e di servizi se veniva eseguito l’unbind dell’IPv6 anziché impostare la chiave DisabledComponents a ffffffff, come rimportato nella KB 2677009 – Small Business Server 2011 starts slowly and many services do not start:

On a computer that is running Windows Small Business Server 2011 or Windows Small Business Server 2008, you might experience one or more of the following issues:

– Microsoft Exchange services do not start.

– The server stops responding while “Applying Computer Settings”, but can eventually log on in 30 to 60 minutes.

– The network icons show as offline.

Windows Small Business Server 2011 and Windows Small Business Server 2008 are designed to fully support IPv6. By default, IPv6 is enabled. Typically, you should never need to disable IPv6

Concludendo l’IPv6 è stato progettato per non avere impatti sulle infrastrutture in produzione e questo significa non vi sono degradi di performance come riportato nel post Arguments against disabling IPv6:

“IPv6 was designed to have no impact to the customer environment in production. No double queries, no DNS entries, no tunneling through the firewall, no performance degradation. If you feel like you have seen any of these and can provide data for troubleshooting, please feel free to open an incident with Microsoft so that we can discuss it.”

Per ulteriori approfondimenti si vedano anche i post sul blog Ask Premier Field Engineering (PFE) Platforms:

Per un articolo introduttivo sulle funzionalità dell’IPv6 si veda IPv6 Overview, inoltre vi ricordo che se desiderate approfondire l’IPv6 e le nuove funzionalità di Windows Server 2016 vi aspettiamo alla Server Infrastructure Days 2015 il 17 e 18 Giugno 2015 dove sarò presente con le sessioni WS01 // Implementing IPv6: Notes From the Field e WS04 // Windows Server: Implement Remote Desktop Services.