# Internet -> slow resolve host

## theonlymcc

I'm using Firebird and it loads in ~2 secs and its great.  But whenever I surf and it says "Resolving host" it takes 15-30 secs.  I have RoadRunner and in WinXP (I know XP is gay) its quick.  What could this be?

----------

## Garbz

i'm not sure what this is but my gentoo box decides to take ages to resolve too.

Btw the dns is pointed to our gateway box (redhat 9.0), and that is a forward dns to our isp.  Only the gentoo box does it.

----------

## theonlymcc

I am using DHCP so I wonder if I didn't configure something right.  Maybe my /etc/hosts stuff isn't configured right. I will check it when I get back home. At work right now.

----------

## Garbz

hosts should not make a difference when resolving dns.  Afterall imagine how big ur hosts file would be if u had to store every domain on the net   :Razz: 

/etc/resolv.conf stores the dns nameservers (mine are assigned by dhcp).

----------

## ghotirsd

 *theonlymcc wrote:*   

> I am using DHCP so I wonder if I didn't configure something right.  Maybe my /etc/hosts stuff isn't configured right. I will check it when I get back home. At work right now.

 

I can't remember if I saw this here, or in another Firebird forum elsewhere on the web....

It's not just a Gentoo problem..it is Firebird and routers/DHCP, etc.

You can fix the problem by doing the steps below

It worked perfectly for me on my gentoo box and my Win2K box which also had slow

resolve problems (I fixed it in the Control Panel TCP/IP blah blah), both connecting to the net through a router via DHCP)

1. Enter the DNS for your ISP in resolv.conf

2.Edit /etc/conf.d/net section for DHCP thus:

```
# For DHCP set iface_eth? to "dhcp"

# For passing options to dhcpcd use dhcpcd_eth?

#

iface_eth0="dhcp"

dhcpcd_eth0="-R"
```

The "-R" tells the DHCP not to overwrite what is in the resolv.conf

----------

## Garbz

while i can't test this because my box isn't actually playing up atm (opera anyone ?), i don't see how this can be a solution to the problem.

all the dhcp client does as far as resolutions go is modify /etc/resolve.conf? doesn't it?  windows is a bit gayer when it comes to that but as far as i know manually entering the dns or letting dhcp edit resolv.conf shouldn't make the least bit of difference.

----------

## ghotirsd

 *Garbz wrote:*   

> while i can't test this because my box isn't actually playing up atm (opera anyone ?), i don't see how this can be a solution to the problem.
> 
> all the dhcp client does as far as resolutions go is modify /etc/resolve.conf? doesn't it?  windows is a bit gayer when it comes to that but as far as i know manually entering the dns or letting dhcp edit resolv.conf shouldn't make the least bit of difference.

 

That's exactly the problem that Mozilla has...the overwriting of resolv.conf with your Internal IP.

Mozilla tries to resolve internet addresses using that address which is now your internal IPs...for a LONG time before it finally gets outside the router and on the 'net. 

By forcing your ISP DNS to remain in the resolve.conf instead of dhcp wiping it out, Mozilla/Firebird is actually able to get outside your internal network faster.

The root of the problem is NOT the DHCP or the router or resolv.conf, it's Mozilla/Firebird.

It's a kludgey work around for a Mozilla problem.

Trust me. It works.

----------

## Garbz

ahh ok thanks.

----------

## daha

yes, im using router and i have same problem with any machine running mozilla-firebird on my lan.

----------

## SickBoy

How do I check what dns name servers my windows boxes use? (on XP and/or 98 )

----------

## Garbz

start -> run -> "cmd" -> ok

"ipconfig /all"

there's a line (actually normally more than 1 line) which says "DNS Name servers:"

----------

## SickBoy

OK, one more question. Do I have to reboot or bounce some service or another after making changes to resolv.conf?

----------

## chrispy

take the net interface down and back up again

```
/etc/init.d/net.ethx restart
```

where x is your network interface's id (0 for most people)

----------

## acecase

same here exept i have a resolution lag with everything includeing ping.

I have double checked everything in this thread allong with everything else I could find on the forum and everything I could personaly think of (exept stopping ipv6, hate to admit but I don't know how and can't find info on it) 

I have tried both 192.168.0.1(router) and my ISP dns servers in /etc/resolv.conf

I have double checked hosts file and insure that /etc/hostname and /etc/dnsdomain name have the correct entries (amanda@localhost)

I have been reading about bugs with my 8139too module (dlink DFE-530TX+ ethernet adapter)

but most everything says that those bugs were fixed with kernel 2.4.19 and i am useing the recomended gentoo kernel 2.4.20 from the guide with genkernel (easy way out  :Smile: 

I dunno Im at a loss...

I also have another gentoo box on the same router with the same configuration (sept for the hostname etc) and a windows xp pro laptop (same router) and nothing else has the problem.

before switching to gentoo I had redhat 9 (shrike) on this box and didn't have the problem.

there even seems to be a system lag whith networking apps. when i ping say yahoo.com I will ctrl-c on about the second response and it seems to take a few seconds to exit ping and return my bash prompt.

gerr 

any ideas would be greatly apriciated as I realy love gentoo and want to use it but i can't stand this lag.

Thank you in advance for any help offered.

----------

## redskn3

I have the problem with Mozilla and Firebird....Opera screams as does Konq. I use static I.p. with no router and still have the same problem....

Anyone have any suggestions...thanks......I tried gentoo for the "noted" speed that I would have using this system......not this way.

----------

## H0bb3z

First, make sure your /etc/nsswitch.conf is setup to resolve hosts in the correct order.  That's usually files first, then DNS - the OS will check your /etc/hosts file first, the /etc/resolv.conf if it can't find anything related in the hosts file.  nsswitch.conf should have a line like this 

```
hosts:   files dns
```

 in it.

to help troubleshoot where the problem is stemming from, try running some traceroutes (emerge traceroute, or use "tracert" if you use Windows) with host resolution turned off (-n in Linux, -d in Windows) to see if the response is good.  Then try to run the traceroutes with resolution on and see if you experience any significant delays similar to what you're seeing in Firebird.

Linux: 

```
traceroute -n <known Internet host>

traceroute <known Internet host>
```

Windows: 

```
tracert -d <known Internet host>

tracert <known Internet host>
```

If you don't see any difference between the resolved and non-resolved traceroute s then the problem is Firebird, not your TCP stack or resolver.

You can also use ping to test.  

```
ping <dns name>
```

 vs. 

```
ping <ip address>
```

With ping, you'll get a much slower response when you use a dns name if your resolver is b0rked...

----------

## saluk

Old post I know, but I am having this problem as well and have been searching for a solution for hours.  Tracerout -n is fine, traceroute is mad slow, and prints many !H messages.  Any ideas?

----------

## evoweiss

Hi,

 *theonlymcc wrote:*   

> I'm using Firebird and it loads in ~2 secs and its great.  But whenever I surf and it says "Resolving host" it takes 15-30 secs.  I have RoadRunner and in WinXP (I know XP is gay) its quick.  What could this be?

 

Are you, and everybody else, using KDE? If so, this sounds like exactly the same problem I discovered and fixed some time ago. Just look through this thread until you get ot the part with setting KDE_NO_IPV6=1. If you're not using KDE, perhaps there's a similar configuration issue, i.e., the need to turn off IPV6.

Good luck,

Alex

----------

