Simple clear advice in plain English

Hands On: Heavenly hosts

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

Reader Comments

   

Add your comment

All fields must be completed. Your email address will not be displayed or used to send marketing messages.

All messages will be checked by moderators before appearing on the site.

See our Privacy Policy for more information.

Related articles

Disable caps lock illustration

Disable the Caps Lock key

If you mistakenly press the Caps Lock key, you could be in for a lot of retyping once you've realised. We show you a couple of ways of disabling it

paint-net1

Edit images and photos with Paint.NET

This free image editor has all the tools you could need

Printing alert dialogue box

Can I get a message on my screen when my pages start printing?

Save time spent waiting by the printer by configuring Windows to send you an alert when your documents are printing

Question & Answer

Q.How do I store musician and other information about...

> Read the answer

Q.Why can't my browser find the website address I typed...

> Read the answer

Q.All updates have been downloaded, so why won't Windows...

> Read the answer

Best deals on the web

img

Apple MacBook Pro (MC724LL/A)

£999.99- Buy it now

img

Sony Vaio VPCF23P1E/B

£679.98- Buy it now

img

Sony Vaio VPCEH1J1E/W

£349.99- Buy it now

Great benefits for subscribers!

Poll

Which is your preferred web browser

Jargon Buster

Computing terms explained in plain English

CPU

Central Processing Unit. Another term for a computer processor.

Great shopping deals from Computeractive