View Full Version : [SOLVED] 2 NICs causing very slow DNS lookups?

July 9th, 2011, 09:27 PM
Hello all,

I'm running Ubuntu 11.04 and I'm really new to linux. My problem is that whenever I try to browse a site I notice the website loads very slowly because it takes a long time to do lookups. I installed Ubuntu with an onboard NIC and later switched to a PCI NIC (Dlink DGE-530T). Although I disabled the onboard NIC in the BIOS, it doesn't help. Could this conflict in configuration be a problem? My download rates are fine, its just lookups that take really long ( upto ~ 10 seconds). I know the PCI network card is fine because when I jump to Windows 7, lookups are normal again (~ 300ms). At first I thought about installing the sk98lin drivers for the PCI NIC but I saw a couple of places where people have mentioned that the skge driver that comes along with the kernel is better.

I have tried a system wide as well as Firefox disable of IPv6 but it didn't help.

Here is my /etc/udev/rules.d/70-persistent-net.rules

# PCI device 0x1186:0x4b01 (skge)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:24:01:14:eb:39", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

# PCI device 0x10de:0x0373 (forcedeth)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:1e:8c:3e:19:ed", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"

The interface I want to use according to the listing above is the one with the MAC - 00:24:01:14:eb:39.

I tried removing one of the entries in the file above and rebooting but it still didn't work.

Here is a look at my /etc/network/interfaces

auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet static

I have spent hours trying to figure out this problem and I'm still lost with this, especially because I'm a beginner to linux. Would really appreciate any kind of help on this guys, thanks a ton :D

July 9th, 2011, 10:01 PM
Are you using DHCP to get your network information on both sides?

What is the contents of /etc/resolv.conf? Does it list the same nameservers as Windows does? In Windows, go to Start, choose Run Program, enter "cmd" and hit return. At the prompt, type "ipconfig /all". What are your DNS servers? Are they the same servers as those listed in /etc/resolv.conf on Ubuntu?

July 9th, 2011, 10:23 PM
My /etc/resolv.conf reads

# Generated by NetworkManager
domain Home
search Home Subnet

I have setup 3 static DNS servers in the router's(Asus RT-N16) config.. Should I use those numbers here aswell? Ideally I would like my setup to be such that I would have to change DNS servers only in the Router and not in the PC , while allowing me to configure static IP in the PC itself, if thats possible..

July 11th, 2011, 01:21 PM
Including "domain Home" tells the resolver that there should be DNS entries for hostname.home. What nameserver is providing those? If the only nameserver you're using is the router's, delete the "domain" and "search" entries and see if that helps.

July 12th, 2011, 01:39 PM

Sorry about this late reply, but I tried that and it didn't work. Anyways the problem turned out to be in /etc/nsswitch.conf. I now remember that I was trying to setup a Network storage and changed the value in of "hosts" in /etc/nsswitch.conf from "files dns" to "files mdns4_minimal [NOTFOUND=return] wins dns mdns4. I changed it back now and everything is back to normal. Well I learned my lesson never to blindly play with settings unless I really know what I'm doing. Thanks a ton SeijiSensei.