LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 05-31-2007, 09:32 AM   #1
WebGraphics
Member
 
Registered: Jan 2006
Location: Canada, AB
Distribution: Slackware 12.1
Posts: 70

Rep: Reputation: 18
Help me diagnose this internet problem (DNS related)


I will try to put this as simply and generally as possible.

Lets say you can browse the internet from BASH using Lynx or any other text browser, and there are NO problems accessing the internet.

BUT

As soon as you start X (using KDE or whatever) and use a GUI web browser you have problems sending/connecting/recieving info to/from the DNS server.

THEN

What kind of problem is that?

Summary... Problems with
DNS in X (example: KDE using Firefox), these problems go away when browsing from BASH (example: Lynx). What kind of problem is that?
 
Old 05-31-2007, 10:27 AM   #2
dracolich
Senior Member
 
Registered: Jul 2005
Distribution: Slackware
Posts: 1,173

Rep: Reputation: 47
Firefox has, if you go into Prefernces -> Advanced -> Network options for how it connects to the internet. If it's set to any kind of Proxy instead of Direct Connection that could be the cause. I'm sure Konqueror has similar options but I don't recall haw to find it.
 
Old 05-31-2007, 03:43 PM   #3
WebGraphics
Member
 
Registered: Jan 2006
Location: Canada, AB
Distribution: Slackware 12.1
Posts: 70

Original Poster
Rep: Reputation: 18
Thanks for the reply dracolich.

Yes, my Firefox connection is set to "Direct connection to the Internet." I also tried "Auto detect proxy settings for this network," but it didn't make any difference.

Once again, here is my problem:

When I run an internet browser from X (KDE 3.5) I have issues with the DNS server. I don't know if the issue is with sending or recieving datat to/from the DNS server, but the problem only occurs when I am running a browser from X, be it SeaMonkey, Konquerer or Firefox.

When I run an internet browser that does not require X (Lynx for example) there is no issue with the DNS server and my connection behaves flawlessly.

X --> DNS problems
BASH --> No DNS problems

Can anyone give me an idea what kind of problem this is? I am not looking for an exact solution, I just want some ideas what could be the cause of a problem like this.
 
Old 05-31-2007, 03:59 PM   #4
kav
Member
 
Registered: May 2006
Location: USA
Distribution: FreeBSD Ubuntu Debian
Posts: 137

Rep: Reputation: 15
Odds are this problem has nothing at all to do with X, instead it probobly has to do with how lynx finds DNS information.

The first thing I would check is what happens when you start pinging random domains. It should say something like this:
$ ping google.com
PING google.com (64.233.167.99) 56(84) bytes of data.
64 bytes from py-in-f99.google.com (64.233.167.99): icmp_seq=1 ttl=240 time=29.4 ms

That way I would know I was getting DNS information, but the fact that one of your browsers works, reguardless of which(x or not), indicates that you are getting good DNS information. For some reason your other browsers aren't using that good DNS information I guess.

I would try setting my DNS servers manually. I use http://www.opendns.com/
the addresses are 208.67.222.222 and 208.67.220.220
set them with nameserv ###.###.###.### in /etc/resolv.conf

Depending on distro, if you use DHCP that file might get overwritten in which case you would have to edit /etc/dhcp3/dhclient.conf I think.

I actually have those DNS addresses set in my router so I get them through DHCP because with all my computers it's just easier that way.

If all that is way too complicated you could just set your DNS servers in the individual browsers.
 
Old 05-31-2007, 06:03 PM   #5
WebGraphics
Member
 
Registered: Jan 2006
Location: Canada, AB
Distribution: Slackware 12.1
Posts: 70

Original Poster
Rep: Reputation: 18
You are obviously a very smart guy, kav.

I will try to explain what happened here, since I was able to solve the issue with some hints from you.

My modem can be configured through an interface to return a set DNS server address. (Alternatively it can be set to automatically assign a DNS server.) I had set these DNS servers to ones that are known to be good, with the understanding that DHCP would relay the data to my computer and all would be well.

However... what the modem returned through DHCP was my router address. In other words my DNS address was set to my router address.

My previous modem (which was older) did not do this, and it returned a DNS address.

