LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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 06-26-2016, 09:21 AM   #1
iulek
LQ Newbie
 
Registered: Dec 2008
Posts: 9

Rep: Reputation: 0
need to reboot router under linux when back from other connection, for browsing


Dear all,

I have a router at home, D-link DSL-2640B, that works fine with my linux laptop. Nevertheless, whenever I take my laptop to use other internet connection (eg, at my work, in this case with a proxy server) and then come back, after relaying my ip through dhcp, any trial to browse straight ahead is exteremely slow (in any browser; OK, I have a number of tabs open but my connection is not slow at all). This comes back to normality when I reboot the router, accessing it through 192.168.1.1. However, I do not observe this phenomenon when I use a windows laptop; so I guess this problem might be related to linux and how it deals with the connection (?) (in all instances I use cabled connection). Though I had some search in the web, I could not figure out what any configuration might account for this behavior. Of course, I would prefer to connect here and there, and have good internet straight on.
Would you have any point for me to look at?
Thanks,

J.
 
Old 06-26-2016, 11:48 AM   #2
Keruskerfuerst
Senior Member
 
Registered: Oct 2005
Location: Horgau, Germany
Distribution: Manjaro KDE, Win 10
Posts: 2,199

Rep: Reputation: 164Reputation: 164
1. Can you check the cable?
2. The try to use another router, which works fine also with linux like MikroTik RB2011IL-RM Router.
 
Old 06-26-2016, 01:58 PM   #3
iulek
LQ Newbie
 
Registered: Dec 2008
Posts: 9

Original Poster
Rep: Reputation: 0
Thanks, Keruskerfuerst.

The cable is OK yet I can reboot the modem and so things go fine afterward.

A new router might be the way to go, but I thought that if it is just a matter of configuration, it will be cheaper to fix than buying a new router, :-).

Last edited by iulek; 06-26-2016 at 03:07 PM.
 
Old 06-27-2016, 02:58 PM   #4
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,978

Rep: Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624
Since it does work correctly at all I see no great reason so far to replace it.(just yet)

Why it would fix it on reboot of router is part of the clue.


I get the feeling that this proxy issue and the tabs open and maybe how you are setting the proxy may be part of the issue. You didn't say it but you may also have some standby/hibernate issue.

Last edited by jefro; 06-27-2016 at 07:57 PM.
 
Old 06-27-2016, 07:41 PM   #5
iulek
LQ Newbie
 
Registered: Dec 2008
Posts: 9

Original Poster
Rep: Reputation: 0
I set my proxy manually (I use foxyproxy for automation on this). But, unfortunately, I have already observed this behavior also when I connect without a proxy, eg., when I use the laptop with other SSID that do not require it.
But, in fact, every time I go with my laptop there and there, I use to sleep it (as configured for closing the lid; formerly I used to hibernate and the same happened). Hum, might it be related to sleeping and hibernating configuration? I should say that email downloading (normally) and ping works fine; the matter seems to be only for browsing.
Thanks.
 
Old 06-27-2016, 08:01 PM   #6
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,978

Rep: Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624
Maybe top or other resource monitor may show what's causing slowness or /var logs.

Guess you could try a ftp download to double check speeds or maybe open a different browser.

Does it ever improve if you close browser or restart network in linux?

Last edited by jefro; 06-29-2016 at 08:43 PM.
 
Old 06-27-2016, 08:23 PM   #7
iulek
LQ Newbie
 
Registered: Dec 2008
Posts: 9

Original Poster
Rep: Reputation: 0
I could not get a hint with top or "system monitor".
I cannot say about slowness concerning ftp, though.
The problem is fixed when I get into (through my browser) the router and reboot it. So, every time I come back to home I have to spend two minutes with this...
Tomorrow I might try something like network restart thorough command line; the browsers I use are firefox, chrome and konqueror, all seem to present the same problem.
Thanks.
 
Old 06-29-2016, 08:12 PM   #8
iulek
LQ Newbie
 
Registered: Dec 2008
Posts: 9

Original Poster
Rep: Reputation: 0
OK, two tests.
Last night, after back home, I simply restarted network and everything was fine. This is a progress yet it is much faster than rebooting the router.
Today, I did not close the laptop lid at coming home, and so internet browsing was straight forward as I plugged in the cable at home.
Therefore, my issue might be about sleep/hibernate configuration, as that was previously suspected. I should search the internet now. Anyway, any hints on this?
 
Old 06-29-2016, 08:46 PM   #9
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,978

Rep: Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624
Wonder if simply arp cache is doing this? It shouldn't.

The normal fail on standby is that it doesn't come back at all is what I hear mostly. Your test of not closing lid seems to prove that it could be part of the issue.

Wonder if you could double check nic speeds. Wonder if it is somehow being caught in 10mbs?
 
Old 07-01-2016, 07:08 PM   #10
iulek
LQ Newbie
 
Registered: Dec 2008
Posts: 9

Original Poster
Rep: Reputation: 0
Thanks Jefro. I am taking some time to do some reading to try to get your points, to try to make tests and then maybe devise a solution.
 
Old 07-01-2016, 09:39 PM   #11
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,978

Rep: Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624
Sorry I don't know the full problem right off. Most times this sort of problem goes away on next version of distro and you get to work on new problems.

Arp is how computers translate MAC addresses to IP addresses. On clean boot arp and many other static and dynamic data bases get basically set to zero. Things like dns, wins, netbios and dhcp all are set to zero. When you change proxy is should try to re-initialize this. When you restart networking it is like a cold boot too. The restart networking seemed to fix it so we may need to try to figure out which of the tcp/ip parts are failing. Arp should be a very short lived thing. I say stuff sometimes more to get ideas out.
 
Old 07-03-2016, 12:01 AM   #12
jnihil
Member
 
Registered: Dec 2012
Location: inside the matrix
Distribution: Debian, Xubuntu, Gentoo, Antergos
Posts: 90

Rep: Reputation: 27
I would check the speed/duplex & stats on the interface:

$ ethtool <interface> | grep -E 'Speed|Duplex'

make sure you're not in wrong speed or half-duplex.

ethtool -S <interface> | grep -E 'drop|error'

see if you're getting dropped/error frames.
 
Old 07-07-2016, 08:25 PM   #13
iulek
LQ Newbie
 
Registered: Dec 2008
Posts: 9

Original Poster
Rep: Reputation: 0
Thanks jefro and jnihil for comments. Sorry I cannot answer more promptly. In fact I can make one test a day (transition work/home). Today I checked the speed
Speed: 100Mb/s
Duplex: Full
Yes, it seems to be pretty fine. No errors detected, neither.
A workaround I will test soon is to put a script at /etc/pm/sleep.d that restarts the network at resuming.
But one curious thing is that the other way round does not present any problem, that is, when I sleep my computer at home and get network at my work, browsing at high speed is available without any different procedure.
 
  


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
[SOLVED] emacs how to go back to last cursor position while browsing code skaushal_lk Programming 9 06-13-2013 10:01 AM
Router and Linux (Slow web browsing) Fixed! User_Program Yoper 10 12-24-2004 03:35 AM
Slow web browsing behind router w/ DHCP on DSL connection johngcarlsson Linux - Newbie 20 10-18-2004 03:32 PM
How do I Reboot into Linux at night and back to WinXP in the morning? kayhan Linux - General 5 09-16-2004 04:45 PM
Linux Router won't route back from email server hc2003 Linux - Networking 0 10-29-2003 03:27 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 04:19 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