为什么无法从大陆 DNS 获取到 swcdn.apple.com 大陆地区的 CDN 地址?

2021-10-27 17:51:19 +08:00
 dn1095239

请教一下,我在本机上查询 swcdn.apple.com ,无论是国内还是国外的 DNS 都返回 akamai 的美国地址,导致下载速度奇慢:

$ nslookup swcdn.apple.com
Server:		223.5.5.5
Address:	223.5.5.5#53

Non-authoritative answer:
swcdn.apple.com	canonical name = swcdn.apple.com.akadns.net.
swcdn.apple.com.akadns.net	canonical name = swcdn.g.aaplimg.com.
swcdn.g.aaplimg.com	canonical name = swcdn-na-lb.apple.com.akadns.net.
swcdn-na-lb.apple.com.akadns.net	canonical name = swcdn.apple.com.edgesuite.net.
swcdn.apple.com.edgesuite.net	canonical name = a1271.dscgi3.akamai.net.
Name:	a1271.dscgi3.akamai.net
Address: 184.25.123.145
Name:	a1271.dscgi3.akamai.net
Address: 184.25.123.152


$ nslookup swcdn.apple.com 114.114.114.114
Server:		114.114.114.114
Address:	114.114.114.114#53

Non-authoritative answer:
swcdn.apple.com	canonical name = swcdn.apple.com.akadns.net.
swcdn.apple.com.akadns.net	canonical name = swcdn.g.aaplimg.com.
swcdn.g.aaplimg.com	canonical name = swcdn-na-lb.apple.com.akadns.net.
swcdn-na-lb.apple.com.akadns.net	canonical name = swcdn.apple.com.edgesuite.net.
swcdn.apple.com.edgesuite.net	canonical name = a1271.dscgi3.akamai.net.
Name:	a1271.dscgi3.akamai.net
Address: 184.25.123.152
Name:	a1271.dscgi3.akamai.net
Address: 184.25.123.145

但在路由器上同一个 DNS 又能获取到大陆 CDN:

root@z:~# nslookup swcdn.apple.com
Server:		223.5.5.5
Address:	223.5.5.5#53

Name:      swcdn.apple.com
swcdn.apple.com	canonical name = swcdn.apple.com.akadns.net
Name:      swcdn.apple.com.akadns.net
swcdn.apple.com.akadns.net	canonical name = swcdn-china-lb.dl-apple.com.akadns.net
Name:      swcdn-china-lb.dl-apple.com.akadns.net
swcdn-china-lb.dl-apple.com.akadns.net	canonical name = 8alnb0g00p9ast.mwcname.com
Name:      8alnb0g00p9ast.mwcname.com
Address 1: 111.124.71.242
Address 2: 49.79.232.34
Address 3: 124.232.174.197
Address 4: 111.124.71.206
Address 5: 111.124.71.244
Address 6: 124.232.174.199
Address 7: 180.101.30.53
Address 8: 61.147.211.205
Address 9: 124.232.174.198
Address 10: 113.125.197.95
Address 11: 124.232.174.14
Address 12: 124.232.174.196
Address 13: 183.134.27.20
swcdn.apple.com	canonical name = swcdn.apple.com.akadns.net
swcdn.apple.com.akadns.net	canonical name = swcdn-china-lb.dl-apple.com.akadns.net
swcdn-china-lb.dl-apple.com.akadns.net	canonical name = swcdn.apple.com.w.alikunlun.com

请问下这是什么原因?

3339 次点击
所在节点    宽带症候群
16 条回复
wonderblank
2021-10-27 18:00:08 +08:00
dig trace 一下
wonderblank
2021-10-27 18:00:35 +08:00
;; ANSWER SECTION:
swcdn.apple.com. 3578 IN CNAME 8alnb0g00p9ast.mwcname.com.
8alnb0g00p9ast.mwcname.com. 3578 IN A 36.156.208.240

64 bytes from 36.156.208.240: icmp_seq=0 ttl=51 time=13.051 ms