So by editing /etc/resolv.conf
Code:
# Generated by dhcpcd for interface eth0
search gateway.2wire.net
nameserver 208.67.222.222
I was able to resolve the issue...

If you don't mind answering another question, what can I do so that next time DHCP info is being relayed it doesn't just set the DNS address back to my router address. That seems to be what the problem was here...

 
Old 05-31-2007, 07:04 PM   #6
dracolich
Senior Member
 
Registered: Jul 2005
Distribution: Slackware
Posts: 1,173

Rep: Reputation: 47
Glad to see you got it 'resolv'ed. I couldn't help the pun.

To disable DHCP for the interface, I find the easiest way is to edit the file /etc/rc.d/rc.inet1.conf. It has lines for up to 4 eth interfaces. One of the lines is USE_DHCP[0]= If it has 'yes' after the = delete it so it looks like ="". That's how mine is and I use a self-made script to configure eth when I'm ready.
 
Old 06-01-2007, 12:10 AM   #7
camh
Member
 
Registered: Feb 2005
Distribution: Slack/Debian
Posts: 163
Blog Entries: 2

Rep: Reputation: 33
You can add a -R to the dhcpcd command in rc.inet1. This prevents dhcpcd from replacing /etc/resolv.conf

eg. Add a -R after dhcpcd in the lines:
Code:
/sbin/dhcpcd -d -t 10 -h ${DHCP_HOSTNAME[$1]} eth${1}
and
Code:
/sbin/dhcpcd -d -t 10 eth${1}

Last edited by camh; 06-01-2007 at 12:11 AM.
 
Old 06-01-2007, 06:37 AM   #8
dracolich
Senior Member
 
Registered: Jul 2005
Distribution: Slackware
Posts: 1,173

Rep: Reputation: 47
Interesting. I didn't know about -R. I do all of my addressing static so I haven't explored dhcpcd's options.
 
Old 06-01-2007, 07:53 AM   #9
kav
Member
 
Registered: May 2006
Location: USA
Distribution: FreeBSD Ubuntu Debian
Posts: 137

Rep: Reputation: 15
I think this depends on how your distro treats resolv.conf and host.conf

Since it seems your /etc/resolv.conf is generated automatically (and will be over written on dhcp) hence
Quote:
# Generated by dhcpcd for interface eth0
You'll probably have to do something like camh said.

Or you could do like I do and set valid dns servers in your router. That way, when your dns points to your router your router just points to the actual dns servers.
 
Old 06-01-2007, 11:33 AM   #10
WebGraphics
Member
 
Registered: Jan 2006
Location: Canada, AB
Distribution: Slackware 12.1
Posts: 70

Original Poster
Rep: Reputation: 18
Thank you for the replies.

The problem started recently when I was forced to switch my ADSL modem for a 2WIRE 2700HG-E wireless router.

The 2WIRE returns my router address as the DNS server because it is trying to act as a caching nameserver. This is supposed to speed things up, but for some reason I am getting a constant 10 second delay whenever I lookup a new web address.

The fact that the delay is 10 seconds on the dot suggests to me there is a compatability problem with the 2WIRE and my computer... in my case it is actually much faster to just set the DNS server externally. Apparently this is not the case with Mac and PCs though.

Unfortunately the DNS lookup is still a bit slower than my previous modem, despite editing the resolv.conf file.

I wish I could figure out just what is causing this delay, but unfortunately the modem came in used condition from my ISP and without any documentation other than "call us and we'll set you up".

I actually had to search for the password on the internet to access the router settings since my ISP is not allowed to give it to their customers.

I will try to add the -R to the dhcpcd and see if that helps. I will let you know how I make out.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
problem related with DNS server er_gaurav22 Linux - Server 1 08-28-2006 07:48 AM
how to diagnose computer slowing down problem towsonu2003 Linux - Laptop and Netbook 7 03-05-2006 05:43 PM
A strange problem... probably DNS related but I am not sure kosmepe Linux - Networking 3 01-24-2006 09:46 PM
DNS related problem eantoranz Linux - Software 3 04-01-2004 05:23 AM
How to diagnose a hardware problem? bhashman Linux - Hardware 4 02-23-2004 11:11 PM


All times are GMT -5. The time now is 08:50 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration