Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I'm having a problem with my Internet access. Whenever I request a page on any web browser, it takes at least six seconds to look up the host name. Even if I am traveling between pages on the same server. I do not get this problem when I am in Windows. I am currently using Mandrake 9.2.
Here is my hosts file:
127.0.0.1 localhost
127.0.0.1 CPE002078...
CPE002078... is the string of characters in my bash prompt after my user name (e.g. vicente@CPE002078...). If I leave this line out, GNOME gives me an error message every time I log on.
Here is my resolv.conf:
search bloor.phub.net.cable.rogers.com
nameserver 24.153.22.195
nameserver 24.153.23.66
My internet connection is set up in Mandrake as a LAN. Is this a problem? Because I am really using a cable modem.
Say I want to telnet to pariah under the technoslave.net domain. If I don't have search technoslave.net in there, then I need to type telnet pariah.technoslave.net, if I have search technoslave.net in my resolv.conf file, then all I'd need to type is telnet pariah
I doubt you'll be trying to get in to any hosts on your network via some type of domain name system.
Second, in your nsswitch.conf file, you can get rid of nisplus and nis ( for everything ), and then I'd swap files with dns, so that your hosts line looks like -
hosts: dns files
If you're still experiencing problems, then you can switch the IP addresses for your nameservers...it's possible that those nameservers are under load, so might be slow in responding.
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660
Rep:
I agree with everything Technoslave wrote, except for the part of putting dns before files. That would prevent you from overriding certain hosts by putting an entry in /etc/hosts. Personally I very much like the ability to "lie" to my machine if I want to and override certain thing (like resolving sitefinder.verisign.net to 127.0.0.1, etc). It won't cause any perceivable delay because it just has to take a quick peek in a tiny file. With nis and nisplus, you have to wait for an nis query to file which will definitely take time (for each).
Chort, I too have files before dns, however, I don't think that this individual will be doing this...if he does, then great, but I really don't think it's going to be the case.
NIS was/is a Sun thing ( I believe ) a sort of login manager ( a little more than that...but if you want the real skinny, man -k nis, then go to town ), that used unencrypted passwords. NIS+ is the same thing, but with encrypted passwords. I don't use it, nor have I ever in the 10+ years I've been doing UNIX admin work...but I'm sure someone, somewhere does.
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660
Rep:
Quote:
Whenever I request a page on any web browser, it takes at least six seconds to look up the host name. Even if I am traveling between pages on the same server.
Hold on a second, I missed this the first time (I thought it said "except if I am..."). This wouldn't be a DNS resolution problem, then. It doesn't have to resolve DNS again each time you make a GET request to the same host. You have some other problem. Have you looked at the output of ifconfig eth0 to see if you have errors or collisions?
Edit: Actually, most of the time pages on the same host load quickly but occasionally it takes as long as pages on other hosts. So it might not have to do with collisions.
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660
Rep:
Well then, try timing DNS requests.
You can do
$ time host www.google.com
(although that's likely to be cached and retrieved very fast)
$ time host thinkofsomeobscuredomainhere.tld
etc...
The point of this would be to determine if it really is the DNS resolution portion that is taking a long time. Of course, network latency could still have something to do with it. After you resolve the host, try pinging it and see what the latency is.
The last thing you can try is downloading pages with wget and time that as well. This would narrow it to potentially a problem with the browser you're using.
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660
Rep:
DNSIS host resolution. It must be either your browser or OS configuration.
By the way, I've never seen time output in that format before, but if it's in the format minutes:seconds.miliseconds, then you have problems. That would indicating that it's taking over a second just to resolve the hostname. That is slooooow. I'm not sure if I'm interpreting the output correctly, though. Check your man page for a description of the output fields.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.