banner

[Rule] Rules  [Home] Main Forum  [Portal] Portal  
[Members] Member Listing  [Statistics] Statistics  [Search] Search  [Reading Room] Reading Room 
[Register] Register  
[Login] Loginhttp  | https  ]
 
Forum Index Thảo luận hệ điều hành Windows File Hosts trong Windows có ý nghĩa gì?  XML
  [Question]   File Hosts trong Windows có ý nghĩa gì? 19/03/2012 15:34:48 (+0700) | #1 | 259282
TSC.Style
Member

[Minus]    0    [Plus]
Joined: 29/04/2011 20:20:11
Messages: 38
Offline
[Profile] [PM]
Em chưa hiểu được tác dụng của file hosts trong Windows (C:\Windows\System32\driver\etc\hosts)
Tại sao khi sửa nó lại có thể truy cập được FaceBook khi nhà mạng chặn?
Khi xoá nó đi máy vẫn hoạt động bình thường smilie

Vâng em xin cảm ơn đã đọc topic ạ!
[Up] [Print Copy]
  [Question]   File Hosts trong Windows có ý nghĩa gì? 19/03/2012 16:10:23 (+0700) | #2 | 259286
[Avatar]
bolzano_1989
Journalist

[Minus]    0    [Plus]
Joined: 30/01/2007 12:49:15
Messages: 1406
Offline
[Profile] [PM]
Chapter 7 - Host Name Resolution
http://technet.microsoft.com/en-us/library/bb727005.aspx

The Hosts File

The Hosts file is a common way to resolve a host name to an IP address through a locally stored text file that contains IP-address-to-host-name mappings. On most UNIX-based computers, this file is /etc/hosts. On Windows-based computers, this file is the Hosts file in the systemroot\System32\Drivers\Etc folder.

The following describes the attributes of the Hosts file for Windows:

A single entry consists of an IP (IPv4 or IPv6) address and one or more host names.

The Hosts file is dynamically loaded into the DNS client resolver cache, which Windows Sockets applications use to resolve a host name to an IP address on both local and remote subnets.

When you create entries in the Hosts file and save it, its contents are automatically loaded into the DNS client resolver cache.

The Hosts file contains a default entry for the host name localhost.

The Hosts file can be edited with any text editor.

Each host name is limited to 255 characters.

Entries in the Hosts file for Windows–based computers are not case sensitive.

The advantage of using a Hosts file is that users can customize it for themselves. Each user can create whatever entries they want, including easy-to-remember nicknames for frequently accessed resources. However, the individual maintenance required for the Hosts file does not scale well to storing large numbers of FQDN mappings or reflecting changes to IP addresses for servers and network resources. The solution for the large-scale storage and maintenance of FQDN mappings is DNS. The solution for the maintenance of FQDN mappings for changing IP addresses is DNS dynamic update. For more information about DNS and DNS dynamic update, see Chapter 8, "Domain Name System Overview."

An entry in the Hosts file has the following format:

Address Name
The Address portion of the entry is either an IPv4 or IPv6 unicast address. The Names portion of the entry is one or more names (nicknames or FQDNs) separated by at least one space character. One or multiple space or tab characters must separate the address from the first name.

IPv4 Entries

For IPv4 entries, the address in the Hosts file entry is a unicast IPv4 address expressed in dotted decimal notation. For example, the following Hosts file contains IPv4 entries:

#
# Table of IP addresses and host names
#
127.0.0.1 localhost
131.107.34.1 router
172.30.45.121 server1.central.example.com s1
In this example, you can refer to the server at the IPv4 address 172.30.45.121 by its FQDN (server1.central.example.com) or by its nickname (s1). This example assumes that the IP address for the server named server1.central.example.com will not change over time. For example, either server1.central.example.com is manually configured with an IP address configuration or it uses a Dynamic Host Configuration Protocol (DHCP) client reservation.

IPv6 Entries

For IPv6 entries, the address in the Hosts file entry is a global or site-local IPv6 address expressed in colon hexadecimal notation. For example, the following Hosts file contains both IPv4 and IPv6 entries:

#
# Table of IP addresses and host names
#
127.0.0.1 localhost
131.107.34.1 router
172.30.45.121 server1.central.example.com s1
fec0::fa3:2aa:ff:fe9f:2a40 webv6.central.example.com w1
2001:db8::10:2aa:ff:fe21:5a88 tsrvv6.wcoast.example.com ts1
You should not place entries for link-local addresses in the Hosts file because you cannot specify the zone ID for those addresses. This concept is similar to using the Ping tool to ping a link-local destination without specifying the zone ID. Therefore, entries in the Hosts file are useful only for global or site-local IPv6 addresses. The example entry for the site-local address fec0::fa3:2aa:ff:fe9f:2a40 assumes that only a single site is being used. For more information about IPv6 addresses and the use of the zone ID, see Chapter 3, “IP Addressing.” 
Kiểm tra các file bạn nghi ngờ có virus:
http://goo.gl/m3Fb6C
http://goo.gl/EqaZt
http://goo.gl/gEF8e
Nhận mẫu virus qua FB: http://goo.gl/70Xo23
HVA Malware Response Team: kiemtravirus@gmail.com
Trợ giúp diệt virus: http://goo.gl/2bqxY
[Up] [Print Copy]
  [Question]   File Hosts trong Windows có ý nghĩa gì? 19/03/2012 17:00:58 (+0700) | #3 | 259288
TSC.Style
Member

[Minus]    0    [Plus]
Joined: 29/04/2011 20:20:11
Messages: 38
Offline
[Profile] [PM]
Dạ vâng đã hiểu smilie cảm ơn ạ!
[Up] [Print Copy]
[digg] [delicious] [google] [yahoo] [technorati] [reddit] [stumbleupon]
Go to: 
 Users currently in here 
1 Anonymous

Powered by JForum - Extended by HVAOnline
 hvaonline.net  |  hvaforum.net  |  hvazone.net  |  hvanews.net  |  vnhacker.org
1999 - 2013 © v2012|0504|218|