这是我解析出来的结果
dn1095239
2021-10-27 18:17:37 +08:00
```
$ dig @223.5.5.5 +trace swcdn.apple.com

; <<>> DiG 9.10.6 <<>> @223.5.5.5 +trace swcdn.apple.com
; (1 server found)
;; global options: +cmd
. 59299 IN NS f.root-servers.net.
. 59299 IN NS c.root-servers.net.
. 59299 IN NS e.root-servers.net.
. 59299 IN NS g.root-servers.net.
. 59299 IN NS i.root-servers.net.
. 59299 IN NS d.root-servers.net.
. 59299 IN NS l.root-servers.net.
. 59299 IN NS b.root-servers.net.
. 59299 IN NS a.root-servers.net.
. 59299 IN NS k.root-servers.net.
. 59299 IN NS h.root-servers.net.
. 59299 IN NS m.root-servers.net.
. 59299 IN NS j.root-servers.net.
. 59299 IN RRSIG NS 8 0 518400 20211108170000 20211026160000 14748 . fxvblquc0n0OVj6btUqmBH5KFX2Ez4PXT1B/2kO0nNr2F4CqbVJ1iOzB 9M0eEQGUvk/winR0O6qyq0vPpp/bDg9yEoWFnGAQK2gds98NCalUWpQz oSIwG587xwAApM5e3NpWI5HCHMSvYdF+8zKAMwyzPCssdtW4bafkb9jn D+c5co76GPI+y5/R2fF9Kl2Ll9Ka2mIt2JpW3myGhPMuYiApI7lTFGih diNZn6ssKR7rlCL6dSFHARII3fwFgBW/N6Qk4BgyMbcAdR3byhZY8IKb Fcm/QEoxkvHW3EAU2/bp3DQgWGmUekk8TYphpt5OcbU5TquB8WYBEeGY mu2eNg==
;; Received 525 bytes from 223.5.5.5#53(223.5.5.5) in 343 ms

swcdn.apple.com. 14 IN CNAME swcdn.apple.com.akadns.net.
swcdn.apple.com.akadns.net. 14 IN CNAME swcdn.g.aaplimg.com.
swcdn.g.aaplimg.com. 14 IN CNAME swcdn-na-lb.apple.com.akadns.net.
swcdn-na-lb.apple.com.akadns.net. 14 IN CNAME swcdn.apple.com.edgesuite.net.
swcdn.apple.com.edgesuite.net. 14 IN CNAME a1271.dscgi3.akamai.net.
a1271.dscgi3.akamai.net. 14 IN A 23.49.5.165
a1271.dscgi3.akamai.net. 14 IN A 23.49.5.170
;; Received 246 bytes from 192.112.36.4#53(g.root-servers.net) in 196 ms
```

也是返回 akamai 的
lingaoyi
2021-10-27 18:51:31 +08:00
17.253.85.204
这个蛮快阿。
datou
2021-10-27 21:11:08 +08:00
非权威应答:
名称: k128-swcdn.gslb.ksyuncdn.com
Address: 27.19.253.1
Aliases: swcdn.apple.com
swcdn.apple.com.akadns.net
swcdn-china-lb.dl-apple.com.akadns.net
swcdn.apple.com.download.ks-cdn.com

ping 27.19.253.1

正在 Ping 27.19.253.1 具有 32 字节的数据:
来自 27.19.253.1 的回复: 字节=32 时间=7ms TTL=57
来自 27.19.253.1 的回复: 字节=32 时间=7ms TTL=57
来自 27.19.253.1 的回复: 字节=32 时间=8ms TTL=57
来自 27.19.253.1 的回复: 字节=32 时间=6ms TTL=57
bclerdx
2021-10-27 22:10:24 +08:00
我的也解析到国内 IP 上。
loukky
2021-10-28 01:05:50 +08:00
C:\Users\wangw>dig swcdn.apple.com

; <<>> DiG 9.17.9 <<>> swcdn.apple.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 3767
;; flags: qr rd ra; QUERY: 1, ANSWER: 16, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;swcdn.apple.com. IN A

;; ANSWER SECTION:
swcdn.apple.com. 2521 IN CNAME swcdn.apple.com.akadns.net.
swcdn.apple.com.akadns.net. 91 IN CNAME swcdn.g.aaplimg.com.
swcdn.g.aaplimg.com. 1780 IN CNAME swcdn-china-lb.dl-apple.com.akadns.net.
swcdn-china-lb.dl-apple.com.akadns.net. 134 IN CNAME swcdn.apple.com.w.alikunlun.com.
swcdn.apple.com.w.alikunlun.com. 55 IN A 124.165.127.199
swcdn.apple.com.w.alikunlun.com. 55 IN A 116.177.224.242
swcdn.apple.com.w.alikunlun.com. 55 IN A 116.177.224.244
swcdn.apple.com.w.alikunlun.com. 55 IN A 116.177.224.238
swcdn.apple.com.w.alikunlun.com. 55 IN A 116.177.224.248
swcdn.apple.com.w.alikunlun.com. 55 IN A 124.165.127.206
swcdn.apple.com.w.alikunlun.com. 55 IN A 116.177.224.243
swcdn.apple.com.w.alikunlun.com. 55 IN A 124.165.127.205
swcdn.apple.com.w.alikunlun.com. 55 IN A 124.165.127.200
swcdn.apple.com.w.alikunlun.com. 55 IN A 116.177.224.240
swcdn.apple.com.w.alikunlun.com. 55 IN A 116.177.224.241
swcdn.apple.com.w.alikunlun.com. 55 IN A 116.177.224.239

