hosts文件的作用
hosts文件是一个没有扩展名的系统文件,它的主要作用是能加快域名解析,还可以屏蔽网站等
Hosts文件主要作用是定义IP地址和主机名的映射关系,是一个映射IP地址和主机名的规定。可以用文本文件打开!当用户在浏览器中输入一个需要登录的网址时,系统会首先自动从Hosts文件中寻找对应的IP地址,一旦找到,浏览器会立即打开对应网页,如果没有找到,则浏览器会将网址提交DNS服务器进行IP地址解析
hosts文件的位置是系统盘里面windows xp/2003/vista/2008/7/8用户HOSTS文件是在c:\windows\system32\drivers\etc
例子 比如你要访问局域网文件服务服务器\\wenjian1,一般资源管理器里面就可以打开,但是有一天打不开了,而文件服务器的ip是10.10.10.1确是ping通的,这时候只需要在hosts文件里面加入这么一条记录:# 10.10.10.1 wenjian1 即可
hosts文件修复:记事本方式打开hosts粘贴
# Copyright (c) 1993-2009 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host
# localhost name resolution is handled within DNS itself.
# 127.0.0.1 localhost
# ::1 localhost
电脑技巧 2021-07-14 08:24:21 通过 网页 浏览(289)
共有0条评论!