If this isn't exactly what you wanted, please try our Search (there's a LOT of techy and non-techy stuff here about Linux, Unix, Mac OS X and just computers in general!):
From: Bela Lubkin <belal@caldera.com> Subject: Re: DNS or router trouble? [possible FAQ material?] Date: Tue, 5 Nov 2002 11:15:06 GMT References: <3D75087F.2020903@tabletrac.com> Tony wrote (in September): > Sorry for another question like this. But my 'ping' is slow! Ya Ya I > know, not this again. But I've been reading for days on deja and I > haven't found a solution yet. Thanks for your patience. > > We have our OpenServer 5.06a box connected to a large network at the > customer site. They are using a Windows 2000 box as the DNS server and > DHCP server. > > A series of machines at 192.168.1.xxx are assigned a fixed address which > includes our SCO server. > All other machines are assigned addresses by the DHCP server onto an > network of 10.14.100.xxx. > > If I ping a machine using hostname on 192.168.1.xxx it works great. > If I ping a machine using hostname on 10.14.100.xxx it takes forever! > > Here is an exampe output of 'ping hostname' > The response takes several seconds before it is displayed. > > ============================================================================================ > > root@scobox /etc# ping hostname > PING hostname.customerdomain.com (10.14.100.17): 56 data bytes > 64 bytes from 10.14.100.17 (10.14.100.17): icmp_seq=0 ttl=127 time=0.754 ms > 64 bytes from 10.14.100.17 (10.14.100.17): icmp_seq=1 ttl=127 time=14869.597 ms > 64 bytes from 10.14.100.17 (10.14.100.17): icmp_seq=2 ttl=127 time=13869.699 ms ... > 64 bytes from 10.14.100.17 (10.14.100.17): icmp_seq=15 ttl=127 time=1107.100 ms > 64 bytes from 10.14.100.17 (10.14.100.17): icmp_seq=16 ttl=127 time=107.208 ms > > --- hostname.customerdomain.com ping statistics --- > 17 packets transmitted, 17 packets received, 0% packet loss > round-trip min/avg/max = 0.754/7037.584/14869.597 ms > > ========================================================================================= > > If I use 'ping -n hostname' it is fast as expected. > > Every thing I have read from the group indicates this is a DNS problem. > But if I try 'nslookup hostname' it responds with an address > immediately. I was under the impression that this would be a good test > of the DNS.
That's a reasonable smoke-test of forward DNS resolution. Your problem is with reverse DNS resolution. `ping` is trying to translate the numeric IP address, 10.14.100.17, to a name. The DNS server is responding slowly to this request. ping works by having two separate logical threads of execution. One sends out periodic packets; the other receives the responses and prints them out. What's happening here is that the reader thread is being blocked for a long time by DNS, even though the writer is still sending a new packet every second. Responses #1 through 15 were probably received in perfectly normal amounts of time, but they didn't get _read_ until the delayed DNS response to packet #1 was finished. Notice how the times step down by about 1 second per packet: this is because, when the DNS response was finally received, the rest of the queued responses were absorbed quickly. It's a bit odd that your DNS server happily responded immediately to the _first_ query about 10.14.100.17 (packet #0), and slowly to the second. But that's up to the DNS server. If you had given exactly the same symptoms, but said that the behavior was the _same_ with `ping -n`, I would give a radically different diagnosis. In that case I would say that an intermediate router between you and 10.14.100.17 was experiencing intermittent line drops. Suppose there are 7 hops between you and 10.14.100.17, and that the connection between hops 3 & 4 is a dialup modem. If the modem hung up, machine #3 would redial machine #4, which would take several seconds. Depending on its IP-over-modem implementation, it could choose to either drop packets received during the down time, or queue them. If you saw the results you showed, it would tell you that machine #3 was queuing the packets while redialing. Then it send them all on to machine #4, so on down the line to 10.14.100.17, and back to you; the responses all arrived in a burst at about the same time. This behavior would happen whether or not you were having ping do reverse-DNS lookups, so it isn't what's going on in your case. The scenario with the downed intermediate route would probably also have one other difference: the burst of responses when the line came back up would probably be somewhat out of sequence. That can't happen with the DNS delay scenario since all of the received packets are already sitting on your machine, waiting to be read by ping, in an ordered queue.
>Bela<
/Bofcusm/1702.html copyright 1997-2004 (various authors) All Rights Reserved
Have you tried Searching this site?
Unix/Linux/Mac OS X support by phone, email or on-site: Support Rates
This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more. We appreciate comments and article submissions.
Many of the products and books I review are things I purchased for my own use. Some were given to me specifically for the purpose of reviewing them. I resell or can earn commissions from the sale of some of these items. Links within these pages may be affiliate links that pay me for referring you to them. That's mostly insignificant amounts of money; whenever it is not I have made my relationship plain. I also may own stock in companies mentioned here. If you have any question, please do feel free to contact me.
Specific links that take you to pages that allow you to purchase the item I reviewed are very likely to pay me a commission. Many of the books I review were given to me by the publishers specifically for the purpose of writing a review. These gifts and referral fees do not affect my opinions; I often give bad reviews anyway.
We use Google third-party advertising companies to serve ads when you visit our website. These companies may use information (not including your name, address, email address, or telephone number) about your visits to this and other websites in order to provide advertisements about goods and services of interest to you. If you would like more information about this practice and to know your choices about not having this information used by these companies, click here.
Click here to add your comments
Don't miss responses! Subscribe to Comments by RSS or by Email
Click here to add your comments
If you want a picture to show with your comment, go get a Gravatar