LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-07-2006, 08:44 AM   #1
zCut
LQ Newbie
 
Registered: Mar 2006
Posts: 5

Rep: Reputation: 0
Internet routing delay


Hi,
I'm quite new to linux and very new to this forum. And here is my problem: It seems, that there is somthing misconfigured with network settings, because most of the time, when I want to connect to a remote server (no matter what kind of server) I get an annoying delay of up to ten seconds before I can resolve the hostname. I'm using a DSL-Router and don't have this problem under the other OS. I don't use a personal firewall and here are some outputs:
Code:
$ route
localnet        *               255.255.255.0   U     0      0        0 eth1
default         192.168.0.1     0.0.0.0         UG    0      0        0 eth1

$ route -n
192.168.0.0     0.0.0.0         255.255.255.0   U     0      0        0 eth1
0.0.0.0         192.168.0.1     0.0.0.0         UG    0      0        0 eth1

$ ifconfig
eth1      Protokoll:Ethernet  Hardware Adresse 00:80:AD:7D:27:5A
          inet Adresse:192.168.0.4  Bcast:192.168.0.255  Maske:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:15689 errors:0 dropped:0 overruns:0 frame:0
          TX packets:17226 errors:0 dropped:0 overruns:0 carrier:0
          Kollisionen:43 Sendewarteschlangenlänge:1000
          RX bytes:10534212 (10.0 MiB)  TX bytes:2573706 (2.4 MiB)
          Interrupt:19 Basisadresse:0x9000

lo        Protokoll:Lokale Schleife
          inet Adresse:127.0.0.1  Maske:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:134 errors:0 dropped:0 overruns:0 frame:0
          TX packets:134 errors:0 dropped:0 overruns:0 carrier:0
          Kollisionen:0 Sendewarteschlangenlänge:0
          RX bytes:14021 (13.6 KiB)  TX bytes:14021 (13.6 KiB)
Any help or hint is really welcome! Thanks
zCut
 
Old 03-07-2006, 09:01 AM   #2
_KDF
Member
 
Registered: Oct 2003
Distribution: FC4/5 & RHEL4
Posts: 133

Rep: Reputation: 15
Check your DNS servers, a non existent or offline DNS server can cause simmilar problems.

cat /etc/resolv.conf

if you have 2 dns servers try swapping them around and see if that solves the problem.
 
Old 03-07-2006, 09:11 AM   #3
zCut
LQ Newbie
 
Registered: Mar 2006
Posts: 5

Original Poster
Rep: Reputation: 0
Thanks for your quick reply, but that file only contains:
Code:
nameserver 192.168.0.1
That is my router and so I think, this should be ok. Any other idea?
 
Old 03-07-2006, 09:34 AM   #4
_KDF
Member
 
Registered: Oct 2003
Distribution: FC4/5 & RHEL4
Posts: 133

Rep: Reputation: 15
Try changing the /etc/resolv.conf to your ISP's DNS server IP's manually and see if that fixes the delay problem. My guess is it will.

eg.

nameserver 1.2.3.4
nameserver 2.3.4.5


Change the above IP's to valid DNS servers.
 
Old 03-07-2006, 09:39 AM   #5
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,661

Rep: Reputation: Disabled
You can do dig www.google.com and see how long it takes and which server is responding.
 
Old 03-07-2006, 09:58 AM   #6
marozsas
Senior Member
 
Registered: Dec 2005
Location: Campinas/SP - Brazil
Distribution: SuSE, RHEL, Fedora, Ubuntu
Posts: 1,499
Blog Entries: 2

Rep: Reputation: 68
Check your /etc/nsswitch.conf

Check your /etc/nsswitch.conf file, too.
The hosts entry must be "files dns".
A entry like "file nis ldap dns" would introduce those delays you are reporting.
 
Old 03-07-2006, 11:01 AM   #7
zCut
LQ Newbie
 
Registered: Mar 2006
Posts: 5

Original Poster
Rep: Reputation: 0
First I want to thank all of you for your effort, but the problem still remains:
Quote:
Originally Posted by _KDF
Try changing the /etc/resolv.conf to your ISP's DNS server IP's manually and see if that fixes the delay problem. My guess is it will.
I tried that, but actually it doesn't seem to have any effect, so I changed it back... But anyways, thanks for that suggstion!

