domain-name-system – DNS服务器响应和超时

前端之家收集整理的这篇文章主要介绍了domain-name-system – DNS服务器响应和超时前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我们的局域网遇到了令人沮丧的问题.对我们的ISP名称服务器的DNS查询会定期超时,强制延迟5秒.即使我通过直接挖掘到我们的一个DNS服务器来绕过/etc/resolv.conf,我仍然会遇到问题.这是一个例子:
  1. mv-m-dmouratis:~ dmourati$time dig www.google.com @209.81.9.1
  2.  
  3. ; <<>> DiG 9.8.3-P1 <<>> www.google.com @209.81.9.1
  4. ;; global options: +cmd
  5. ;; Got answer:
  6. ;; ->>HEADER<<- opcode: QUERY,status: NOERROR,id: 14473
  7. ;; flags: qr rd ra; QUERY: 1,ANSWER: 5,AUTHORITY: 4,ADDITIONAL: 4
  8.  
  9. ;; QUESTION SECTION:
  10. ;www.google.com. IN A
  11.  
  12. ;; ANSWER SECTION:
  13. www.google.com. 174 IN A 74.125.239.148
  14. www.google.com. 174 IN A 74.125.239.147
  15. www.google.com. 174 IN A 74.125.239.146
  16. www.google.com. 174 IN A 74.125.239.144
  17. www.google.com. 174 IN A 74.125.239.145
  18.  
  19. ;; AUTHORITY SECTION:
  20. google.com. 34512 IN NS ns2.google.com.
  21. google.com. 34512 IN NS ns1.google.com.
  22. google.com. 34512 IN NS ns3.google.com.
  23. google.com. 34512 IN NS ns4.google.com.
  24.  
  25. ;; ADDITIONAL SECTION:
  26. ns2.google.com. 212097 IN A 216.239.34.10
  27. ns3.google.com. 207312 IN A 216.239.36.10
  28. ns4.google.com. 212097 IN A 216.239.38.10
  29. ns1.google.com. 212096 IN A 216.239.32.10
  30.  
  31. ;; Query time: 8 msec
  32. ;; SERVER: 209.81.9.1#53(209.81.9.1)
  33. ;; WHEN: Fri Jul 26 14:44:25 2013
  34. ;; MSG SIZE rcvd: 248
  35.  
  36.  
  37. real 0m5.015s
  38. user 0m0.004s
  39. sys 0m0.002s

其他时候,查询立即响应,大约在20毫秒左右.我做了一个数据包跟踪并发现了一些有趣的东西. DNS服务器正在响应,但客户端忽略初始响应,然后发送第二个相同的查询,该查询立即响应.

请参见packet trace.请注意查询的相同源端口(62076).

问题:导致第一个DNS查询失败的原因是什么?

UPDATE

资源:

包跟踪:

http://www.cloudshark.org/captures/8b1c32d9d015

Dtruss(strace for mac):

https://gist.github.com/dmourati/6115180

Mountain Lion防火墙随机延迟来自apple.stackexchange.com的DNS请求:

https://apple.stackexchange.com/questions/80678/mountain-lion-firewall-is-randomly-delaying-dns-requests

更新2

  1. System Software Overview:
  2.  
  3. System Version: OS X 10.8.4 (12E55)
  4. Kernel Version: Darwin 12.4.0
  5. Boot Volume: Macintosh HD
  6. Boot Mode: Normal
  7. Computer Name: mv-m-dmouratis
  8. User Name: Demetri Mouratis (dmourati)
  9. Secure Virtual Memory: Enabled
  10. Time since boot: 43 minutes
  11.  
  12. Hardware Overview:
  13.  
  14. Model Name: MacBook Pro
  15. Model Identifier: MacBookPro10,1
  16. Processor Name: Intel Core i7
  17. Processor Speed: 2.7 GHz
  18. Number of Processors: 1
  19. Total Number of Cores: 4
  20. L2 Cache (per Core): 256 KB
  21. L3 Cache: 6 MB
  22. Memory: 16 GB
  23.  
  24. Firewall Settings:
  25.  
  26. Mode: Limit incoming connections to specific services and applications
  27. Services:
  28. Apple Remote Desktop: Allow all connections
  29. Screen Sharing: Allow all connections
  30. Applications:
  31. com.apple.java.VisualVM.launcher: Block all connections
  32. com.getdropBox.dropBox: Allow all connections
  33. com.jetbrains.intellij.ce: Allow all connections
  34. com.skype.skype: Allow all connections
  35. com.yourcompany.Bitcoin-Qt: Allow all connections
  36. org.m0k.transmission: Allow all connections
  37. org.python.python: Allow all connections
  38. Firewall Logging: Yes
  39. Stealth Mode: No

解决方法

这似乎是Lion防火墙中的一个错误.它是否在您的系统上启用?

在这个MacRumors线程(DNS problems after updating to Mountain Lion (10.8))中,讨论了一种可能的解决方法

Try reducing MTU size.

System Preferences > Network > WiFi > Advanced > Hardware > Manually > MTU: Custom > 1300

Worked for me.

你能检查一下降低MTU大小是否可以缓解你的问题?

猜你在找的HTML相关文章