多宿主计算机 - 无法在网络上通信

多宿主计算机 - 无法在网络上通信

我有两台多宿主服务器,它们通过一个私有网络和一个公共网络相互连接。我无法让流量通过私有网络。这些服务器仅使用公共网络 NIC 相互通信。这些服务器是托管 SQL Server 可用性组的 Windows 服务器。我在主机文件中添加了条目,以便主机名解析为私有网络上的 IP 地址。对主机名执行 ping 操作会解析为私有 IP,但是复制文件和堆栈中较高位置的内容似乎使用公共 IP。

我已将路由表和 ipconfig 粘贴在下面。

SQL1 服务器 1 公共 10.149.10.85 私有 192.168.10.27

SQL 服务器 2 公共 10.149.10.86 私有 192.168.10.26

路由表和 ipconfig SQL Server 1

C:\windows\system32>route print

===========================================================================

Interface List

  2...80 18 44 df 77 3b ......Broadcom NetXtreme Gigabit Ethernet #2

  4...02 e3 de 27 dc 51 ......Microsoft Failover Cluster Virtual Adapter

  3...80 18 44 df 77 39 ......Microsoft Network Adapter Multiplexor Driver

  7...80 18 44 df 77 3a ......Broadcom NetXtreme Gigabit Ethernet #3

  1...........................Software Loopback Interface 1

10...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter

11...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter #2

  9...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter #3

===========================================================================



IPv4 Route Table

===========================================================================

Active Routes:

Network Destination        Netmask          Gateway       Interface  Metric

       10.149.0.0    255.255.224.0         On-link      10.149.10.85    276

     10.149.10.28  255.255.255.255         On-link      10.149.10.85    276

     10.149.10.85  255.255.255.255         On-link      10.149.10.85    276

    10.149.31.255  255.255.255.255         On-link      10.149.10.85    276

        127.0.0.0        255.0.0.0         On-link         127.0.0.1    331

        127.0.0.1  255.255.255.255         On-link         127.0.0.1    331

  127.255.255.255  255.255.255.255         On-link         127.0.0.1    331

      169.254.0.0      255.255.0.0         On-link      169.254.1.25    271

     169.254.1.25  255.255.255.255         On-link      169.254.1.25    271

  169.254.255.255  255.255.255.255         On-link      169.254.1.25    271

      192.168.0.0      255.255.0.0         On-link     192.168.10.27    281

    192.168.10.27  255.255.255.255         On-link     192.168.10.27    281

  192.168.255.255  255.255.255.255         On-link     192.168.10.27    281

        224.0.0.0        240.0.0.0         On-link         127.0.0.1    331

        224.0.0.0        240.0.0.0         On-link     192.168.10.27    281

        224.0.0.0        240.0.0.0         On-link      169.254.1.25    271

        224.0.0.0        240.0.0.0         On-link      10.149.10.85    276

  255.255.255.255  255.255.255.255         On-link         127.0.0.1    331

  255.255.255.255  255.255.255.255         On-link     192.168.10.27    281

  255.255.255.255  255.255.255.255         On-link      169.254.1.25    271

  255.255.255.255  255.255.255.255         On-link      10.149.10.85    276

===========================================================================

Persistent Routes:

  Network Address          Netmask  Gateway Address  Metric

    192.168.10.26      255.255.0.0    192.168.10.26       1

    192.168.10.26      255.255.0.0    192.168.10.27       1

    192.168.10.26    255.255.255.0    192.168.10.26       1

===========================================================================



IPv6 Route Table

===========================================================================

Active Routes:

If Metric Network Destination      Gateway

  1    331 ::1/128                  On-link

  4    271 fe80::/64                On-link

  4    271 fe80::288d:f706:a1df:6aa2/128

                                    On-link

  1    331 ff00::/8                 On-link

  4    271 ff00::/8                 On-link

===========================================================================

Persistent Routes:

  None




C:\windows\system32>ipconfig /all



Windows IP Configuration



   Host Name . . . . . . . . . . . . : SQL1

   Primary Dns Suffix  . . . . . . . : mydomain.com

   Node Type . . . . . . . . . . . . : Hybrid

   IP Routing Enabled. . . . . . . . : No

   WINS Proxy Enabled. . . . . . . . : No

   DNS Suffix Search List. . . . . . : mydomain.com

                                       mydomain.com



