Hi,
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 (216.148.218.195) 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.
Rgds
Main Topics
Browse All Topics





by: packratt_jkPosted on 2001-09-04 at 14:22:53ID: 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.
eg:
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 (192.168.1.1 ~ 192.168.1.6).
now, we know that:
nslookup A will give us 192.168.1.1, 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.