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...

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
  • 38,031
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