2

I have a dual-boot machine: Windows 7 and Ubuntu 10.04. The computer is connected directly to the Baudtec modem by a LAN cable. The modem is connected to the phone jack. Under Windows, the internet works without any problems.

Under Ubuntu, I set up by using pppoeconf and can get online without a problem. However, after some time (about 15-20 minutes, sometimes less), the internet stops working. That is, I cannot open any website. I can still "ping 8.8.8.8", although "ping www.google.com" says "unknown host". Also, if I have gmail open in the browser, it may continue to work for some time, though I cannot load any other site. Also, my ISP continues to see me online, so there is no problem from their point of view.

The following commands do not help to restore the full connection:

pkill -9 pppd

pon dsl-provider

However, they do help after powering off the modem, waiting for a little while and turning it back on again. I exchanged the modem (Baudec is the current one), but the problem persisted.

Please let me know what information I may provide to help diagnose the problem. I will very much appreciate your help.

Meir

Update:

Thanks to the first reply, I found a much easier way to restore connection after a crash. Namely, I noticed that after doing "ping 8.8.8.8", I can ping my provider (i.e. the IPs in the /etc/resolv.conf before the crash) as well. So, I just do "ping 8.8.8.8" and restore /etc/resolv.conf from a backup copy and the internet works again! I do not even have to restart pppd. After some 20 minutes the problem repeats itself...

AlwaysLearning
  • 437
  • 1
  • 5
  • 18

2 Answers2

1

What does /etc/resolv.conf show? If you can ping 8.8.8.8 but not your ISP's server, then they have a problem. You should be able to change it to 8.8.8.8 and work around it.

psusi
  • 37,033
  • 2
  • 68
  • 106
  • Not sure if this is related, but today I also got this error when started chrome: [2311:2507:220636519:ERROR:cert_verify_proc_nss.cc(744)] CERT_PKIXVerifyCert for platform.stumbleupon.com failed err=-8179 – AlwaysLearning Nov 28 '12 at 06:32
  • When internet is on, /etc/resolve.conf shows: nameserver 212.76.127.133 nameserver 213.151.32.70 domain domain.name search domain.name – AlwaysLearning Nov 28 '12 at 06:35
  • How do I start a new line in the comment here? Whenever I press ENTER, it submits the comment... – AlwaysLearning Nov 28 '12 at 06:38
  • When broken, the contents of /etc/resolve.conf change: nameserver 10.0.0.138 domain domain.name search domain.name – AlwaysLearning Nov 28 '12 at 07:12
  • I cannot blame the ISP, since I do not experience any problems under Windows. – AlwaysLearning Nov 28 '12 at 07:20
  • You don't need to worry about new lines in comments. Try using `Shift` + `Enter` if you are used to write stuff like that. – nikhil Nov 28 '12 at 08:23
  • When internet isn't working, change `/etc/resolv.conf` to `nameserver 8.8.8.8` If it works I can tell you how to make the change permanent. – nikhil Nov 28 '12 at 08:27
  • Yes, I know about the option of using Google's DNS, but that would probably be slower than my ISP's DNS, since Google is far. Also I am curious to find the reason for this problem. Also, please see the update in my original message. – AlwaysLearning Nov 28 '12 at 09:11
  • @MeirGoldenberg, I think I know what is wrong now. Your ISP uses PPPoE ( which is a horrible protocol by the way, if you have the choice of another ISP that doesn't use it, you should switch ). This means you get one normal IP address from the network, then a second from the PPPoE tunnel. I'll bet that the two are conflicting over yuor DNS settings. Disable the DNS on the ethernet connection in the network manager. – psusi Nov 28 '12 at 16:19
  • I am using Wicd. When I go into Properties of my wired connection, the "static DNS" flag is off. The "Global DNS" flag is inactive. So, what should I do? Thank you! – AlwaysLearning Nov 28 '12 at 16:27
  • @MeirGoldenberg, you want to make sure it is NOT trying to use DHCP to get the dns setting. It sounds like the modem provides a dummy IP and DNS via DHCP so whenever DHCP refreshes on the wired connection, it takes over your DNS setting from the PPPoE connection. – psusi Nov 28 '12 at 16:34
  • There is a flag "DHCP hostname" in Wicd and the edit field opposite it is filled with "meir-desktop" (which is my computer's name), but the flag is not checked. Could you please recommend a specific action that would fix the problem? Thank you! – AlwaysLearning Nov 28 '12 at 17:25
  • @MeirGoldenberg, no, I can't, since I'm not familliar with wicd. You need to figure out how to make it use DHCP for the IP address, but not DNS servers. – psusi Nov 28 '12 at 19:17
0

I decided to post the work-around that I am currently successfully using (to this minute, half-a-day of stable connection). When connected, make a backup copy of /etc/resolv.conf, say /etc/resolv.conf.back.

Also, to make life easier, modify your sudoers, so sudo should not timeout and you do not have to enter your password each time you are disconnected:

Defaults env_reset,timestamp_timeout=-1

At the beginning of your day, start the connection by running the following script.

#!/bin/bash

sudo -k
echo date 'START...'
sudo cp /etc/resolv.conf.back /etc/resolv.conf
sudo pon dsl-provider

while true; do
if ! $(host -W1 www.google.com > /dev/null 2>&1); then
echo
echo date 'connection FAILURE, doing the trick...'
ping -c1 -q 8.8.8.8
sudo cp /etc/resolv.conf.back /etc/resolv.conf
fi
sleep 2
done

AlwaysLearning
  • 437
  • 1
  • 5
  • 18