# Waiting to connect..[SOLVED]

## Beetle B.

I just installed Gentoo on a new machine. The network card works, but it takes roughly 2 seconds to make the connection when accessing anything on the net. I suspect this wasn't the case when I booted from the Live CD - so what in my config could be causing this?

It's not the Internet connection - my older computer doesn't have this issue (both are connected to a router).

----------

## tony-curtis

Do 

```
host
```

 and/or 

```
nslookup
```

 show the same delay when looking up addresses?

If so, it's probably your 

```
/etc/resolv.conf
```

 setup.

----------

## Beetle B.

I have neither host nor nslookup. What package(s) need I install?

----------

## tony-curtis

host and nslookup both come from bind-tools

----------

## Beetle B.

host returns an answer pretty much immediately. Navigating to the site in, say, Elinks takes a while. 

I don't think /etc/resolv.conf is the problem. It's the same as my other computer (just one entry: The IP address of my router).

----------

## tony-curtis

How long does

```
getent hosts www.some.where
```

take?  (Maybe there's another non-responding repository ahead of DNS?)

What's in 

```
/etc/host.conf
```

 ?

----------

## Beetle B.

 *Quote:*   

> getent hosts www.some.where

 

Instant, pretty much.

 *Quote:*   

> /etc/host.conf

 

```
# /etc/host.conf:

# $Header: /var/cvsroot/gentoo/src/patchsets/glibc/extra/etc/host.conf,v 1.1 2006/09/29 23:52:23 vapier Exp $

# The  file /etc/host.conf contains configuration information specific to

# the resolver library.  It should contain one configuration keyword  per

# line,  followed by appropriate configuration information.  The keywords

# recognized are order, trim, mdns, multi, nospoof, spoof, and reorder.

# This keyword specifies how host lookups are to be performed. It

# should be followed by one or more lookup methods, separated by

# commas.  Valid methods are bind, hosts, and nis.

#

order hosts, bind

# Valid  values are on and off.  If set to on, the resolv+ library

# will return all valid addresses for a host that appears  in  the

# /etc/hosts  file,  instead  of  only  the first.  This is off by

# default, as it may cause a substantial performance loss at sites

# with large hosts files.

#

multi off

```

----------

## Beetle B.

Bump!

Any ideas? Another clue. It takes a while to initially connect to any site. After it connects to one host (e.g. forums.gentoo.org), subsequent accesses are instantaneous - for a while.

----------

## Beetle B.

Correction. Subsequent connections to the same site are instantaneous within the browser. If I start up another browser, itr's slow on that one initially.

I booted into the Live CD, and confirmed that it's using the same network module in  the kernel than I am (didn't check the kernel version). I also confirmed that all the network settings (that I know of) are the same as on my Gentoo install. 

Really? No ideas?

----------

## Beetle B.

Solved by disabling ipv6. I had done that earlier, but with no benefit. So I just kicked it out of the kernel. Works now.

----------