Ethernet adapter NIC4:



   Media State . . . . . . . . . . . : Media disconnected

   Connection-specific DNS Suffix  . :

   Description . . . . . . . . . . . : Broadcom NetXtreme Gigabit Ethernet #2

   Physical Address. . . . . . . . . : 80-18-44-DF-77-3B

   DHCP Enabled. . . . . . . . . . . : Yes

   Autoconfiguration Enabled . . . . : Yes



Tunnel adapter Local Area Connection* 3:



   Connection-specific DNS Suffix  . :

   Description . . . . . . . . . . . : Microsoft Failover Cluster Virtual Adapter

   Physical Address. . . . . . . . . : 02-E3-DE-27-DC-51

   DHCP Enabled. . . . . . . . . . . : No

   Autoconfiguration Enabled . . . . : Yes

   Link-local IPv6 Address . . . . . : fe80::288d:f706:a1df:6aa2%4(Preferred)

   IPv4 Address. . . . . . . . . . . : 169.254.1.25(Preferred)

   Subnet Mask . . . . . . . . . . . : 255.255.0.0

   Default Gateway . . . . . . . . . :

   DHCPv6 IAID . . . . . . . . . . . : 67290756

   DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-21-77-91-3B-80-18-44-DF-77-38

   NetBIOS over Tcpip. . . . . . . . : Enabled



Ethernet adapter Team 1:



   Connection-specific DNS Suffix  . : mydomain.com

   Description . . . . . . . . . . . : Microsoft Network Adapter Multiplexor Driver

   Physical Address. . . . . . . . . : 80-18-44-DF-77-39

   DHCP Enabled. . . . . . . . . . . : No

   Autoconfiguration Enabled . . . . : Yes

   IPv4 Address. . . . . . . . . . . : 10.149.10.85(Preferred)

   Subnet Mask . . . . . . . . . . . : 255.255.224.0

   IPv4 Address. . . . . . . . . . . : 10.149.10.28(Preferred)

   Subnet Mask . . . . . . . . . . . : 255.255.224.0

   Default Gateway . . . . . . . . . :

   DNS Servers . . . . . . . . . . . : 10.149.10.11

                                       10.149.10.12

   NetBIOS over Tcpip. . . . . . . . : Enabled



Ethernet adapter NIC3:



   Connection-specific DNS Suffix  . :

   Description . . . . . . . . . . . : Broadcom NetXtreme Gigabit Ethernet #3

   Physical Address. . . . . . . . . : 80-18-44-DF-77-3A

   DHCP Enabled. . . . . . . . . . . : No

   Autoconfiguration Enabled . . . . : Yes

   IPv4 Address. . . . . . . . . . . : 192.168.10.27(Preferred)

   Subnet Mask . . . . . . . . . . . : 255.255.0.0

   Default Gateway . . . . . . . . . :

   NetBIOS over Tcpip. . . . . . . . : Enabled



Tunnel adapter isatap.mydomain.com:



   Media State . . . . . . . . . . . : Media disconnected

   Connection-specific DNS Suffix  . : mydomain.com

   Description . . . . . . . . . . . : Microsoft ISATAP Adapter

   Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0

   DHCP Enabled. . . . . . . . . . . : No

   Autoconfiguration Enabled . . . . : Yes



Tunnel adapter isatap.{D4F4B8DA-8B70-4022-8494-448BD24C80E7}:



   Media State . . . . . . . . . . . : Media disconnected

   Connection-specific DNS Suffix  . :

   Description . . . . . . . . . . . : Microsoft ISATAP Adapter #2

   Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0

   DHCP Enabled. . . . . . . . . . . : No

   Autoconfiguration Enabled . . . . : Yes



Tunnel adapter isatap.{308FA901-D05C-4A6E-9E87-CC4434A82133}:



   Media State . . . . . . . . . . . : Media disconnected

   Connection-specific DNS Suffix  . :

   Description . . . . . . . . . . . : Microsoft ISATAP Adapter #3

   Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0

   DHCP Enabled. . . . . . . . . . . : No

   Autoconfiguration Enabled . . . . : Yes

路由表和 ipconfig SQL Server 2

C:\windows\system32>route print

===========================================================================

Interface List

  3...80 18 44 df 80 b3 ......Broadcom NetXtreme Gigabit Ethernet #4

  4...02 0e ce 5d 94 7a ......Microsoft Failover Cluster Virtual Adapter

