域名服务系统DIY
hosts.sam中地址的填写格式是:实际IP地址 要访问的域名
例如:202.109.72.54 www.cpcw.com
但是如何才能知道要访问域名的IP地址呢?
你知道PING命令吧,只要PING一下就知道了。
如:ping www.cpcw.com
Pinging www.cpcw.com [202.109.72.54] with 32 bytes of data:
Reply from 202.109.72.54: bytes=32 time=169ms TTL=245
Reply from 202.109.72.54: bytes=32 time=145ms TTL=245
Reply from 202.109.72.54: bytes=32 time=279ms TTL=245
Reply from 202.109.72.54: bytes=32 time=142ms TTL=245
Ping statistics for 202.109.72.54:
Packets:Sent=4,Received=4,Lost=0(0% loss),
Approximate round trip times in milli-seconds:
Minimum=142ms,Maximum=279ms,Average=183ms
因此,快把你常去的地方都PING一下吧。不过一次一次地PING太麻烦了,我写了一个批处理dns.bat文件,格式如下:
ping cn.yahoo.com >dnslist.txt
ping www.cpcw.com >>dnslist.txt
ping www.jiangmin.com.cn >>dnslist.txt
ping www.cfan.com.cn >>dnslist.txt
……
运行dns.bat后,从dnslist.txt就得到IP地址,再填写到hosts.sam中,你就可以自己做常用的DNS了。这样,可省去域名解析的时间,不但可提高上网速度,而且可节省RMB,就是当地的DNS出了故障也能照样在网上畅游。
下面是我的hosts.sam的一部分:
204.71.201.60 cn.yahoo.com
202.109.72.54 www.cpcw.com
202.106.184.108 www.jiangmin.com.cn
216.218.225.30 www.cfan.com.cn
202.96.140.100 www.newhua.com.cn
202.102.249.40 www.mydrivers.com
210.74.146.2 cniti.com
210.74.146.2 www.newsoft.com.cn
202.106.169.20 www.download.com.cn
202.103.64.137 hunantv.com
209.197.116.66 jxtv.com
203.93.27.8 www.cctv.com
202.106.168.78 go.163.com
202.96.44.133 www.263.net
202.102.13.160 990.net
202.106.186.237 www.email.com.cn
202.102.3.151 www.cn99.com
202.96.140.12 www.8u8.com
202.106.185.77 www.163.com
202.106.169.171 www.sohu.com.cn
168.160.22 4.177 www.tonghua.com.cn
210.78.144.79 dtf.top263.net
61.132.62.131 mud.jlonline.com
202.106.185.73 goldbook.yeah.net
202.101.224.77 www.nc.jx.cn
202.109.129.2 www.jx.cninfo.net
210.77.145.91 www.jk123.com.cn
202.101.254.77 www.rcnc.net
202.106.184.108 www.beareyes.net