« Previous 1 2 3 Next »
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) oranycast
.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 isinfinite
.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 isinfinite
.store
: Specifies how to store the IPv6 address. Eitheractive
(the address is removed when the system is rebooted) orpersistent
(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 ofage
,yes
, orno
, whereage
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; andno
means the route is not advertised. Theno
orage
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 (approximately1d2h3m4s
). The default value isinfinite
.preferredlifetime
: The preferred period of the route's validity. By default, this value corresponds to the validity period.store
: With theactive
option, changes are only retained until the next system start; withpersistent
, 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.
« Previous 1 2 3 Next »
Buy this article as PDF
(incl. VAT)
Buy ADMIN Magazine
Subscribe to our ADMIN Newsletters
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Most Popular
Support Our Work
ADMIN content is made possible with support from readers like you. Please consider contributing when you've found an article to be beneficial.