Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
resolving taking forever under gentoo [fixed]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
-=GGW=- $ol!d $n4>|e
Veteran
Veteran


Joined: 12 Apr 2004
Posts: 1616
Location: USA

PostPosted: Mon May 04, 2009 9:57 am    Post subject: resolving taking forever under gentoo [fixed] Reply with quote

I just got my system up and working and everything seems fine except the net. It takes me on average 10 - 15 seconds to resolv a host. Emerging packages with a lot of downloads takes an amazing amount of time as i have to resolve a lot of different hosts. When i click a link or try to go to a website there is again a 10-12 second wait untill there is a response. This doesnt happen under kubuntu or vista so I know its not a network issue. What am I missing here?

EDIT: I'm using hardwired with Realtec, here are some specs

Quote:

ping -c3 www.google.com
PING www.l.google.com (74.125.19.147) 56(84) bytes of data.
64 bytes from cf-in-f147.google.com (74.125.19.147): icmp_seq=1 ttl=244 time=24.2 ms
64 bytes from cf-in-f147.google.com (74.125.19.147): icmp_seq=2 ttl=244 time=15.7 ms
64 bytes from cf-in-f147.google.com (74.125.19.147): icmp_seq=3 ttl=244 time=16.2 ms

--- www.l.google.com ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 10075ms
rtt min/avg/max/mdev = 15.782/18.754/24.257/3.896 ms


Quote:

ping -c3 www.yahoo.com
PING www-real.wa1.b.yahoo.com (209.131.36.158) 56(84) bytes of data.
64 bytes from f1.www.vip.sp1.yahoo.com (209.131.36.158): icmp_seq=1 ttl=53 time=17.4 ms
64 bytes from f1.www.vip.sp1.yahoo.com (209.131.36.158): icmp_seq=2 ttl=53 time=47.0 ms
64 bytes from f1.www.vip.sp1.yahoo.com (209.131.36.158): icmp_seq=3 ttl=53 time=17.8 ms

--- www-real.wa1.b.yahoo.com ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 10098ms
rtt min/avg/max/mdev = 17.448/27.471/47.074/13.863 ms


Quote:

04:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 02)
05:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 02)


Last edited by -=GGW=- $ol!d $n4>|e on Tue May 05, 2009 11:54 am; edited 4 times in total
Back to top
View user's profile Send private message
bunder
Bodhisattva
Bodhisattva


Joined: 10 Apr 2004
Posts: 5947

PostPosted: Mon May 04, 2009 9:59 am    Post subject: Reply with quote

are you using dhcp or a manual ip? please post /etc/resolv.conf, /etc/hosts, /etc/nsswitch.conf, and /etc/conf.d/net.

cheers
_________________
Neddyseagoon wrote:
The problem with leaving is that you can only do it once and it reduces your influence.

banned from #gentoo since sept 2017
Back to top
View user's profile Send private message
-=GGW=- $ol!d $n4>|e
Veteran
Veteran


Joined: 12 Apr 2004
Posts: 1616
Location: USA

PostPosted: Mon May 04, 2009 10:14 am    Post subject: Reply with quote

dhcp, here are the files :)

Quote:

cat /etc/resolv.conf
# Generated by dhcpcd from eth1
# /etc/resolv.conf.head can replace this line
search hsd1.ca.comcast.net.
nameserver 192.168.1.108
nameserver 68.87.76.178
nameserver 68.87.78.130
# /etc/resolv.conf.tail can replace this line


Quote:

cat /etc/hosts
# /etc/hosts: Local Host Database
#
# This file describes a number of aliases-to-address mappings for the for
# local hosts that share this file.
#
# In the presence of the domain name service or NIS, this file may not be
# consulted at all; see /etc/host.conf for the resolution order.
#

# IPv4 and IPv6 localhost aliases
127.0.0.1 metalus-organic.solidus-river metalus-organic localhost
::1 metalus-organic.solidus-river metalus-organic localhost

#
# Imaginary network.
#10.0.0.2 myname
#10.0.0.3 myfriend
#
# According to RFC 1918, you can use the following IP networks for private
# nets which will never be connected to the Internet:
#
# 10.0.0.0 - 10.255.255.255
# 172.16.0.0 - 172.31.255.255
# 192.168.0.0 - 192.168.255.255
#
# In case you want to be able to connect directly to the Internet (i.e. not
# behind a NAT, ADSL router, etc...), you need real official assigned
# numbers. Do not try to invent your own network numbers but instead get one
# from your network provider (if any) or from your regional registry (ARIN,
# APNIC, LACNIC, RIPE NCC, or AfriNIC.)
#