;; Query time: 3 msec
;; SERVER: 192.168.11.1#53(192.168.11.1) (UDP)
;; WHEN: Thu Oct 28 01:04:02 ;; MSG SIZE rcvd: 406

虽然不是本地,但也是国内(这个是中科大返回的)
如果用自己搭建的 dns ,可以返回本地(因为设置了 edns )
szpunk
2021-10-28 03:25:47 +08:00
nslookup swcdn.apple.com 223.5.5.5 | nali --gbk
非权威应答:
服务器: public1.alidns.com
Address: 223.5.5.5 [浙江省杭州市 阿里巴巴阿里云 AliDNS 服务器]

名称: app.dl.ourdvs.com.cd23f.com
Addresses: 111.45.23.239 [广东省广州市 电信 IDC 机房]
120.240.100.43 [广东省揭阳市 移动]
111.45.23.230 [广东省广州市 电信 IDC 机房]
183.240.117.137 [广东省江门市 移动]
111.45.23.227 [广东省广州市 电信 IDC 机房]
120.232.176.57 [广东省广州市 移动]
120.232.176.36 [广东省广州市 移动]
120.240.100.49 [广东省揭阳市 移动]
111.45.23.218 [广东省广州市 电信 IDC 机房]
111.45.23.209 [广东省广州市 电信 IDC 机房]
111.45.23.210 [广东省广州市 电信 IDC 机房]
183.240.117.134 [广东省江门市 移动]
Aliases: swcdn.apple.com
swcdn.apple.com.akadns.net [Akamai CDN]
swcdn-china-lb.dl-apple.com.akadns.net [Akamai CDN]
8alnb0g00p9ast.mwcname.com [QUANTIL (网宿)]
haojunmei
2021-10-28 15:05:40 +08:00
服务器: public1.alidns.com
Address: 223.5.5.5

非权威应答:
名称: 8alnb0g00p9ast.mwcname.com
Addresses: 124.232.174.19
124.232.174.18
111.124.71.241
122.225.57.75
49.71.73.143
180.101.30.33
116.211.79.10
111.124.71.206
42.243.147.17
49.71.73.142
124.232.174.17
61.164.119.91
113.142.25.165
Aliases: swcdn.apple.com
swcdn.apple.com.akadns.net
swcdn-china-lb.dl-apple.com.akadns.net
JensenQian
2021-10-28 16:37:54 +08:00
Marionic0723
2021-10-28 18:48:34 +08:00
C:\Windows\system32>nslookup swcdn.apple.com
服务器: UnKnown
Address: 2408:8210:3076:3df0::1

非权威应答:
名称: swcdn.apple.com.w.alikunlun.com
Addresses: 125.39.103.239
125.39.103.248
125.39.103.241
125.39.103.242
125.39.103.236
125.39.103.240
125.39.103.238
125.39.103.237
Aliases: swcdn.apple.com
swcdn.apple.com.akadns.net
swcdn-china-lb.dl-apple.com.akadns.net

天津联通默认 DNS 正常
TomChaai
2021-10-28 23:56:45 +08:00
前几天有个人也是遇到 DNS 解析绕远路的问题,后来发现是自己反广告插件带了个国外 DNS 。
你自己排查下。
jousca
2021-10-29 00:23:29 +08:00
目测是楼主自己电脑系统的问题。

四川移动


ping swcdn.apple.com

正在 Ping swcdn.apple.com.w.alikunlun.com [112.45.30.241] 具有 32 字节的数据
来自 112.45.30.241 的回复: 字节=32 时间=3ms TTL=56
来自 112.45.30.241 的回复: 字节=32 时间=3ms TTL=56
来自 112.45.30.241 的回复: 字节=32 时间=3ms TTL=56
来自 112.45.30.241 的回复: 字节=32 时间=3ms TTL=56

112.45.30.241 的 Ping 统计信息:
数据包: 已发送 = 4 ,已接收 = 4 ,丢失 = 0 (0% 丢失),
往返行程的估计时间(以毫秒为单位):
最短 = 3ms ,最长 = 3ms ,平均 = 3ms
Kinnice
2021-10-29 11:20:56 +08:00
被你路由器上的某科技插件拦截并替换了 dns 请求
yaozijin
2023-02-10 02:45:39 +08:00
@szpunk 请问这是用什么软件测试的结果?
szpunk
2023-02-11 02:21:07 +08:00

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/811035

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX