LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   slow DNS resolution in Ubuntu (https://www.linuxquestions.org/questions/linux-networking-3/slow-dns-resolution-in-ubuntu-357257/)

septanla 08-26-2005 11:14 AM

slow DNS resolution in Ubuntu
 
I encounter slow domain name resolution in mozilla firefox. My system is
UBUNTU 2.6.10-5-686 kernel.. THe network schema is ADSL modem >> TLink -WR541G router >> my computer.

The model of my computer is IBM thinkpad T21, with dual system of Ubuntu and Winxp.

My problem is that it takes me a very long time to resolve a domain name (in the status bar of firefox, the words "looking up ....domain name..." stay for a long time. Quite often, the name was not resolved and timed out.
I tried to ping google or yahoo website, it is slow, sometime, timed out.

I have searched the posts and confirned that modifying the file /etc/resolv.conf did not help (not matter I change it to previous one plus 192.168.1.1 or not). THe IP address is the same as the DNS server displayed using ipconfig /all in Winxp.

Now the thing is that Winxp can resolve simialr webiste quite fast. (note, in order my network (non-wireless one, eth0) card to work, I add apci=off in menu.lst. (not sure whehter this will affect wireless eth1. But another post I googeled, suggest to change acpi=hd noacpi. but this does not help. I also disable IP6 by add "alias net-of-10 off" in /etc/modprobe.d/alias, still does not work.

Here I post the part of the result of ifconfig:

eth1 Link encap:Ethernet HWaddr 00:09:5B:92:B5:80
inet addr:192.168.1.2 Bcast:255.255.255.255 Mask:255.255.255.0
inet6 addr: fe80::209:5bff:fe92:b580/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2495 errors:0 dropped:0 overruns:0 frame:0
TX packets:2882 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1896979 (1.8 MiB) TX bytes:477766 (466.5 KiB)
Interrupt:11

Here is the content of /etc/resolv.conf

search domain
nameserver 202.96.128.68
nameserver 202.96.134.188
nameserver 202.96.134.133
nameserver 192.168.1.1

This problem had bothered my serveral months. I am very appreciated if u can give me some suggestions.

Cheers

Septanla

primo 08-26-2005 01:08 PM

Go to Firefox/Mozilla and disable IPv6. Type "about:config" then set
network.dns.disableIPv6 to true

septanla 08-27-2005 07:49 PM

Hi, primo, I change the configuration as you recommended. However, things do not change. Resolving is still slow for some website. However, I find in Redhat 9.0, the resolving is fast.

I even tried to flush out the cache in the router using ipconfig /flushdns in windows XP and restart modem and router, it does not help too.

I would be very appreciated if you can remind me any ohter configuration I can resort to to resolve the problem. My ubuntu works very well except the slow domain resolving problem for months. :-(

Cheers

primo 08-28-2005 12:59 PM

traceroute each server to see which one is nearest you

What does /etc/host.conf contain?
/etc/nsswitch.conf ?

I currently run a caching-nameserver on my box that talks directly to the root nameservers. It gives me both speed and some privacy. You may try...

aznluvsmc 08-28-2005 07:17 PM

First of all, take out the search domain line in /etc/resolv.conf. That is causing a DNS recursion to search for names in the domain zone which doesn't exist. As a side note you can only have a maximum of three name servers listed. Anymore will be useless.

septanla 08-30-2005 02:47 AM

Hi, Primo:
this is the result

traceroute each server to see which one is nearest you

What does /etc/host.conf contain?
--------------

order hosts,bind
multi on
-----------------
/etc/nsswitch.conf

# /etc/nsswitch.conf
#
# Example configuration of GNU Name Service Switch functionality.
# If you have the `glibc-doc' and `info' packages installed, try:
# `info libc "Name Service Switch"' for information about this file.

passwd: compat
group: compat
shadow: compat

hosts: files dns
networks: files

protocols: db files
services: db files
ethers: db files
rpc: db files

netgroup: nis

----------------

It does not matters if I change the order of the three DNS servers.

I also want to install a local caching for DNS server. and I followed Unofficial Ubuntu 5.04 Starter Guide

sudo apt-get install dhcp3-server

But, it gave an error message:
----------------
Starting DHCP server: dhcpd3 failed to start - check syslog for diagnostics.
invoke-rc.d: initscript dhcp3-server, action "start" failed.
----------------

any ideas?

Also the domain name resolution problem becomes better when I change the DNS server list to: 62.41.128.51 and 62.41.128.52. I get this from another post in linuxquestions. Is there any better solution?

Cheers

Septanla

septanla 08-30-2005 02:49 AM

Hi, aznluvsmc:

I tried ur suggestions, however, it does not work out. even I remove 'search domain' line, it is still very slow and in some cases timed out.

Thanks a lot for your input!

Septanla

cicciobello 05-11-2009 05:40 PM

This is how I solved it...
 
Quote:

Originally Posted by septanla (Post 1821320)
I encounter slow domain name resolution in mozilla firefox. My system is
UBUNTU 2.6.10-5-686 kernel.. THe network schema is ADSL modem >> TLink -WR541G router >> my computer.

The model of my computer is IBM thinkpad T21, with dual system of Ubuntu and Winxp.

My problem is that it takes me a very long time to resolve a domain name (in the status bar of firefox, the words "looking up ....domain name..." stay for a long time. Quite often, the name was not resolved and timed out.
I tried to ping google or yahoo website, it is slow, sometime, timed out.

I have searched the posts and confirned that modifying the file /etc/resolv.conf did not help (not matter I change it to previous one plus 192.168.1.1 or not). THe IP address is the same as the DNS server displayed using ipconfig /all in Winxp.

Now the thing is that Winxp can resolve simialr webiste quite fast. (note, in order my network (non-wireless one, eth0) card to work, I add apci=off in menu.lst. (not sure whehter this will affect wireless eth1. But another post I googeled, suggest to change acpi=hd noacpi. but this does not help. I also disable IP6 by add "alias net-of-10 off" in /etc/modprobe.d/alias, still does not work.

Here I post the part of the result of ifconfig:

eth1 Link encap:Ethernet HWaddr 00:09:5B:92:B5:80
inet addr:192.168.1.2 Bcast:255.255.255.255 Mask:255.255.255.0
inet6 addr: fe80::209:5bff:fe92:b580/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2495 errors:0 dropped:0 overruns:0 frame:0
TX packets:2882 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1896979 (1.8 MiB) TX bytes:477766 (466.5 KiB)
Interrupt:11

Here is the content of /etc/resolv.conf

search domain
nameserver 202.96.128.68
nameserver 202.96.134.188
nameserver 202.96.134.133
nameserver 192.168.1.1

This problem had bothered my serveral months. I am very appreciated if u can give me some suggestions.

Cheers

Septanla

I had the same problem. I use OpenDNS. Followed these simple instructions from OpenDNS, instead of changing the DNS from the "Network" icon and now it is super fast!

# Right-click on ‘Network Icon’ (located at top-right panel by default) and click on ‘Edit Connections’ to open Network Connections Manager.
# Choose the type of connection you have. For this example, we will use ‘Wired’.
# Under ‘Wired’, highlight ‘Auto etho’ and click on ‘Edit’.
# Inside 'Editing Auto etho' window, click on ‘IPv4 Settings’ tab.
# Under ‘IPv4 Settings’, change the ‘Method’ to Automatic (DHCP) addresses only.
# Put these nameserver addresses as your ‘DNS Servers’: 208.67.222.222, 208.67.220.220
# Click ‘OK’ and reboot your machine.

Hope this helps.


All times are GMT -5. The time now is 10:22 PM.