10...80 18 44 df 80 b1 ......Microsoft Network Adapter Multiplexor Driver

  2...80 18 44 df 80 b2 ......Broadcom NetXtreme Gigabit Ethernet

  1...........................Software Loopback Interface 1

  8...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter

  6...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter #2

  9...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter #3

===========================================================================



IPv4 Route Table

===========================================================================

Active Routes:

Network Destination        Netmask          Gateway       Interface  Metric

       10.149.0.0    255.255.224.0         On-link      10.149.10.86    276

     10.149.10.29  255.255.255.255         On-link      10.149.10.86    276

     10.149.10.86  255.255.255.255         On-link      10.149.10.86    276

    10.149.31.255  255.255.255.255         On-link      10.149.10.86    276

        127.0.0.0        255.0.0.0         On-link         127.0.0.1    331

        127.0.0.1  255.255.255.255         On-link         127.0.0.1    331

  127.255.255.255  255.255.255.255         On-link         127.0.0.1    331

      169.254.0.0      255.255.0.0         On-link      169.254.2.50    271

     169.254.2.50  255.255.255.255         On-link      169.254.2.50    271

  169.254.255.255  255.255.255.255         On-link      169.254.2.50    271

      192.168.0.0      255.255.0.0         On-link     192.168.10.26    281

    192.168.10.26  255.255.255.255         On-link     192.168.10.26    281

  192.168.255.255  255.255.255.255         On-link     192.168.10.26    281

        224.0.0.0        240.0.0.0         On-link         127.0.0.1    331

        224.0.0.0        240.0.0.0         On-link     192.168.10.26    281

        224.0.0.0        240.0.0.0         On-link      169.254.2.50    271

        224.0.0.0        240.0.0.0         On-link      10.149.10.86    276

  255.255.255.255  255.255.255.255         On-link         127.0.0.1    331

  255.255.255.255  255.255.255.255         On-link     192.168.10.26    281

  255.255.255.255  255.255.255.255         On-link      169.254.2.50    271

  255.255.255.255  255.255.255.255         On-link      10.149.10.86    276

===========================================================================

Persistent Routes:

  Network Address          Netmask  Gateway Address  Metric

    192.168.10.27      255.255.0.0    192.168.10.27       1

    192.168.10.27      255.255.0.0    192.168.10.26       1

    192.168.10.27    255.255.255.0    192.168.10.27       1

===========================================================================



IPv6 Route Table

===========================================================================

Active Routes:

If Metric Network Destination      Gateway

  1    331 ::1/128                  On-link

  4    271 fe80::/64                On-link

  4    271 fe80::8076:a706:66a8:8bd2/128

                                    On-link

  1    331 ff00::/8                 On-link

  4    271 ff00::/8                 On-link

===========================================================================

Persistent Routes:

  None








C:\windows\system32>ipconfig /all



Windows IP Configuration



   Host Name . . . . . . . . . . . . : SQL2

   Primary Dns Suffix  . . . . . . . : mydomain.com

   Node Type . . . . . . . . . . . . : Hybrid

   IP Routing Enabled. . . . . . . . : No

   WINS Proxy Enabled. . . . . . . . : No

   DNS Suffix Search List. . . . . . : mydomain.com

                                       mydomain.com



Ethernet adapter NIC4:



   Media State . . . . . . . . . . . : Media disconnected

   Connection-specific DNS Suffix  . :

   Description . . . . . . . . . . . : Broadcom NetXtreme Gigabit Ethernet #4

   Physical Address. . . . . . . . . : 80-18-44-DF-80-B3

   DHCP Enabled. . . . . . . . . . . : Yes

   Autoconfiguration Enabled . . . . : Yes



Tunnel adapter Local Area Connection* 3:



   Connection-specific DNS Suffix  . :

   Description . . . . . . . . . . . : Microsoft Failover Cluster Virtual Adapter

   Physical Address. . . . . . . . . : 02-0E-CE-5D-94-7A

   DHCP Enabled. . . . . . . . . . . : No

   Autoconfiguration Enabled . . . . : Yes

   Link-local IPv6 Address . . . . . : fe80::8076:a706:66a8:8bd2%4(Preferred)

   IPv4 Address. . . . . . . . . . . : 169.254.2.50(Preferred)

   Subnet Mask . . . . . . . . . . . : 255.255.0.0

   Default Gateway . . . . . . . . . :

   DHCPv6 IAID . . . . . . . . . . . : 67292029

   DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-21-76-80-77-80-18-44-DF-80-B2

   NetBIOS over Tcpip. . . . . . . . : Enabled



Ethernet adapter Team 1:



   Connection-specific DNS Suffix  . : mydomain.com

   Description . . . . . . . . . . . : Microsoft Network Adapter Multiplexor Driver

   Physical Address. . . . . . . . . : 80-18-44-DF-80-B1

   DHCP Enabled. . . . . . . . . . . : No

   Autoconfiguration Enabled . . . . : Yes

   IPv4 Address. . . . . . . . . . . : 10.149.10.86(Preferred)

   Subnet Mask . . . . . . . . . . . : 255.255.224.0

   IPv4 Address. . . . . . . . . . . : 10.149.10.29(Preferred)

   Subnet Mask . . . . . . . . . . . : 255.255.224.0

   Default Gateway . . . . . . . . . :

   DNS Servers . . . . . . . . . . . : 10.149.10.11

                                       10.149.10.12

   NetBIOS over Tcpip. . . . . . . . : Enabled



Ethernet adapter NIC3:



   Connection-specific DNS Suffix  . :

   Description . . . . . . . . . . . : Broadcom NetXtreme Gigabit Ethernet

   Physical Address. . . . . . . . . : 80-18-44-DF-80-B2

   DHCP Enabled. . . . . . . . . . . : No

   Autoconfiguration Enabled . . . . : Yes

   IPv4 Address. . . . . . . . . . . : 192.168.10.26(Preferred)

   Subnet Mask . . . . . . . . . . . : 255.255.0.0

   Default Gateway . . . . . . . . . :

   NetBIOS over Tcpip. . . . . . . . : Enabled



Tunnel adapter isatap.mydomain.com:



   Media State . . . . . . . . . . . : Media disconnected

   Connection-specific DNS Suffix  . : mydomain.com

   Description . . . . . . . . . . . : Microsoft ISATAP Adapter

   Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0

   DHCP Enabled. . . . . . . . . . . : No

   Autoconfiguration Enabled . . . . : Yes



Tunnel adapter isatap.{4F5724BA-E676-4C22-A804-E28360E94AFC}:



   Media State . . . . . . . . . . . : Media disconnected

   Connection-specific DNS Suffix  . :

   Description . . . . . . . . . . . : Microsoft ISATAP Adapter #2

   Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0

   DHCP Enabled. . . . . . . . . . . : No

   Autoconfiguration Enabled . . . . : Yes



Tunnel adapter isatap.{093FD353-FE5F-4FDC-A6E3-04DD46A18C82}:



   Media State . . . . . . . . . . . : Media disconnected

   Connection-specific DNS Suffix  . :

   Description . . . . . . . . . . . : Microsoft ISATAP Adapter #3

   Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0

   DHCP Enabled. . . . . . . . . . . : No

   Autoconfiguration Enabled . . . . : Yes

答案1

我今天在实验室环境中重现了您的问题。我看到的问题(与您的描述相符)确实是由 IPv6 引起的。机器首先尝试通过 IPv6 相互通信,并且它们通过非私有链路进行连接,因为该路由的成本较低(相同的网络)。

我运行了微软FixIt-20166选择 IPv4 而不是 IPv6,这样就解决了问题。然后,为了好玩,我恢复了更改(同一页面上有一个撤消包),并手动调整了私有链接上的 IPv6 地址,使它们位于没有额外跳数的公共网络上。在我的 DNS 中注册 IPv6 地址后(我在 SQL 中使用命名引用),流量开始通过 IPv6 使用私有链接。

除非您测试并得到不同的结果,否则我预计您也会遇到这种情况。IPv6 地址用于 SQL-SQL 通信,因为 Windows 更喜欢 v6;并且公共接口上的 IPv6 链接被视为比私有接口成本更低。这导致流量通过成本较低的(公共)接口传输。改变这种情况的方法是不要优先选择 IPv6(因此使用 v4 系列,并且您的私有接口成本会降低)或在私有链接上设置您的 IPv6 网络,以便降低成本(两台 PC 都在同一网络上)。

相关内容