How to Configure IPv6 on Windows Server 2012 R2
IPv6 is the successor to IPv4, offering a vastly larger address space (128-bit addresses versus IPv4’s 32-bit), improved routing efficiency, mandatory IPsec support, and built-in autoconfiguration capabilities. Windows Server 2012 R2 has first-class support for IPv6 and is actually designed to prefer IPv6 over IPv4 by default. While most organizations are still primarily IPv4-based, understanding and configuring IPv6 on Windows Server 2012 R2 is increasingly important as ISPs roll out IPv6 connectivity and as certain features like DirectAccess require IPv6 infrastructure. This guide covers configuring static and dynamic IPv6 addressing, IPv6 routing, and coexistence with IPv4 networks.
Prerequisites
You need Windows Server 2012 R2 with at least one network adapter. IPv6 is installed and enabled by default on Windows Server 2012 R2 — it should not be disabled. For static IPv6 addressing on an internal network, your IPv6 address block must be planned and allocated. For internet-facing IPv6, your ISP must provide IPv6 prefix assignments. For DHCPv6, a DHCPv6 server (or a router providing router advertisements) must be available on the network. Familiarity with IPv6 addressing, including prefix lengths, link-local, global unicast, and multicast addresses, is helpful.
Understanding IPv6 Address Types
Before configuring IPv6, understanding the address types is essential:
Link-Local Addresses (fe80::/10) — Automatically assigned to every IPv6-enabled interface. Used for local network communication only and are not routable beyond the local link. Global Unicast Addresses (2000::/3) — Globally routable IPv6 addresses, equivalent to public IPv4 addresses. Unique Local Addresses (fc00::/7) — Private IPv6 addresses for use within organizations, similar to RFC 1918 IPv4 private space. Loopback (::1) — Equivalent to IPv4’s 127.0.0.1.
Step 1: Verify IPv6 Status
Check the current IPv6 configuration on all interfaces:
Get-NetAdapter | Select-Object Name, Status
Get-NetIPAddress -AddressFamily IPv6 | Select-Object InterfaceAlias, IPAddress, PrefixLength, Type, AddressState
Verify IPv6 is enabled on the adapter:
Get-NetAdapterBinding -Name "Ethernet" | Where-Object {$_.ComponentID -eq "ms_tcpip6"} | Select-Object Name, DisplayName, Enabled
If IPv6 is disabled, enable it:
Enable-NetAdapterBinding -Name "Ethernet" -ComponentID "ms_tcpip6"
Step 2: Configure a Static Global Unicast IPv6 Address
Assign a static IPv6 address to a server interface. Using an example unique local address prefix for internal use:
# Assign a static IPv6 address
New-NetIPAddress -InterfaceAlias "Ethernet" `
-IPAddress "fd00:1234:5678:1::10" `
-PrefixLength 64 `
-DefaultGateway "fd00:1234:5678:1::1"
For a public IPv6 assignment from an ISP or address allocation:
New-NetIPAddress -InterfaceAlias "Ethernet" `
-IPAddress "2001:db8:abcd:1::10" `
-PrefixLength 64 `
-DefaultGateway "2001:db8:abcd:1::1"
Configure IPv6 DNS servers:
Set-DnsClientServerAddress -InterfaceAlias "Ethernet" `
-ServerAddresses "fd00:1234:5678:1::53", "2001:4860:4860::8888"
Step 3: Configure IPv6 DNS Registration
Configure whether the adapter registers its IPv6 addresses in DNS. This is important for ensuring servers and clients can find each other by name over IPv6:
Set-DnsClient -InterfaceAlias "Ethernet" `
-RegisterThisConnectionsAddress $true `
-UseSuffixWhenRegistering $true
# Set the primary DNS suffix
Set-DnsClientGlobalSetting -Suffix "contoso.com"
Step 4: Configure DHCPv6 and SLAAC
To configure the adapter to use Stateless Address Autoconfiguration (SLAAC) from router advertisements, or DHCPv6 for stateful addressing:
# Enable DHCP for IPv6 (stateful addressing from DHCPv6 server)
Set-NetIPInterface -InterfaceAlias "Ethernet" -AddressFamily IPv6 -Dhcp Enabled
# Verify autoconfiguration state
Get-NetIPInterface -InterfaceAlias "Ethernet" -AddressFamily IPv6 | Select-Object InterfaceAlias, AddressFamily, Dhcp, NlMtu, Forwarding
Step 5: Configure IPv6 Routing (Enabling IP Forwarding)
To make the server act as an IPv6 router — forwarding packets between interfaces — enable IPv6 forwarding:
# Enable IPv6 forwarding on all interfaces
Set-NetIPInterface -AddressFamily IPv6 -Forwarding Enabled
# Enable IPv6 forwarding on a specific interface
Set-NetIPInterface -InterfaceAlias "Ethernet" -AddressFamily IPv6 -Forwarding Enabled
Set-NetIPInterface -InterfaceAlias "Ethernet 2" -AddressFamily IPv6 -Forwarding Enabled
Add static IPv6 routes:
New-NetRoute -DestinationPrefix "fd00:1234:5678:2::/64" `
-InterfaceAlias "Ethernet" `
-NextHop "fd00:1234:5678:1::1" `
-RouteMetric 256
# Verify routing table
Get-NetRoute -AddressFamily IPv6 | Where-Object {$_.PrefixLength -lt 128} | Sort-Object DestinationPrefix | Format-Table DestinationPrefix, NextHop, RouteMetric, InterfaceAlias
Step 6: Configure Windows Firewall for IPv6
Windows Firewall rules apply to both IPv4 and IPv6 traffic by default when you specify an address family or use “Any”. However, it is good practice to explicitly allow necessary ICMPv6 types for proper IPv6 operation:
# Allow ICMPv6 (required for IPv6 neighbor discovery, SLAAC, etc.)
New-NetFirewallRule -DisplayName "ICMPv6-Allow" `
-Direction Inbound `
-Protocol ICMPv6 `
-IcmpType Any `
-Action Allow `
-Profile Any
# Verify existing ICMPv6 rules
Get-NetFirewallRule | Where-Object {$_.Protocol -eq "ICMPv6"} | Select-Object DisplayName, Enabled, Direction, Action
Step 7: Configure IPv6 DNS Server (if this server hosts DNS)
On a DNS server, enable listening for IPv6 DNS queries:
dnscmd /config /EnableIPv6 1
Add AAAA records for internal servers:
Add-DnsServerResourceRecord -ZoneName "contoso.com" `
-Name "dc01" `
-AAAA `
-IPv6Address "fd00:1234:5678:1::2"
Add-DnsServerResourceRecord -ZoneName "contoso.com" `
-Name "fileserver01" `
-AAAA `
-IPv6Address "fd00:1234:5678:1::10"
Step 8: Test IPv6 Connectivity
Verify end-to-end IPv6 connectivity using ping and traceroute:
# Ping the gateway
ping -6 fd00:1234:5678:1::1
# Ping another server
ping -6 fd00:1234:5678:1::2
# Test connectivity to an external IPv6 address
ping -6 2001:4860:4860::8888
# Trace route over IPv6
tracert -6 2001:4860:4860::8888
# Resolve a hostname using IPv6 DNS
Resolve-DnsName -Name "dc01.contoso.com" -Type AAAA
Adjusting IPv6 Precedence
Windows Server 2012 R2 prefers IPv6 when both IPv4 and IPv6 are available. To adjust precedence if needed, modify the IPv6 preference policy table:
# View current prefix policies
netsh interface ipv6 show prefixpolicies
# Lower IPv6 preference below IPv4 (NOT generally recommended)
# netsh interface ipv6 set prefixpolicy ::ffff:0:0/96 50 4
Summary
IPv6 on Windows Server 2012 R2 is a first-class capability that is enabled by default and offers advanced features for modern network deployments. Configuring static global unicast addresses, enabling IPv6 DNS registration, setting up IPv6 routing, and ensuring firewall rules allow IPv6 traffic properly positions Windows Server 2012 R2 for both current dual-stack environments and future IPv6-only deployments. Understanding IPv6 address types and autoconfiguration mechanisms is the foundation for all subsequent IPv6 infrastructure work.