Skip to content

Latest commit

 

History

History
34 lines (26 loc) · 3.45 KB

connecting-using-ipv6.md

File metadata and controls

34 lines (26 loc) · 3.45 KB
title description author ms.author ms.date ms.service ms.subservice ms.topic helpviewer_keywords monikerRange
Connecting Using IPv6
Learn about support for IPv4 and IPv6 in SQL Server and SQL Server Native Client, and see how to configure the Database Engine for the address you want to use.
markingmyname
maghan
03/14/2017
sql
tools-other
conceptual
Internet Protocol
IPv4
IPv6
>=sql-server-2016

Connecting Using IPv6

[!INCLUDE SQL Server Windows Only] [!INCLUDEssNoVersion] and [!INCLUDEssNoVersion] Native Client fully support both Internet Protocol version 4 (IPv4) and Internet Protocol version 6 (IPv6). When Windows is configured with IPv6 [!INCLUDEssNoVersion], components automatically recognize the existence of IPv6. No special [!INCLUDEssNoVersion] configuration is necessary.

Support includes but is not limited to the following:

  • The [!INCLUDEssDEnoversion] and the other server components can listen on both IPv4 and IPv6 addresses at the same time. When both IPv4 and IPv6 are present, you can use [!INCLUDEssNoVersion] Configuration Manager to configure the [!INCLUDEssDE] to listen only on IPv4 addresses or only on IPv6 addresses.

  • When the [!INCLUDEssNoVersion] Browser service running on a machine that supports both IPv4 and IPv6 is queried on an IPv4 address, it responds with an IPv4 address and the first IPv4 TCP port in its list. When queried on an IPv6 address, it responds with an IPv6 address and the first IPv6 TCP port in its list. To avoid inconsistency, we recommend that the IPv4 and IPv6 listeners be configured to listen to the same port.

  • Tools such as [!INCLUDEssManStudioFull] and [!INCLUDEssNoVersion] Configuration Manager accept both IPv4 and IPv6 formats for IP addresses. In most cases, the connection string does not need to be modified if the <computer_name>\<instance_name> is specified using server hostname or fully qualified domain name (FQDN). If the server computer has both IPv4 and IPv6, its hostname or FQDN will be resolved into multiple IP addresses, including at least one IPv4 address and multiple IPv6 addresses. [!INCLUDEssNoVersion] Native Client attempts to establish connections using these IP addresses in the order received from TCP/IP and uses the first connection that succeeds. Because the order cannot be predicted by [!INCLUDEssNoVersion] Native Client, this should be regarded as random order. IPv4 addresses are attempted first if both IPv4 and IPv6 addresses are present. This logic is transparent to the users of ODBC, OLE DB, or ADO.NET.

    [!NOTE]
    If the [!INCLUDEssDE] is not listening on IPv4, the attempted IPv4 connection must wait for the time-out period before the IPv6 address is attempted. To avoid this, connect directly to the IPv6 IP address or configure an alias on the client with the IPv6 address.

See Also

SQL Server Configuration Manager