Quote:

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

passwd: compat
shadow: compat
group: compat

# passwd: db files nis
# shadow: db files nis
# group: db files nis

hosts: files dns
networks: files dns

services: db files
protocols: db files
rpc: db files
ethers: db files
netmasks: files
netgroup: files
bootparams: files

automount: files
aliases: files


Quote:

cat /etc/conf.d/net
# This blank configuration will automatically use DHCP for any net.*
# scripts in /etc/init.d. To create a more complete configuration,
# please review /etc/conf.d/net.example and save your configuration
# in /etc/conf.d/net (this file :]!).
#config_eth0( dhcp )
#config_eth1( dhcp )

nis_domain_lo="solidus-river"
Back to top
View user's profile Send private message
MaximeG
l33t
l33t


Joined: 15 Apr 2008
Posts: 722
Location: Belgium

PostPosted: Mon May 04, 2009 10:21 am    Post subject: Reply with quote

Hi,

Dhcp is causing it. (Well, not dhcp in itself, but the way your routeur manage it.)
If it's not an issue for you, configure your network to be static, it will magically sort this issue out :)

If you really need to use dhcp, well, we can try to figure out another solution.

Regards,
Maxime
_________________
Future is wide open.
Back to top
View user's profile Send private message
-=GGW=- $ol!d $n4>|e
Veteran
Veteran


Joined: 12 Apr 2004
Posts: 1616
Location: USA

PostPosted: Mon May 04, 2009 10:31 am    Post subject: Reply with quote

Unfortunately I don't have controll of the router. It server anywhere from 12-18 people at a time and they come and go. What things can i try to speed it up? Maybe a different dhcp client? It seems more peppy under other installs
Back to top
View user's profile Send private message
MaximeG
l33t
l33t


Joined: 15 Apr 2008
Posts: 722
Location: Belgium

PostPosted: Mon May 04, 2009 10:42 am    Post subject: Reply with quote

Hi,

You may have a look at this thread since it's perhaps interesting for you then :

https://forums.gentoo.org/viewtopic-t-755501-highlight-.html

Regards,
Maxime
_________________
Future is wide open.
Back to top
View user's profile Send private message
bunder
Bodhisattva
Bodhisattva


Joined: 10 Apr 2004
Posts: 5947

PostPosted: Mon May 04, 2009 10:44 am    Post subject: Reply with quote

you could try overriding dns with "nodns" in /etc/conf.d/net and replacing /etc/resolv.conf with just this:

Quote:
search hsd1.ca.comcast.net.
nameserver 68.87.76.178
nameserver 68.87.78.130


...taking out the router's dns entry. failing that, try it with just the router entry, or you can find another dns server to use if all three are crap. :?
_________________
Neddyseagoon wrote:
The problem with leaving is that you can only do it once and it reduces your influence.

banned from #gentoo since sept 2017
Back to top
View user's profile Send private message
MaximeG
l33t
l33t


Joined: 15 Apr 2008
Posts: 722
Location: Belgium

PostPosted: Mon May 04, 2009 10:49 am    Post subject: Reply with quote

Yes,

I think that's the issue as well, the fact that your nameserver "is" your gateway. If you have a way to specify manually your nameserver in resolv.conf, it should do the trick.

The problem is, if you use dhcp and doesn't tell it not to override resolv.conf, it doesn't work obviously.

Regards,
Maxime
_________________
Future is wide open.
Back to top
View user's profile Send private message
bunder
Bodhisattva
Bodhisattva


Joined: 10 Apr 2004
Posts: 5947

PostPosted: Mon May 04, 2009 11:06 am    Post subject: Reply with quote

MaximeG wrote:
Yes,

I think that's the issue as well, the fact that your nameserver "is" your gateway. If you have a way to specify manually your nameserver in resolv.conf, it should do the trick.

The problem is, if you use dhcp and doesn't tell it not to override resolv.conf, it doesn't work obviously.

Regards,
Maxime


