[Webinar] Streamline your web hosting managementRegister Today


how to find a computer on the internet

Posted on 2001-09-04
Medium Priority
Last Modified: 2008-02-01
how a particular site/machine is traced on the internet
Certainly it involves the resolution of domain name to ip address but i require more clarification on

1.where does the domain name is resolved i.e. on which DNS server.

2.how does it traces path to the machine that contains a particular resource that is to be accessed.

Question by:yaser_

Accepted Solution

packratt_jk earned 200 total points
ID: 6454743
dns is resolved by the primary dns server, which takes care of finding the dns->ip mapping if it doesn't already have it cached.  If you use nslookup it will tell you what dns server responded (that is prolly your primary)

as for the 'trace' part, i'm assuming you are talking about traceroute.  If you are asking how a packet gets from one computer to another, you're in a much bigger pond - go read a book on ip.  Anyway, all packets have a ttl (a maximum number of routers the packet can go through before it 'dies').  Once the ttl reaches zero, an ICMP error message is sent back to the original sender.  So, traceroute tricks the system by setting the ttl to zero to begin with, then records where the ICMP error comes from.  Then it ups the ttl to one, then 2, 3, 4, 5 and so on - until it recieves an error reply from the destination.

assume (in the diagram below) that A-F are all computers, your computer being A, and the destination being F.  We'll assume that the ip addresses of these computers are all on the same subnet, with sequential ip addresses ( ~
now, we know that:
nslookup A will give us, etc, etc

A         B         C         D        E       F

Now, normally, you don't care about B-E (only about F).
To find out about B-E, we use traceroute.
So, traceroute sends out a packet with a ttl of 1 towards F.
Now, B recieves the packet, decreases the ttl to 0, realizes the packet's life expired, and sends an error message back to A.
Next, A sends out a packet with a ttl of 2.  B recieves the packet, decrements the ttl to 1, and sends it further.  C recieves the packet, the ttl gets dropped to 0, and this time C sends back the error.
Then increase to 3 and D replies with the error.
Then 4 and E responds.
Then 5 and F responds.
All traceroute has to do is print out where the error messages come from (where the packet timed out) and BOOM!, you have now traced between two computers.

Expert Comment

ID: 6455973

DNS works roughly like this... A client machine requests resolution (e.g. www.redhat.com) from their ISP's dns servers - if there is a valid (non-expired) entry in their cache from a prior similar request then that's returned. If not, the dns server will attempt to locate a definitive nameserver for the domain and query that. It works from right to left. So if its a .com address the ISP dns queries the .com root server for the NS of the domain, e.g. redhat.com . Then with that info it queries the primary nameserver, e.g. ns1.redhat.com for actual resolution of the original query. That info will then be cached and updated based on info in the query packet.

The rest is just IP routing. Your ISP's routers must either know the route (next hop) to the subnet on which the target ip address lives ( or will simply send to a default route hoping that the router concerned may have a path. Routers communicate paths between themselves using protocols such as RIP. This is a whole science in its own right and the above is just a very brief summary.


Expert Comment

ID: 6459599
i hav some clarification on the same question

consider a case i have DNS mapped to a particular ip (ie i have registered with a web hoster) and i need to change the DNS to some other IP (ie., i intend to have my own server ) is that i should configure my webserver alone with that DNS or how is it to be done(how will the primary dns server know that i have mapped my DNS to a new ip)
and what would happen if i have the same DNS with 2 ips (will the visitor who is located near the server will be able access the particular ip)


Expert Comment

ID: 9078685
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
Post your closing recommendations!  No comment means you don't care.

Expert Comment

ID: 9993742
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
Accept packratt_jk's comment as answer.
Please leave any comments here within the next seven days.


EE Cleanup Volunteer

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
Hi, this video explains a free download that you can incorporate into your Access databases, or use stand-alone for contact management. Contacts -- Names, Addresses, Phone Numbers, eMail Addresses, Websites, Lists, Projects, Notes, Attachments…
Suggested Courses

591 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question