Setting up and managing IPv6 on Windows Server 2016

Change of Address

Configuring IPv6 with netsh

The netsh command-line tool is used for IPv6 configuration from the command prompt, with

> netsh interface ipv6 add address

to configure IPv6 addresses. The syntax is as follows:

> netsh interface ipv6 add address interface=<interfacename|index> address=<IPv6_address>/<Prefix_length> type=unicast|anycast validlifetime=<time>|infinite preferredlifetime=<time>|infinite store=active|persistent

The individual options have the following meaning:

  • interface: Name of the interface's connection, adapter, or index.
  • address: IPv6 address (optionally followed by the length of the subnet prefix, 64 by default).
  • type: Type of IPv6 address; unicast (default) or anycast.
  • validlifetime: The lifetime for which the address is valid. This period must be specified in days, hours, minutes, and seconds (e.g., 1d2h3m4s. By default, the lifetime is infinite.
  • preferredlifetime: The period over which the address is preferred. It must be specified in days, hours, minutes, and seconds (e.g., 1d2h3m4s). The default value for this setting is infinite.
  • store: Specifies how to store the IPv6 address. Either active (the address is removed when the system is rebooted) or persistent (the address is retained when the system is rebooted, which is also the default setting).

Use the following example to configure the 1002:db6::281d:1283::1 IPv6 unicast address persistently for a LAN interface and with an unlimited lifetime:

> netsh interface ipv6 add address "LAN" 1002:db6::281d:1283::1

You can use

netsh interface ipv6 add route

to configure a default gateway and route, and you can manually set up the DNS servers for an IPv6 connection. To add DNS servers, use the command:

> netsh interface ipv6 add dnsserver interface=<Interfacename> address=<IPv6-Address> index=<Order>

By default, the DNS server is placed at the end of the list, but if you enter a value in index, the DNS server moves to the corresponding position in the list.

Creating Manual Routes for IPv6

To create manual routes for IPv6, do not use the route command as with IPv4, but again the netsh tool (or alternatively PowerShell). You can define a manual route for IPv6 as follows:

> netsh interface ipv6 add route prefix=<IPv6Address>/<Integer> interface=<Name|Index> nexthop=<IPv6Address> siteprefixlength=<Integer> metric=<Integer> publish=<value> validlifetime=<Integer>|Infinite preferredlifetime=<Integer> store=active|persistent

You can achieve the following by using the individual options:

  • prefix: Address or subnet prefix for which a route is added.
  • interface: Interface name or index.
  • nexthop: Next connection point in the network.
  • siteprefixlength: Prefix length for the entire location assigned to the router.
  • metric: Route metric.
  • publish: Represents a value of age, yes, or no, where age means that the route announcement contains the remaining validity period until deletion; yes means that the route is never deleted, regardless of the value of the validity period, and each route announcement contains the same specified validity period; and no means the route is not advertised. The no or age values ensure that the route is deleted after the validity period has expired.
  • validlifetime: The validity period of a route in days, hours, minutes, and seconds (approximately 1d2h3m4s). The default value is infinite.
  • preferredlifetime: The preferred period of the route's validity. By default, this value corresponds to the validity period.
  • store: With the active option, changes are only retained until the next system start; with persistent, the change is permanent (default).

Testing and Optimizing Name Resolution

If IPv4 and IPv6 are available on a network, Windows Server 2016 prioritizes traffic over IPv6. If it does not work properly, Windows Server 2016 detects this and automatically switches to IPv4 in the background. To test name resolution in Windows Server 2016, use the Resolve DNSname cmdlet in PowerShell, rather than the old nslookup command-line tool. This cmdlet is optimized for IPv6 and indicates whether certain zones use an IPv6 address.

Windows Server 2016 automatically adjusts the configuration of network connections, so settings can be confusing when you install AD. If you type nslookup at the command prompt after completing the AD installation on the DC, you might see somewhat confusing output. The server returns :1 as the address, because of the network connections configuration. First, call up the network connections' administration; the fastest way to do this is with ncpa.cpl in the Start menu. There, you call the IPv6 protocol's properties. You will see that Windows Server 2016 has activated the Use the following DNS server addresses option and stored the ::1 entry, which corresponds to 127.0.0.1 (localhost) for IPv4.

Configured in this way, the DNS server asks the local DNS server for reverse lookups with IPv6. Create an IPv6 reverse lookup zone and make sure there is a pointer to the server's IPv6 address. Activate the Obtain DNS server address automatically option or enter a valid IPv6 address. This configuration avoids the nslookup message.

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy ADMIN Magazine

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

  • Virtual networks with Hyper-V in Windows Server 2016
    Microsoft provides some interesting virtualization features in current and future versions of Windows Server. You can connect or isolate virtual machines, and Windows Server 2016 even supports virtual switches.
  • Software-defined networking with Windows Server 2016
    Windows Server 2016 takes a big step toward software-defined networking, with the Network Controller server role handling the centralized management, monitoring, and configuration of network devices and virtual networks. This service can also be controlled with PowerShell and is particularly interesting for Hyper-V infrastructures.
  • Configuring IPv6 in Windows with NetShell
    Windows provides a simple dialog box for configuring IPv6, but the available settings only scratch the surface. IPv6 comes with many features that are primarily managed using the command-line tool NetShell.
  • Policy-based DNS in Windows Server 2016
    Inflexible DNS name resolution was solved in Windows Server 2016, thanks to policy-based DNS.
  • Connecting Windows Server 2016 with Azure
    Microsoft continues to integrate Windows Server with the Azure cloud. With Cloud Witness and the RDS Connection Broker, you can operate distributed environments more reliably and efficiently, and SQL databases migrate sensibly into the cloud.
comments powered by Disqus