under normal circumstances, what he had should work, but i've noticed that cheap routers aren't that great at resolving, especially if they have many hosts connected to them. and since his router is also dishing out the isp's dns servers via dhcp, we might as well try just those, even just to test. :wink:
_________________
Neddyseagoon wrote:
The problem with leaving is that you can only do it once and it reduces your influence.

banned from #gentoo since sept 2017
Back to top
View user's profile Send private message
cwr
Veteran
Veteran


Joined: 17 Dec 2005
Posts: 1969

PostPosted: Mon May 04, 2009 9:03 pm    Post subject: Reply with quote

I've just been playing a similar game trying to download from Gentoo mirrors;
the modem/router sets the address in resolv.conf to 192.168.1.1, but can
apparently no longer handle HTTP protocol 301, Moved Permanently, responses.
It goes out to lunch and stays there.

I can't touch the router, so my answer was to use OpenDNS, which in the few
days I've been using it has worked fine. My dhclient.conf is now:

# DHCP configuration file

# The default delay is 60 sec.
timeout 10;

# Fllakey DNS from the router; use the OpenDNS servers.
interface "eth0" {
prepend domain-name-servers 208.67.222.222,208.67.220.220;
}

# eof

Good luck - Will
Back to top
View user's profile Send private message
poly_poly-man
Advocate
Advocate


Joined: 06 Dec 2006
Posts: 2477
Location: RIT, NY, US

PostPosted: Mon May 04, 2009 9:06 pm    Post subject: Reply with quote

opendns sucks (as you may have read in similar threads)

install bind on your machine - you won't regret it.
_________________
iVBORw0KGgoAAAANSUhEUgAAA

avatar: new version of logo - see topic 838248. Potentially still a WiP.
Back to top
View user's profile Send private message
-=GGW=- $ol!d $n4>|e
Veteran
Veteran


Joined: 12 Apr 2004
Posts: 1616
Location: USA

PostPosted: Tue May 05, 2009 12:03 am    Post subject: Reply with quote

poly_poly-man wrote:
opendns sucks (as you may have read in similar threads)

install bind on your machine - you won't regret it.


Is there a how-to for bind? I've looked around and everything seems to be talking about bind for setting up a dhcp server, not recieving an ip. :?
Back to top
View user's profile Send private message
poly_poly-man
Advocate
Advocate


Joined: 06 Dec 2006
Posts: 2477
Location: RIT, NY, US

PostPosted: Tue May 05, 2009 1:31 am    Post subject: Reply with quote

-=GGW=- $ol!d $n4>|e wrote:
poly_poly-man wrote:
opendns sucks (as you may have read in similar threads)

install bind on your machine - you won't regret it.


Is there a how-to for bind? I've looked around and everything seems to be talking about bind for setting up a dhcp server, not recieving an ip. :?
bind is not a DHCP server - it is a DNS server.

to get basic functionality out of it (no lan zones, caching enabled(?), allowed access from localhost), it should be as simple as emerge and start the named service.
_________________
iVBORw0KGgoAAAANSUhEUgAAA

avatar: new version of logo - see topic 838248. Potentially still a WiP.
Back to top
View user's profile Send private message
-=GGW=- $ol!d $n4>|e
Veteran
Veteran


Joined: 12 Apr 2004
Posts: 1616
Location: USA

PostPosted: Tue May 05, 2009 3:56 am    Post subject: Reply with quote

poly_poly-man wrote:
-=GGW=- $ol!d $n4>|e wrote:
poly_poly-man wrote:
opendns sucks (as you may have read in similar threads)

install bind on your machine - you won't regret it.


Is there a how-to for bind? I've looked around and everything seems to be talking about bind for setting up a dhcp server, not recieving an ip. :?
bind is not a DHCP server - it is a DNS server.

to get basic functionality out of it (no lan zones, caching enabled(?), allowed access from localhost), it should be as simple as emerge and start the named service.


WOW. Bind speeds up things a ton. Thanks!
Back to top
View user's profile Send private message
cwr
Veteran
Veteran


Joined: 17 Dec 2005
Posts: 1969

PostPosted: Tue May 05, 2009 10:43 am    Post subject: Reply with quote

poly_poly-man wrote:
opendns sucks (as you may have read in similar threads)

install bind on your machine - you won't regret it.


Yes, I've read the comments, which is why I qualified my answer. Do you know
_why_ OpenDNS sucks, or do you just dislike the name?

Will
Back to top
View user's profile Send private message
poly_poly-man
Advocate
Advocate


