You are not logged in.

#1 2009-03-06 15:34:16

Gen2ly
Member
From: Sevierville, TN
Registered: 2009-03-06
Posts: 1,529
Website

[Solved] DNS lookups Really Slow

I just installed a new NIC and added to rc.conf restarted the network and now my DNS lookups are painfully slow:

time ping -c 1 archlinux.org
real    0m15.232s
user    0m0.003s
sys     0m0.000s

I added the new NIC in /etc/rc.conf like this:

eth0="eth0 192.168.0.7 netmask 255.255.255.0 broadcast 192.168.0.255"
INTERFACES=(eth0)

eth1="dhcp"
INTERFACES=(eth1)

gateway="default gw 192.168.0.1"
ROUTES=(gateway)

And my hostnames are ok I think:

HOSTNAME="part-emach" # rc.conf
127.0.0.1       part-emach              localhost # /etc/hosts

The routing table looks like this:

$ route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.0.0     0.0.0.0         255.255.255.0   U     0      0        0 eth0
71.87.120.0     0.0.0.0         255.255.252.0   U     0      0        0 eth1
0.0.0.0         192.168.0.1     0.0.0.0         UG    0      0        0 eth0
0.0.0.0         71.87.120.1     0.0.0.0         UG    0      0        0 eth1

I couldn't find much details on adding a new NIC expect from a page that may be outdated.  Are my eth0 setting in rc.conf ok?  Any thoughts?

Last edited by Gen2ly (2009-03-07 03:41:28)


Setting Up a Scripting Environment | Proud donor to wikipedia - link

Offline

#2 2009-03-06 16:28:40

mechmg93
Member
From: Greece
Registered: 2007-05-23
Posts: 197

Re: [Solved] DNS lookups Really Slow

cat /etc/resolv.conf

and paste the result wink


Mikes on AUR

Offline

#3 2009-03-06 16:44:57

Gen2ly
Member
From: Sevierville, TN
Registered: 2009-03-06
Posts: 1,529
Website

Re: [Solved] DNS lookups Really Slow

Appreciate the quick response mechmg93.  resolv.conf:

search eau.wi.charter.com
nameserver 68.115.71.53
nameserver 24.196.64.53
nameserver 24.159.193.40

Setting Up a Scripting Environment | Proud donor to wikipedia - link

Offline

#4 2009-03-06 18:41:06

twiistedkaos
Member
Registered: 2006-05-20
Posts: 666

Re: [Solved] DNS lookups Really Slow

Hmm I seem to be having the same issue as of late. Nothing has changed on my system however. Was using windows for a project for about a month, Got back on linux yesterday and my DNS loopups are taking 10-15 secs as well. Download speeds seem be fine though.

Offline

#5 2009-03-06 22:22:20

cactus
Taco Eater
From: t͈̫̹ͨa͖͕͎̱͈ͨ͆ć̥̖̝o̫̫̼s͈̭̱̞͍̃!̰
Registered: 2004-05-25
Posts: 4,622
Website

Re: [Solved] DNS lookups Really Slow

Gen2ly wrote:
$ route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.0.0     0.0.0.0         255.255.255.0   U     0      0        0 eth0
71.87.120.0     0.0.0.0         255.255.252.0   U     0      0        0 eth1
0.0.0.0         192.168.0.1     0.0.0.0         UG    0      0        0 eth0
0.0.0.0         71.87.120.1     0.0.0.0         UG    0      0        0 eth1

I couldn't find much details on adding a new NIC expect from a page that may be outdated.  Are my eth0 setting in rc.conf ok?  Any thoughts?

Why do you have two default gateways? That isn't right.
You only want one default gateway. I suggest commenting out the gateway lines, as your dhcp client is setting your upstream gateway for you. You don't need a gateway for an attached network (to your nic).


"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍

Offline

#6 2009-03-07 03:40:37

Gen2ly
Member
From: Sevierville, TN
Registered: 2009-03-06
Posts: 1,529
Website

Re: [Solved] DNS lookups Really Slow

Thanks cactus, got it fixed:

INTERFACES=(eth0 eth1)

eth0="eth0 192.168.0.7 netmask 255.255.255.0 broadcast 192.168.0.255"
eth1="dhcp"

The problem turned out to be with dnsmasq that binds to world ports tcp/udp 53 and 67 udp.  Adding domain and bootps to /etc/hosts.allow does the trick though I just did bind-interfaces in /etc/dnsmasq.  I didn't find any information on this so I wrote a wiki for it:

http://wiki.archlinux.org/index.php/Dnsmasq

Last edited by Gen2ly (2009-03-07 03:41:07)


Setting Up a Scripting Environment | Proud donor to wikipedia - link

Offline

Board footer

Powered by FluxBB