Windows通過hosts檔案解析域名
Windows通過hosts檔案解析域名
測試環境:windows 7 (31bit)
檔案路徑:
C:\Windows\System32\drivers\etc\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
增加一行:
192.168.9.248 szpuppet.server.com
測試:
C:\Users\dong.du>ping szpuppet.server.com
正在 Ping szpuppet.server.com [192.168.9.248] 具有 32 位元組的資料:
來自 192.168.9.248 的回覆: 位元組=32 時間=1ms TTL=62
來自 192.168.9.248 的回覆: 位元組=32 時間=1ms TTL=62
來自 192.168.9.248 的回覆: 位元組=32 時間=1ms TTL=62
192.168.9.248 的 Ping 統計資訊:
資料包: 已傳送 = 3,已接收 = 3,丟失 = 0 (0% 丟失),
往返行程的估計時間(以毫秒為單位):
最短 = 1ms,最長 = 1ms,平均 = 1ms
Control-C
^C
C:\Users\dong.du>
測試環境:windows 7 (31bit)
檔案路徑:
C:\Windows\System32\drivers\etc\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
增加一行:
192.168.9.248 szpuppet.server.com
測試:
C:\Users\dong.du>ping szpuppet.server.com
正在 Ping szpuppet.server.com [192.168.9.248] 具有 32 位元組的資料:
來自 192.168.9.248 的回覆: 位元組=32 時間=1ms TTL=62
來自 192.168.9.248 的回覆: 位元組=32 時間=1ms TTL=62
來自 192.168.9.248 的回覆: 位元組=32 時間=1ms TTL=62
192.168.9.248 的 Ping 統計資訊:
資料包: 已傳送 = 3,已接收 = 3,丟失 = 0 (0% 丟失),
往返行程的估計時間(以毫秒為單位):
最短 = 1ms,最長 = 1ms,平均 = 1ms
Control-C
^C
C:\Users\dong.du>
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29500582/viewspace-1745241/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 通過 hosts檔案配置本地域名
- windows 修改hosts檔案Windows
- 修改hosts檔案(windows和Ubuntu)WindowsUbuntu
- Ubuntu下修改hosts檔案中的域名對映Ubuntu
- hosts檔案格式說明,為什麼還有域名配置
- Windows 機器通過 FTP 上傳檔案WindowsFTP
- hosts檔案位置
- Mac電腦hosts檔案如何修改?macOS修改Hosts檔案教程Mac
- 淺談hosts檔案
- 繫結Hosts檔案
- windows下的IP地址解析方式,windows下的/etc/hostsWindows
- mac 修改 /etc/hosts 檔案Mac
- ubuntu下修改hosts檔案Ubuntu
- 病毒感染hosts檔案!
- /etc/hosts檔案簡介
- 解決Windows10沒有修改hosts檔案許可權Windows
- DNS域名解析過程DNS
- hosts檔案如何修改 hosts檔案修改後無法儲存怎麼解決
- 修改hosts檔案的小程式
- 修改並儲存hosts檔案
- Dropbox的可用Hosts檔案
- 又是hosts檔案的問題
- 通過公網ip或域名下載自己的檔案的一些思路
- 域名解析導致資料庫連線緩慢(hosts :files dns)資料庫DNS
- 通過trace檔案重新建立控制檔案
- windows下將隱藏檔案通過命令列改變為普通的顯示檔案Windows命令列
- win10 系統如何修改hosts檔案_win10要怎麼修改hosts檔案Win10
- Nginx通過域名代理tcp埠NginxTCP
- windows客戶端通過指令碼檔案新增信任站點薦Windows客戶端指令碼
- Ubuntu系統中修改hosts檔案Ubuntu
- linux下檢視hosts檔案Linux
- hosts.equiv和.rhosts檔案(轉)UI
- win10 如何修改 hosts_win10如何修改hosts檔案Win10
- Win10電腦如何修改hosts檔案 win10系統修改hosts檔案的方法Win10
- 通過配置檔案(.htaccess)實現檔案上傳
- Qt通過Http上傳檔案(路過)QTHTTP
- 通過Wireshark抓包分析談談DNS域名解析的那些事兒DNS
- 前端通過 post 下載檔案前端