IPv6 for Windows Admins (Part 3)

If you would like to read the other parts in this article series please go to:

Introduction

In the first article of this series we began by painting the big picture concerning IPv6 and explained how nodes can be identified on an IPv6 network. Then in the second article we examined the different types of IPv6 addresses and what they can be used for since IPv6 uses several different kinds of addresses with each of which being used for a different purpose. In this next article we’re going to examine some different ways how IP addresses can be manually assigned to nodes on your network. As mentioned in the previous articles, the explanation and procedures included below are largely adapted from my book Training Guide: Installing and Configuring Windows Server 2012 R2 (Microsoft Press, 2014) which is available from http://www.amazon.com/exec/obidos/ASIN/0735684332/”. Also included at the end of this short series are some additional tips and gotchas on this subject that I’ve gleaned from the larger IT pro community including the almost 100,000 followers of our WServerNews weekly newsletter which you can subscribe to at http://www.wservernews.com/subscribe.htm.

IPv6 address assignment

On IPv4 networks, you can assign addresses to interfaces in three ways: manually by using static addresses, dynamically by using DHCP, or automatically by using APIPA. Administrators of small networks often configure IPv4 addresses manually, and midsize to large organizations usually use DHCP. Automatic address configuration using APIPA is usually done only on very small networks such as a home or office LAN that connects to the Internet using a DSL router.

Address assignment on IPv6 networks is somewhat different. IPv6 addresses can be assigned to an interface by doing the following:

  • Manually configuring one or more IPv6 addresses on the interface
  • Stateful address autoconfiguration using a DHCPv6 server
  • Stateless address autoconfiguration based on the receipt of Router Advertisement messages
  • Both stateful and stateless address autoconfiguration

In addition, a link-local address is always automatically configured on an interface regardless of whether stateful or stateless address autoconfiguration is being used.

The main difference, however, between address assignment in IPv6 and in IPv4 is that the IPv6 protocol was designed to be autoconfiguring. This means that in most cases, you will neither need to assign addresses manually nor deploy a DHCPv6 server; instead, you can use stateless address autoconfiguration for most of your network hosts. This means that in contrast to physical interfaces (network adapters) on IPv4 hosts, which are usually single-homed (have only a single address assigned), most physical interfaces on IPv6 hosts are multihomed (have multiple addresses assigned). Specifically, a physical IPv6 interface usually has at least two addresses:

  • An automatically generated link-local address, which is used for traffic on the local link
  • An additional unicast address (either a global address or a unique local address), which is used for traffic that needs to be routed beyond the local link

Manual address assignment

Manual assignment of IPv6 addresses is generally done only in two scenarios:

  • For certain servers on your network
  • On most router interfaces

On a computer running Windows Server 2012 or Windows Server 2012 R2, you can manually configure an IPv6 address using any of the following methods:

  • By opening the Internet Protocol Version 6 (TCP/IPv6) Properties dialog box from the properties of an interface in the Network Connection folder and configuring the IPv6 address, subnet prefix length, default gateway, and DNS server addresses as shown in Figure 1.
  • By using the New-NetIPAddress and Set-DnsClientServerAddress cmdlets of Windows PowerShell
  • By using commands from the netsh interface ipv6 context of the Netsh.exe command-line utility

Image
Figure 1: A screen shot showing the Internet Protocol Version 6 (TCP/IPv6) Properties dialog box, which can be used to manually configure an IPv6 address in Windows Server 2012 and Windows Server 2012 R2.

The following is an example of using Windows PowerShell to manually configure an IPv6 address on a physical interface of a computer running Windows Server 2012 or Windows Server 2012 R2. First, here is the output from running the Ipconfig command on the server:

PS C:\> ipconfig
Windows IP Configuration
Ethernet adapter Ethernet:
   Connection-specific DNS Suffix  . :
   Link-local IPv6 Address . . . . . : fe80::2025:61fb:b68:c266%12
   IPv4 Address. . . . . . . . . . . : 172.16.11.75
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Default Gateway . . . . . . . . . : 172.16.11.1
Tunnel adapter isatap.{DD59BFFD-706A-4685-9073-647788046335}:
   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . :
Tunnel adapter Teredo Tunneling Pseudo-Interface:
   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . :

From the preceding command, you can see that the physical interface named Ethernet has two addresses assigned:

  • The IPv4 address 172.16.11.75
  • The link-local IPv6 address fe80::2025:61fb:b68:c266%12

The %12 appended to the link-local address is called a zone identifier and is used to specify the link on which the address is located. On Windows platforms, the zone identifier is equal to the index of the interface, and you can use the Get-NetAdapter cmdlet to display a list of names and indexes of physical interfaces on computers running Windows Server 2012 or Windows Server 2012 R2 as follows:

PS C:\> Get-NetAdapter | fl Name,ifIndex
 
Name    : Ethernet
ifIndex : 12

Instead of using the Ipconfig command, you can also use the Get-NetIPAddress cmdlet as follows to display the address information for the interface named Ethernet:

PS C:\> Get-NetIPAddress | where {$_.InterfaceAlias -eq "Ethernet"}
 
IPAddress         : fe80::2025:61fb:b68:c266%12
InterfaceIndex    : 12
InterfaceAlias    : Ethernet
AddressFamily     : IPv6
Type              : Unicast
PrefixLength      : 64
PrefixOrigin      : WellKnown
SuffixOrigin      : Link
AddressState      : Preferred
ValidLifetime     : Infinite ([TimeSpan]::MaxValue)
PreferredLifetime : Infinite ([TimeSpan]::MaxValue)
SkipAsSource      : False
PolicyStore       : ActiveStore
 
IPAddress         : 172.16.11.75
InterfaceIndex    : 12
InterfaceAlias    : Ethernet
AddressFamily     : IPv4
Type              : Unicast
PrefixLength      : 24
PrefixOrigin      : Manual
SuffixOrigin      : Manual
AddressState      : Preferred
ValidLifetime     : Infinite ([TimeSpan]::MaxValue)
PreferredLifetime : Infinite ([TimeSpan]::MaxValue)
SkipAsSource      : False
PolicyStore       : ActiveStore

Note how the preceding cmdlet output is more informative than the output from the Ipconfig command.

You can use the NewNetIPAddress cmdlet to assign a new global unicast IPv6 address with prefix length 64 and also a default gateway address to the Ethernet interface as follows:

PS C:\> New-NetIPAddress -InterfaceAlias "Ethernet" -IPAddress 2001:DB8:3FA9::D3:9C5A `
-PrefixLength 64 -DefaultGateway 2001:DB8:3FA9::0C01
 
IPAddress         : 2001:db8:3fa9::d3:9c5a
InterfaceIndex    : 12
InterfaceAlias    : Ethernet
AddressFamily     : IPv6
Type              : Unicast
PrefixLength      : 64
PrefixOrigin      : Manual
SuffixOrigin      : Manual
AddressState      : Tentative
ValidLifetime     : Infinite ([TimeSpan]::MaxValue)
PreferredLifetime : Infinite ([TimeSpan]::MaxValue)
SkipAsSource      : False
PolicyStore       : ActiveStore
 
IPAddress         : 2001:db8:3fa9::d3:9c5a
InterfaceIndex    : 12
InterfaceAlias    : Ethernet
AddressFamily     : IPv6
Type              : Unicast
PrefixLength      : 64
PrefixOrigin      : Manual
SuffixOrigin      : Manual
AddressState      : Invalid
ValidLifetime     : Infinite ([TimeSpan]::MaxValue)
PreferredLifetime : Infinite ([TimeSpan]::MaxValue)
SkipAsSource      : False
PolicyStore       : PersistentStore

To verify the result, you can use the Get-NetIPAddress cmdlet with the –AddressFamily parameter to display only IPv6 addressing information as follows:

PS C:\> Get-NetIPAddress -AddressFamily IPv6 | where {$_.InterfaceAlias -eq "Ethernet"}
 
IPAddress         : fe80::2025:61fb:b68:c266%12
InterfaceIndex    : 12
InterfaceAlias    : Ethernet
AddressFamily     : IPv6
Type              : Unicast
PrefixLength      : 64
PrefixOrigin      : WellKnown
SuffixOrigin      : Link
AddressState      : Preferred
ValidLifetime     : Infinite ([TimeSpan]::MaxValue)
PreferredLifetime : Infinite ([TimeSpan]::MaxValue)
SkipAsSource      : False
PolicyStore       : ActiveStore
 
IPAddress         : 2001:db8:3fa9::d3:9c5a
InterfaceIndex    : 12
InterfaceAlias    : Ethernet
AddressFamily     : IPv6
Type              : Unicast
PrefixLength      : 64
PrefixOrigin      : Manual
SuffixOrigin      : Manual
AddressState      : Preferred
ValidLifetime     : Infinite ([TimeSpan]::MaxValue)
PreferredLifetime : Infinite ([TimeSpan]::MaxValue)
SkipAsSource      : False
PolicyStore       : ActiveStore

The interface is now multihomed because it has one link-local IPv6 address and one global IPv6 address. Opening the Internet Protocol Version 6 (TCP/IPv6) Properties dialog box displays the expected manually configured address information, as shown in Figure 2.

Image
Figure 2: A screen shot showing the Internet Protocol Version 6 (TCP/IPv6) Properties dialog box, which verifies that the IP address settings were successfully configured using Windows PowerShell.

To configure preferred and alternate DNS servers for this interface, use the Set-DnsClientServerAddress cmdlet. For more information on Net TCP/IP and DNS client cmdlets, see the following TechNet Library pages:

In the next and final article of this series we’ll examine how IP addresses can be automatically assigned to nodes on your network.

If you would like to read the other parts in this article series please go to:

About The Author

Leave a Comment

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Scroll to Top