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.
The man page says that the time is "elapsed real time (in [hours:]minutes:seconds)". So yes, that would be 1.05 sec. But in the browser, it's not taking 1.05 s, it's taking 6 seconds to go from "Resoving host..." to "Waiting for ....".
Ok, I'm really ignorant about networking stuff- I don't understand most of what's been posted in this thread- so please don't flame me if these are stupid suggestions.
Have you tried changing localhost from 127.0.0.1 to 0.0.0.0 ?
If you're using a firewall, have you tried disabling it to see if there's a difference?
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660
Rep:
Quote:
Originally posted by tigerflag Ok, I'm really ignorant about networking stuff- I don't understand most of what's been posted in this thread- so please don't flame me if these are stupid suggestions.
Have you tried changing localhost from 127.0.0.1 to 0.0.0.0 ?
Peace,
Siri Amrit
Why on earth would you do a thing like that? 0.0.0.0 is a macro for "any net". That's going to break a whole bunch of things.
Any way, to answer the question, the only other thing I've seen like this was a recent post by someone claiming that "tmdns" (never heard of it?!?!) was causing their applications to be very slow. As soon as they disabled "tmdns" everything returned to normal.
It's pretty obvious by this point that no one else has seen a problem like that, so it has to be something specific to your setup in particular that doesn't occur by default.
" Why on earth would you do a thing like that? 0.0.0.0 is a macro for "any net". That's going to break a whole bunch of things."
Well, I've done it for years on both Linux and Windows and so far nothing seems to be broken. It can mess things up if you use a proxy server but I don't. I do it because I have a HUGE hosts file that very nicely blocks 75,894 adservers from setting banner ads and cookies. If I use Netscape and hosts says 127.0.0.1, Netscape will hang while it waits for a connection on any of those servers. Setting hosts to 0.0.0.0 makes it all go very fast. Using Konqueror, Mozilla and Firefox, all good.
I do it because I value my privacy. I do it because I'm one of those unfortunates using dialup and blocking all that bandwidth-wasting clutter speeds up my surfing. Not all hosts files are this large. Mine also includes a ton of porn sites because I don't want guests on my computer using it for porn.
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660
Rep:
That is a really ham-handed way to block sites. Just use a proxy, such as Squid with the Dan's Guardian plug-in. Using 0.0.0.0 as a host's IP address completely violates every RFC that has to do with networking and I'm amazed that it even works at all. Don't recommend that other people do that, you're only going to cause them problems.
I don't know much about networking stuff. I don't even understand Squid and I've spent a lot of time reading the Squid documentation. I suggested what I suggested because he hadn't been getting any other ideas that worked, and I had "personally" experienced a slowdown that improved when I changed my hosts file to 0.0.0.0.
I have not had problems doing this, so your statement that I'm only going to cause people problems by recommending this is a blanket generalization and not an absolute fact. Since I predicated my suggestion with the caveat that he take my obvious lack of experience into consideration, and I asked people not to flame me, I believe I have not endangered him and do not deserve to be censored by you.
There are a lot of sites on the web that talk about using the hosts file to block adservers. I didn't come up with it out of the blue. It works for me in my situation. YMMV!
The host lookup is equally slow in Mozilla, Opera, Firebird, and Konqueror, so it can't be a browser problem.
Can you rule out other stuff, like using proxies?
//OT I have not had problems doing this, so your statement that I'm only going to cause people problems by recommending this is a blanket generalization and not an absolute fact.
(...)and do not deserve to be censored by you.
In defense of Chort (not that he really would need it), he certainly would not have any intention to do that. If there is any such perception that would be (with all due respect) yours and yours alone. Chort is an experienced, helpful, polite and valued member of the LQ community.
//And yes, I concur 0.0.0.0 should not be used for muting lookups. Like Chort already said, 0.0.0.0 is a notation for ANY net. IMHO the "proper" way would be to use an IP address in an unused non-routable range.
Originally posted by chort Any way, to answer the question, the only other thing I've seen like this was a recent post by someone claiming that "tmdns" (never heard of it?!?!) was causing their applications to be very slow. As soon as they disabled "tmdns" everything returned to normal.
It's pretty obvious by this point that no one else has seen a problem like that, so it has to be something specific to your setup in particular that doesn't occur by default.
I believe it was me who posted that. Yes, it worked wonders for my box. I am running Mandrake 9.2 as well, and I believe tmdns is unique to this distro. I guess that's why most have never even heard of it? Anyway, it took up a long time to start up any X app on my system (5 secs or more), including host resolves.
So to the original poster, I suggest you go to Mandrake Control Center, click on System, then Services, then go down the list until you find tmdns. Click stop, and prevent it from running again by unchecking the box. Hope this helps.
Originally posted by Bandhel
So to the original poster, I suggest you go to Mandrake Control Center, click on System, then Services, then go down the list until you find tmdns. Click stop, and prevent it from running again by unchecking the box. Hope this helps.
Evan
I hae never had TMDNS running. It is always listed as "Stopped" in Mandrake's DrakXServices.
In DrakProxy, both HTTP and FTP server address fields are blank.
Here is some more info:
I am running Mandrake 9.2 Download Edition
I use a Linksys EtherFast 10/100 card which uses the tulip driver when running in Linux.
I am connected to the Internet via a WebStar cable modem which connects to the Rogers Hi-Speed network.
Here is my /etc/hosts file:
127.0.0.1 localhost
127.0.0.1 CPE00207805d97a-CM000a7369e75e
127.0.0.1 cpe00207805d97a-cm000a7369e75e
127.0.0.1 cpe00207805d97a-cm000a7369e75e.cpe.net.cable.rogers.com
127.0.0.1 www.jethit.com
Here is my resolv.conf file:
search bloor.phub.net.cable.rogers.com
nameserver 24.153.22.195
nameserver 24.153.23.66
Here is my nsswitch.conf file:
#
# /etc/nsswitch.conf
#
# An example Name Service Switch config file. This file should be
# sorted with the most-used services at the beginning.
#
# The entry '[NOTFOUND=return]' means that the search for an
# entry should stop if the search in the previous entry turned
# up nothing. Note that if the search failed due to some other reason
# (like no NIS server responding) then the search continues with the
# next entry.
#
# Legal entries are:
#
# nisplus or nis+ Use NIS+ (NIS version 3)
# nis or yp Use NIS (NIS version 2), also called YP
# dns Use DNS (Domain Name Service)
# files Use the local files
# db Use the local database (.db) files
# compat Use NIS on compat mode
# hesiod Use Hesiod for user lookups
# [NOTFOUND=return] Stop searching if not found so far
#
# To use db, put the "db" in front of "files" for entries you want to be
# looked up first in the databases
#
# Example:
#passwd: db files nisplus nis
#shadow: db files nisplus nis
#group: db files nisplus nis
Originally posted by Technoslave What search does in your resolve.conf is this.
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.
Okay, I've realized that whenever I change resolv.conf, when I reboot the computer the resolv.conf file gets overwritten. So when I removed "search bloor.phub.net.cable.rogers.com" from the file, it reappeared when I restarted the computer. I even did chmod 444 on the file but the file still changed.
You can imagine that web pages linked to ads on different IP addresses take 12, 18, 24, etc. seconds to load.
I'm having this exact same problem with Mandrake 9.1. resolve.conf is being overwritten everytime I reboot. I've got a cable modem going to my router, then into my computer.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.