dns解析域名(Linux)

DNS客户端解析域名慢的问题Linux系统下域名解析的配置文件是/etc/resolv.conf]#cat /etc/resolv.conf# Generated by NetworkManageroptions single-request-reopennameserver 114.114.114.114nameserver 8.8.8.8nameserver 1.1.1.1nameserver 223.5.5.5nameserver 223.6.6.6LINUX DNS客户端解析缓慢的其中一个原因是CentOS 6/CentOS 7总是需要等待AAAA(IPv6)的结果,即使关闭IPv6也没什么卵用。CentOS 6/CentOS 7中的DNS解析器对于ipv4和ipv6都使用同一个socket接口(如上图),在同时发出ipv4和ipv6解析请求后,只会收到一个ipv4的解析响应,此时socket将一处于“等待”模式,等待ipv6的解析响应,故导致解析缓慢;添加single-request-reopen后就可以重新打开一个新的socket接收ipv6的解析响应,而不影响ipv4的解析响应。]#cat /etc/resolv.confoptions timeout:1 attempts:1 rotatenameserver 114.114.114.114nameserver 8.8.8.8nameserver 1.1.1.1nameserver 223.5.5.5nameserver 223.6.6.6rotate:这个参数的含义是随机选取一个作为查询的dns server,默认为按照顺序从上往下。timeout:查询一个nameserver的超时时间,单位是秒。系统缺省是5,最大可以设为30。设置为1S超 时即可attempts:这个是查询的整个都尝试一遍的次数,默认LINUX会发出好几次DNS查询包,让查一次即 可,浪费时间。下面提供一下DNS地址,可根据所属区域选择最优DNS国内常用公共DNS服务器地址阿里 AliDNS: (223.5.5.5; 223.6.6.6)百度 BaiduDNS: (180.76.76.76)114DNS (114.114.114.114, 114.114.115.115)114DNS安全版 (114.114.114.119, 114.114.115.119)114DNS家庭版 (114.114.114.110, 114.114.115.110)OneDNS 更新(117.50.11.11;117.50.22.22;112.124.47.27;114.215.126.16)DNS ONE(北方推荐:123.207.137.88;南方推荐:115.159.220.214)DNS TWO(北方推荐:122.114.245.45;南方推荐:115.159.96.69)DNS THREE(北方推荐:115.159.157.26 南方推荐:115.159.158.38)Dns派:电信/移动/铁通 (101.226.4.6, 218.30.118.6)Dns派:联通 (123.125.81.6, 140.207.198.6)OpenerDNS(42.120.21.30)CNNIC SDNS:(1.2.4.8;210.2.4.8)骆驼云安全 CamelYunDns 公共 dns:(63.223.94.66)腾讯DNSPod DNS+(推荐前两个119.29.29.29;119.28.28.28;182.254.118.118;182.254.116.116)中科大防污染DNS(电信202.141.162.123;电信202.141.178.13;教育网202.38.93.153;移动202.141.176.93)干净自由无劫持纯净DNS:(南方115.159.146.99 北方123.206.21.48)BAI DNS支持EDNS智能解析,无污染dns,快速安全 : (223.113.97.99)PdoMo-DNS(主DNS:101.132.183.99;辅DNS:193.112.15.186),可过滤广告,纯净无劫持FUN DNS(119.23.248.241)CuteDNS:高速DNS(原汁原味,高速解析): 华北 123.206.61.167;华南 119.29.105.234去广告DNS(可屏蔽广告及违法信息): 华北 101.236.28.23 ;华南 120.77.212.84我国首个IPv6公共DNS:首选DNS:240c::6666,备用DNS:240c::6644。P站DNS:主123.207.137.88,115.159.220.214 ;备115.159.146.99,123.206.21.48清华大学TUNA DNS666:101.6.6.6;2001:da8::666HI!XNS(纯净无劫持):40.73.101.101国内各省市DNS服务器地址黑龙江:202.97.229.133202.97.224.68219.150.32.132吉林:202.98.5.68202.98.14.18202.98.14.19辽宁:202.98.0.68202.96.75.68202.96.75.64202.96.69.38202.96.86.18202.96.86.24北京:202.96.199.133202.96.0.133202.106.0.20202.106.148.1202.97.16.195202.138.96.2天津:202.99.96.6810.10.64.68202.99.104.68河北:10.17.128.90保定DNS地址:202.99.160.68202.99.166.4陕西:202.100.13.11202.100.4.16山西:202.99.192.68202.99.198.6西安:202.100.4.15202.100.0.68山东:202.102.154.3202.102.152.3202.102.128.68202.102.134.68江苏:202.102.15.162202.102.29.3202.102.13.141202.102.24.35上海:202.96.199.132202.96.199.133202.96.209.5202.96.209.6202.96.209.133

本文出自快速备案,转载时请注明出处及相应链接。

本文永久链接: https://kuaisubeian.cc/34248.html

kuaisubeian