Quote:
Originally Posted by Emerson
You can do dig [I cannot post the URL] and see how long it takes and which server is responding.
That gave me the following output:
Code:
...

;; Query time: 17 msec
;; SERVER: 192.168.0.1#53(192.168.0.1)
;; WHEN: Tue Mar  7 17:30:34 2006
;; MSG SIZE  rcvd: 111
I don't know how that "Query time" is measured but actually it took me several seconds before I got any response. I cannot post URLs, because I don't have 5 posts so far, so I had to shorten the output a bit, but what else should it show to me, that may help?

@marozsas
The "hosts" in my '/etc/nsswitch.conf' is already "files dns".

Another thing: I don't get this annoying delay everytime. And actually I'm not able to find any pattern in it. Sometimes it works, but more often it does not. And when I once resolved the host, the second time doesn't make any trouble..., only the first one.
 
Old 03-07-2006, 11:29 AM   #8
marozsas
Senior Member
 
Registered: Dec 2005
Location: Campinas/SP - Brazil
Distribution: SuSE, RHEL, Fedora, Ubuntu
Posts: 1,499
Blog Entries: 2

Rep: Reputation: 68
Quote:
Originally Posted by zCut
That is my router and so I think, this should be ok. Any other idea?
This is odd. Routers are not Domain Name Servers. This make sense for anyone else ?

Try to find a real DNS server and put its IP in the resolv.conf file.

Another idea. Run your own Name server. The default configuration for the most distros are cache only, which is just fine for you. What distro is yours ?
 
Old 03-07-2006, 12:29 PM   #9
zCut
LQ Newbie
 
Registered: Mar 2006
Posts: 5

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by marozsas
This is odd. Routers are not Domain Name Servers. This make sense for anyone else ?

Try to find a real DNS server and put its IP in the resolv.conf file.
This may be odd, but I have to say, that it is may neighbour who actually "owns" the internet connection and set up the network. So I have no details how it works, but it works ...for several years now. But as I said, after _KDF suggested me the same thing, I also tried two of the official DNS severs of our ISP and there was no difference.

Quote:
Another idea. Run your own Name server. The default configuration for the most distros are cache only, which is just fine for you. What distro is yours ?
I'm using Ubuntu (breezy). Can you pleas explain how to run my own nameserver. What do I have to enter where? Thank you
 
Old 03-07-2006, 12:47 PM   #10
marozsas
Senior Member
 
Registered: Dec 2005
Location: Campinas/SP - Brazil
Distribution: SuSE, RHEL, Fedora, Ubuntu
Posts: 1,499
Blog Entries: 2

Rep: Reputation: 68
Quote:
Originally Posted by zCut
I'm using Ubuntu (breezy). Can you pleas explain how to run my own nameserver. What do I have to enter where? Thank you
I'm not a Ubuntu expert, but the in general, there is a script named "bind" or "named" in /etc/init.d. If it is there, type:
Code:
# /etc/init.d/named start
to test:
Code:
$ dig @localhost www.google.com
if it works (there is a NOERROR in the header section), than put 127.0.0.1 in your /etc/resolv.conf.

I hope this helps,
 
Old 03-07-2006, 01:13 PM   #11
zCut
LQ Newbie
 
Registered: Mar 2006
Posts: 5

Original Poster
Rep: Reputation: 0
That script (/etc/init.d/bind9) already runs at startup and yes, adding 127.0.0.1 to /etc/resolv.conf seems really to make things better: The delay is shortened to 2-3 seconds now, which is ok for me, although I have no clue why this helped? Mmmh..., strange..., and I just checked, there is still no such delay under Wind**s (where I use the same DNS). But as I said: I can live with this short delay and am really grateful for all your help.

thanks
zCut
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
internet activity delay MacDahlin Linux - Software 4 04-17-2006 08:12 AM
Routing internet to windows Maiios Linux - Networking 13 03-03-2004 05:18 PM
Network routing of Internet jester_69 Linux - Networking 3 12-03-2003 12:18 PM
Routing to Internet dunmarie Linux - Networking 6 09-18-2003 06:19 AM
Internet routing broke CurlyMo Linux - Networking 5 04-07-2003 03:55 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:14 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration