为什么返回不同的 IP 地址序列?

为什么返回不同的 IP 地址序列?

当我两次使用 nslookup 查询 google.com 时,我得到的 IP 地址相同但顺序不同,为什么?这些是返回结果:服务器:129.173.1.100 地址:129.173.1.100#53

Non-authoritative answer:
Name:   google.com
Address: 74.125.226.169
Name:   google.com
Address: 74.125.226.174
Name:   google.com
Address: 74.125.226.160
Name:   google.com
Address: 74.125.226.161
Name:   google.com
Address: 74.125.226.162
Name:       google.com
Address: 74.125.226.163
Name:   google.com
Address: 74.125.226.164
Name:   google.com
Address: 74.125.226.165
Name:   google.com
Address: 74.125.226.166
Name:   google.com
Address: 74.125.226.167
Name:   google.com
Address: 74.125.226.168

第二次:

Server:     129.173.1.100
Address:    129.173.1.100#53

Non-authoritative answer:
Name:   google.com
Address: 74.125.226.167
Name:   google.com
Address: 74.125.226.168
Name:   google.com
Address: 74.125.226.169
Name:   google.com
Address: 74.125.226.174
Name:   google.com
Address: 74.125.226.160
Name:   google.com
Address: 74.125.226.161
Name:   google.com
Address: 74.125.226.162
Name:   google.com
Address: 74.125.226.163
Name:   google.com
Address: 74.125.226.164
Name:   google.com
Address: 74.125.226.165
Name:   google.com
Address: 74.125.226.166

任何回复都将非常感谢!!!

答案1

当您考虑到单个名称拥有多个 A 记录(即:DNS 循环)的主要目的是为了负载平衡时,大多数 DNS 服务器通过轮换返回的记录来实现这一点,这是有道理的。最多应用程序将使用返回的第一个记录(即使返回多个记录),因此轮换记录基本上执行了循环负载平衡功能。

相关内容