Joined: 06 Dec 2006
Posts: 2477
Location: RIT, NY, US

PostPosted: Tue May 05, 2009 11:12 am    Post subject: Reply with quote

cwr wrote:
poly_poly-man wrote:
opendns sucks (as you may have read in similar threads)

install bind on your machine - you won't regret it.


Yes, I've read the comments, which is why I qualified my answer. Do you know
_why_ OpenDNS sucks, or do you just dislike the name?

Will

#1: the weird search on bad requests. Not only very annoying to the user, but if you run anything that checks for dns validity, it will always come back valid (this screws up mail servers in particular)

#2: you expose yourself to much easier dns cache poisoning. people are likely to attack the opendns servers, because of the number of users and companies on them. One attack there gets millions of results instantly. Nobody is going to attack my server because if they do, they'll get 2 people (and like 6 computers depending on time-of-day).

#3: a non-local dns server will never be as good as a local one. consider how dns works - small udp packets back and forth for every unique host you visit (on some websites, this number can be huge - think ad.doubleclick et al). When that's in another state, you get lag (and since it's udp, probably lost packets you have to resend for). When it's running within your lan, or better yet on your machine, and caching intelligently, if you ask for a server once, you're even (or a little bit behind) with the other servers. Now ask for that host again, and the query will take milliseconds.

#4: lack of control. When you are a slave to a server like that (opendns, your isp, etc.), when you make a request, you wait until it decideds it's ready to service you. so, while it is an intelligently caching spaning server on that end, other users are using it - so you wait your turn. When you run the server, you know your results come from the official source and quickly... it asks root-servers, then the answer it got from them, and the answer it got from then and so on until someone knows who it is. This all happens on the opendns end too... butit this case, the data you need is right there.

opendns really isn't good... especially when there's so much better available.
_________________
iVBORw0KGgoAAAANSUhEUgAAA

avatar: new version of logo - see topic 838248. Potentially still a WiP.
Back to top
View user's profile Send private message
-=GGW=- $ol!d $n4>|e
Veteran
Veteran


Joined: 12 Apr 2004
Posts: 1616
Location: USA

PostPosted: Tue May 05, 2009 11:19 am    Post subject: Reply with quote

well, I couldn't configure bind correction because i'm not sure what the how-to means when it says to set up nameserver aliases in /etc/hosts for my local ip as 1.2.3.4

my localnet as home.local and my externially served domain as home.net

BUT! I did stumble upon the problem I'm getting. For some reason, my router is bieng used as a dns. If i comment out the routers ip in my resolv.conf so it looks like

Quote:

cat /etc/resolv.conf
# Generated by resolvconf
search hsd1.ca.comcast.net.
#nameserver 192.168.1.108
nameserver 68.87.76.178
nameserver 68.87.78.130


I get normal response times. The problem is, since resolv.conf gets rewritten evertime I boot, how do i stop my router from getting added to it?[/quote]
Back to top
View user's profile Send private message
MaximeG
l33t
l33t


Joined: 15 Apr 2008
Posts: 722
Location: Belgium

PostPosted: Tue May 05, 2009 11:25 am    Post subject: Reply with quote

By switching to static ip ? :p

Sounds like it's the easiest way to solve it.
Or install bind, as suggested before ?

Regards,
Maxime
_________________
Future is wide open.
Back to top
View user's profile Send private message
-=GGW=- $ol!d $n4>|e
Veteran
Veteran


Joined: 12 Apr 2004
Posts: 1616
Location: USA

PostPosted: Tue May 05, 2009 11:49 am    Post subject: Reply with quote

Why cant i just tell it not to use my router dns and go to the other dn's it detects from my isp? It seems like that would be the best solution, since if i comment out my routers ip, everything seems to work fine. Theres something i'm not getting here. Either way, if do have to host a dns in order to fix it, can anyone explain how to set up /etc/hosts as they describe at http://en.gentoo-wiki.com/wiki/BIND#Server_Prerequisites?

I would definitely prefer not to host a dns. :\

I have a feeling theres a major concept here i'm missing as well though.

EDIT: Well, i got fed up and started messing with the router config, figured i would take the time to reset peoples laptops as they come through and realize they can't get internet. Not sure what happened but i'm still using dhcp but now i'm getting the correct nameserver in /etc/resolv.conf :oops:
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum