Avoiding DNS lookup via HOSTS file

I

Impatient

How can I find the IP addresses of sites so that I can
add them to my HOSTS file to save DNS lookup time?

Ideally, I'd like a tool that would return an IP address
given a URL.
 
I

Impatient

Thank you for your reply. nslookup seems to yield one or
more IP addresses that it calls "non-authoritative" and
which do not match IP addresses obtained by other means.

How does one incorporate multiple IP addresses
corresponding to a unique URL into a HOSTS file?
 
E

Elijah

the way that a host file works, at least on XP is that it will look like
this

------------------------start host file example---------------------------
# Copyright (c) 1993-1999 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

127.0.0.1 localhost
--------------------------end host file example---------------------------


So all you have to do is enter the host name (not the ip), and point it to
local host, and it will be blocked.

--
Elijah

"Hope this helps"


| Thank you for your reply. nslookup seems to yield one or
| more IP addresses that it calls "non-authoritative" and
| which do not match IP addresses obtained by other means.
|
| How does one incorporate multiple IP addresses
| corresponding to a unique URL into a HOSTS file?
|
|
|
|
| >-----Original Message-----
| >nslookup
| >
| >Cheers.
| >
| >>-----Original Message-----
| >>How can I find the IP addresses of sites so that I can
| >>add them to my HOSTS file to save DNS lookup time?
| >>
| >>Ideally, I'd like a tool that would return an IP
| address
| >>given a URL.
| >>.
| >>
| >.
| >
 
D

David

How can I find the IP addresses of sites so that I can
add them to my HOSTS file to save DNS lookup time?

Ideally, I'd like a tool that would return an IP address
given a URL.

I usually just ping the host. This will return an IP.

Pinging www.yahoo.akadns.net [66.218.71.90] with 32 bytes of data:

Reply from 66.218.71.90: bytes=32 time=26ms TTL=53
Reply from 66.218.71.90: bytes=32 time=23ms TTL=53
Reply from 66.218.71.90: bytes=32 time=21ms TTL=53
Reply from 66.218.71.90: bytes=32 time=30ms TTL=53

Ping statistics for 66.218.71.90:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 21ms, Maximum = 30ms, Average = 25ms

David
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top