LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Takes a very long time to establish internet connection (https://www.linuxquestions.org/questions/linux-newbie-8/takes-a-very-long-time-to-establish-internet-connection-4175439843/)

mgoldenbe 12-03-2012 02:26 PM

Takes a very long time to establish internet connection
 
I have a wired modem connection to ADSL under Ubuntu 10.04. Recently establishing a ppp0 connection to the internet started to take a very long time (minutes). During this time, plog shows lots of "Timeout waiting for PADO packets" and "Unable to complete PPPoE Discovery" errors. Then somehow I get through.

In a similar post, output of the following commands was requested: cat /etc/network/interfaces & lspci -nnk | grep -iA2 net & lsmod & cat /etc/resolv.conf

So, here it is: (thanks for your help!)

[1] 2712
[2] 2714
[3] 2715
nameserver 212.76.127.133
nameserver 213.151.32.70
domain domain.name
search domain.name
meir@meir-desktop:~$ Module Size Used by
xt_TCPMSS 2931 1
xt_tcpmss 1197 1
xt_tcpudp 2011 1
iptable_mangle 2771 1
ip_tables 9991 1 iptable_mangle
x_tables 14299 4 xt_TCPMSS,xt_tcpmss,xt_tcpudp,ip_tables
pppoe 8943 2
pppox 2074 1 pppoe
binfmt_misc 6587 1
fbcon 35102 71
tileblit 1999 1 fbcon
font 7557 1 fbcon
bitblit 4707 1 fbcon
softcursor 1189 1 bitblit
vga16fb 11385 0
vgastate 8961 1 vga16fb
snd_intel8x0 25652 2
snd_ac97_codec 100646 1 snd_intel8x0
ac97_bus 1002 1 snd_ac97_codec
snd_pcm_oss 35308 0
snd_mixer_oss 13746 1 snd_pcm_oss
snd_pcm 70694 3 snd_intel8x0,snd_ac97_codec,snd_pcm_oss
snd_seq_dummy 1338 0
snd_seq_oss 26722 0
snd_seq_midi 4557 0
snd_rawmidi 19056 1 snd_seq_midi
snd_seq_midi_event 6003 2 snd_seq_oss,snd_seq_midi
snd_seq 47263 6 snd_seq_dummy,snd_seq_oss,snd_seq_midi,snd_seq_midi_event
snd_timer 19130 2 snd_pcm,snd_seq
snd_seq_device 5700 5 snd_seq_dummy,snd_seq_oss,snd_seq_midi,snd_rawmidi,snd_seq
i915 290740 3
ppdev 5259 0
drm_kms_helper 29329 1 i915
dell_wmi 1793 0
usblp 10481 0
snd 54244 14 snd_intel8x0,snd_ac97_codec,snd_pcm_oss,snd_mixer_oss,snd_pcm,snd_seq_oss,snd_rawmidi,snd_seq,snd_ti mer,snd_seq_device
dcdbas 5422 0
intel_agp 24375 2 i915
parport_pc 25962 1
psmouse 63677 0
serio_raw 3978 0
drm 163779 4 i915,drm_kms_helper
i2c_algo_bit 5028 1 i915
soundcore 6620 1 snd
snd_page_alloc 7076 2 snd_intel8x0,snd_pcm
agpgart 31724 2 intel_agp,drm
video 17375 1 i915
output 1871 1 video
lp 7028 0
parport 32635 3 ppdev,parport_pc,lp
usbhid 36110 0
hid 67288 1 usbhid
floppy 53016 0
tg3 109324 0
auto lo
iface lo inet loopback

auto dsl-provider
iface dsl-provider inet ppp
pre-up /sbin/ifconfig eth0 up # line maintained by pppoeconf
provider dsl-provider

auto eth0
iface eth0 inet manual
02:00.0 Ethernet controller [0200]: Broadcom Corporation NetXtreme BCM5751 Gigabit Ethernet PCI Express [14e4:1677] (rev 01)
Kernel driver in use: tg3
Kernel modules: tg3

markush 12-03-2012 03:04 PM

Once the internetconnection is established, is it stable? are there any issues when you're connected to the internet?

Which tools do you use to establish the pppoe connection?

Markus

thelastquincy 12-03-2012 04:32 PM

Clear the cache maybe? /etc/init.d/nscd restart

markush 12-03-2012 04:38 PM

Quote:

Originally Posted by thelastquincy (Post 4842039)
Clear the cache maybe? /etc/init.d/nscd restart

thelastquincy, the problem which the OP explains is that establishing a pppoe connection takes a long time. That has nothing to do with the dns cache. When the pppoe connection is set up, dns isn't involved.

Markus

mgoldenbe 12-04-2012 02:21 AM

Quote:

Originally Posted by markush (Post 4841972)
Once the internetconnection is established, is it stable? are there any issues when you're connected to the internet?

Which tools do you use to establish the pppoe connection?

Markus

The connection breaks every 20 minutes or so. When this happens, I ping 8.8.8.8 (which works) and then restore /etc/resolv.conf from a backup copy. This restores my ability to surf.

Also, when I do pkill -9 pppd, I cannot connect with sudo pon anymore. When trying to ping, I get "network unreachable" errors.

Also, today I recalled that I had asked pppoeconf to start a connection on start-up, so I did not start my session by running the usual script of mine, which calls "sudo pon". This worked great (still the connection was not stable and I needed the trick described in the first paragraph). Could creating a second connection cause the problem that I described?

markush 12-04-2012 07:37 AM

Quote:

Originally Posted by mgoldenbe (Post 4842274)
The connection breaks every 20 minutes or so. When this happens, I ping 8.8.8.8 (which works) and then restore /etc/resolv.conf from a backup copy. This restores my ability to surf.

which dhcp client do you use? you should check if it has the ability not to override your /etc/resolv.conf
Quote:

...Also, when I do pkill -9 pppd, I cannot connect with sudo pon anymore. When trying to ping, I get "network unreachable" errors.

Also, today I recalled that I had asked pppoeconf to start a connection on start-up, so I did not start my session by running the usual script of mine, which calls "sudo pon". This worked great (still the connection was not stable and I needed the trick described in the first paragraph). Could creating a second connection cause the problem that I described?
I'm not really sure, but you confirmed my guess that the problem does not only occur while the connection is being established.

I think that the origin of your issue can also be at your ISP or the connection itself (not the adapter or the OS/driver). Do you have other computers or OSs which use the same connection?

As you know if you have a router (such a gadget which connects to your ISP via pppoe and provides an internal network with NAT/routing, DHCP, DNS and wireless), it is possible that such a router also has problems with the connection, but it will reconnect automatically and you won't recognize the issue every time it happens.

I would recommend to try it with another computer before trying to solve the issue on your computer.

Markus

mgoldenbe 12-04-2012 11:35 AM

Quote:

Originally Posted by markush (Post 4842491)
which dhcp client do you use? you should check if it has the ability not to override your /etc/resolv.conf
I'm not really sure, but you confirmed my guess that the problem does not only occur while the connection is being established.

I do not really know what dhcp is, but my /etc/network/interfaces shows this:

iface eth0 inet manual

Based on some limited research, I am guessing that "manual" means "not dhcp", right?

Quote:

Originally Posted by markush (Post 4842491)
I think that the origin of your issue can also be at your ISP or the connection itself (not the adapter or the OS/driver). Do you have other computers or OSs which use the same connection?

My computer is dual boot. With Windows 7, the connection is stable.

Quote:

Originally Posted by markush (Post 4842491)
As you know if you have a router (such a gadget which connects to your ISP via pppoe and provides an internal network with NAT/routing, DHCP, DNS and wireless), it is possible that such a router also has problems with the connection, but it will reconnect automatically and you won't recognize the issue every time it happens.

I do not have a router, only the modem, to which the computer is connected directly with a LAN cable.

markush 12-04-2012 12:25 PM

Quote:

Originally Posted by mgoldenbe (Post 4842666)
...
Based on some limited research, I am guessing that "manual" means "not dhcp", right?

probably, dhcp isn't used with a ppp connection, but you wrote that you always have to restore your /etc/resolv.conf and I was wondering how it comes that it changes. Normally when the ppp connection is established, there should also be the namserverentries generated. There is also a resolv.conf in /etc/ppp/ maybe one can make a symlink to /etc/resolv.conf
Quote:

My computer is dual boot. With Windows 7, the connection is stable.
I do not have a router, only the modem, to which the computer is connected directly with a LAN cable.
Well, then it could also be an issue with the driver for the networkadapter.

Markus

mgoldenbe 12-05-2012 08:23 AM

Quote:

Originally Posted by markush (Post 4842691)
probably, dhcp isn't used with a ppp connection, but you wrote that you always have to restore your /etc/resolv.conf and I was wondering how it comes that it changes. Normally when the ppp connection is established, there should also be the namserver entries generated. There is also a resolv.conf in /etc/ppp/ maybe one can make a symlink to /etc/resolv.conf
Well, then it could also be an issue with the driver for the networkadapter.
Markus

The nameserver entries are generated. The resolv.conf is reset to something like 10.0.0.138 when the connection is lost. At that time, I cannot ping my ISP's nameserver. After I ping 8.8.8.8, the ISP's nameserver becomes reachable as well.

The problem started only a few months ago, so may be the driver package got affected by some software updates etc... How do I go about finding out which package is responsible for that and checking that package's health?

markush 12-05-2012 08:36 AM

8.8.8.8 is a nameserver from google, you can use it in the first line of your resolv.conf if it always is reachable.

Which tools/programs do you use to connect to the internet? I would try it with as few tools possible, normally the pppoe package would suffice. But it must be configured.

Markus

mgoldenbe 12-05-2012 08:41 AM

Quote:

Originally Posted by markush (Post 4843226)
8.8.8.8 is a nameserver from google, you can use it in the first line of your resolv.conf if it always is reachable.

Which tools/programs do you use to connect to the internet? I would try it with as few tools possible, normally the pppoe package would suffice. But it must be configured.

Markus

I used only pppoeconf. I answered "Yes" to all questions and gave it my user name and password. Anyways, how come I can reach 8.8.8.8 but not my ISP's server? Also, how can pinging 8.8.8.8 suddenly fix that? This looks supernatural to me.

markush 12-05-2012 08:49 AM

Quote:

Originally Posted by mgoldenbe (Post 4843230)
I used only pppoeconf. I answered "Yes" to all questions and gave it my user name and password. Anyways, how come I can reach 8.8.8.8 but not my ISP's server? Also, how can pinging 8.8.8.8 suddenly fix that? This looks supernatural to me.

Possibly you ISP changes his nameservers sometimes, but 8.8.8.8 has nothing to do with your ISP and therefore is always availbable. Since you can ping 8.8.8.8 you know that the connection works, also when the nameserver of your ISP isn't reachable. Maybe you use 8.8.8.8 and forget about your ISPs nameservers.

Markus

mgoldenbe 12-05-2012 10:45 AM

Quote:

Originally Posted by markush (Post 4843235)
Possibly you ISP changes his nameservers sometimes, but 8.8.8.8 has nothing to do with your ISP and therefore is always availbable. Since you can ping 8.8.8.8 you know that the connection works, also when the nameserver of your ISP isn't reachable. Maybe you use 8.8.8.8 and forget about your ISPs nameservers.

Markus

I would not want to do that for three reasons. First, my ISP does some shielding for me (something like Open DNS). Secondly, due to geographic location, the latency of reaching 8.8.8.8 is much larger for me than that of reaching my ISP's server. Thirdly, but not lastly, I am really interested to get to the root of this problem :)


All times are GMT -5. The time now is 06:17 AM.