How to use the Hosts file to resolve IP issues; and a look at some Windows 7 features
A Domain Name System (DNS) server translates domain names, that you and I can understand, such as www.google.com, into IP (Internet Protocol) addresses that identify computers on a network.
There are two versions of these addresses. IPv4 consists of a 32-bit binary number (ie a string of 32 ones or zeroes), but these are usually written as four groups of 0-255 decimal numbers separated by dots – eg 208.69.34.231.
This yields a little under 4,295 million combinations and I’m sure there’s a spurious quote somewhere about this being ‘enough for anybody’, but for comparison that figure is roughly two-thirds of the world’s population. Worse still, some blocks of IPv4 addresses are reserved. Experts believe we will run out of IPv4 addresses some time in 2010.
So welcome IPv6, which uses a 128-bit binary number, usually expressed as eight groups of four hexadecimal digits separated by colons. This yields addresses totalling around 34 followed by 37 zeroes, which, I dare say, should be enough for anyone.
You can find the IP address of a website with the Ping command. Open a command prompt, and type ‘ping www.google.com’. This will return the corresponding IP address. You can also see the domain name by typing ‘ping -a’ followed by an IP address.
There’s another way of resolving domain names to IP addresses, which doesn’t require the ministrations of a DNS server. This is the Hosts file on the PC itself, which in Windows XP and Vista is located at windows\system32\drivers\etc\ with the name Hosts and no extension. This location can be changed, so check by running the Registry Editor and going to
HKEY_LOCAL_MACHINE\SYSTEM \CurrentControlSet\Services\Tcpip\
Parameters where the actual location is given in the string value DataBasePath. You need to be logged on as an administrator to do this.
The Hosts file can cause problems, but it can also be used to protect your computer against malware. Open the Hosts file in Notepad and you’ll notice it contains several lines of comments. Following these, there may be a two-column list with IP addresses on the left and names on the right. In XP there’s just one line that reads:
127.0.0.1 localhost
Vista adds:
::1 localhost
which is the IPv6 equivalent.
Although IP addresses are unique, this only applies to a particular network. If you’re part of a peer-to-peer network your PC will probably have an IP address of the form 192.168.1.xxx, and the ‘local host’ of a computer is always 127.0.0.1.
Article tags
Related articles
Q.How do I store musician and other information about...
Q.Why can't my browser find the website address I typed...
Q.All updates have been downloaded, so why won't Windows...
A smartphone that's eye-catchingly different.
|
|
|
|
|
Nikon Coolpix S570 BlackPrice: £66.99 |
Computeractive Ultimate Guide - Storage, Sharing & BackupPrice: £5.99 |
Back Issue CD-Rom 13 (2010)Price: £14.99 |
Hallmark Card Studio DeluxePrice: £15.31 |
Marine AquariumPrice: £15.41 |