LinuxQuestions.org
Review your favorite Linux distribution.
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
 
LinkBack Search this Thread
Old 08-27-2009, 09:04 PM   #1
vaadoo
LQ Newbie
 
Registered: Aug 2009
Posts: 7

Rep: Reputation: 0
Network connectivity intermittent


I used to have no problems with having a stable internet connection until kernel upgrade (I think I am using the right terminology).
Now, if I configure the eth0 to DHCP, the internet works fine for a couple of days and then it stops working and I can't browse to any website. I have attached a local printer to this machine which is also accessible over the network from other computers and I can't print anything because the network connectivity is lost. then what I have to do is either change from DHCP to static IP address or vice versa and it comes back online again. I have also tried /etc/init.d/networking restart command and that works also.
Any suggestions as to why this is not a permamanent solution? What files/upgrade do I need to achieve.
here's the output of ifconfig:
eth0 Link encap:Ethernet HWaddr 00:60:08:2b:4c:84
inet addr:192.168.0.106 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::260:8ff:fe2b:4c84/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:230383 errors:0 dropped:0 overruns:0 frame:0
TX packets:47900 errors:0 dropped:0 overruns:0 carrier:9
collisions:4878 txqueuelen:1000
RX bytes:109588235 (104.5 MB) TX bytes:10419914 (9.9 MB)
Interrupt:11 Base address:0xb800

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:6992 errors:0 dropped:0 overruns:0 frame:0
TX packets:6992 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:395142 (385.8 KB) TX bytes:395142 (385.8 KB)

Here are the contents of /etc/resolv.conf

nameserver 192.168.0.1


and finally
/$ cat /etc/network/interfaces
auto lo
iface lo inet loopback




auto eth0
iface eth0 inet dhcp
address 192.168.0.72
netmask 255.255.255.0
gateway 192.168.0.1


Many thanks
 
Old 08-27-2009, 09:39 PM   #2
GrapefruiTgirl
Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 536Reputation: 536Reputation: 536Reputation: 536Reputation: 536Reputation: 536
Couple questions:

1) Where to you get your DHCP lease from? Your ISP? Or do you have a DHCP server locally that supplies your IP address and other IP information?

2) Further to the first question, where are the DNS servers? Are they also provided by the ISP, or is there a DNS service running locally?

3) I see two different IP addresses for eth0: first, 192.168.0.106 and then in the 'interfaces' file, it reads 192.168.0.72 -- so, do you usually use DHCP, or a static IP?

4) the resolv.conf file should (usually) have two nameservers in it, at least, UNLESS you are running a DNS service on the network, in which case one will suffice.

Also, please provide the output of:

shell# route -n

and post the output.

For the moment, I'm speculating that your DHCP lease is expiring, and not getting renewed, but we shall need more information (the above requested stuff) to start to pin down the problem.

Please also tell us what the network arrangement is; like, what's your NIC (interface device type) and how this network you are connected to, is laid out (what-all machines are on it, etc.)

Thanks!
Sasha

Oh -- and welcome to LQ
 
Old 08-27-2009, 09:51 PM   #3
jschiwal
Moderator
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,263

Rep: Reputation: 562Reputation: 562Reputation: 562Reputation: 562Reputation: 562Reputation: 562
Other possible problems could be the NIC device, the ethernet cable & connections and the modem/router.
Firstly, your resolv.conf file doesn't have your ISP's name servers. Does your router masquerade as a dns server, relaying internet requests to your ISP's name servers? If not, you need to add your ISP's name server addresses to resolv.conf before using a web browser.

If the other computers don't have the same problem connecting to the internet at the same time, using the same DNS and gateway settings, that rules out the router. In an auto configuration, if the link drops out and is restored, the dhcpd client is restarted. If the link drops out again, you may loose your settings. Compare the the settings, IP address, resolv.conf, and routes when the connection is good and when it is not.
Test whether you have a connection to LAN hosts when you have probems with the internet.

Last edited by jschiwal; 08-27-2009 at 09:53 PM.
 
Old 08-28-2009, 07:19 AM   #4
vaadoo
LQ Newbie
 
Registered: Aug 2009
Posts: 7

Original Poster
Rep: Reputation: 0
Thanks to both of you. I am quite new to Linux and I ask for your patience while I follow your instructions.
I will start with GrapefruiTgirl's comments:

1. This desktop is connected with ethernet connection to the router. And its automatic DHCP & DNS servers.
2, I may have assigned the 192.168.0.72 manually when the DHCP config was giving me connectivity problems. I don't know how to fix these files to reflect identical IP addresses.
3. nameserver provides DNS. I have 2 other pc laptops that connect to this router wirelessly and they don't have any problem with connectivity.
4. Output from route -n

Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 1000 0 0 eth0
0.0.0.0 192.168.0.1 0.0.0.0 UG 100 0 0 eth0

Jschiwal

Thanks for the pointers. I don't see any network connectivity lost to other machines. I could try to change the cable from router to my linux destop, though I have a question...is there a timeout setting for renewal that needs to be reset?

Thanks for your help.
 
Old 08-28-2009, 07:39 AM   #5
evilted
Member
 
Registered: Aug 2009
Location: Ouagadougou, Burkina Faso
Distribution: centos
Posts: 92

Rep: Reputation: 18
what is the device at 192.168.0.1?

i would start there, on the basis of what you said here ->

Quote:
Originally Posted by vaadoo View Post
here's the output of ifconfig:
eth0 Link encap:Ethernet HWaddr 00:60:08:2b:4c:84
inet addr:192.168.0.106 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::260:8ff:fe2b:4c84/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:230383 errors:0 dropped:0 overruns:0 frame:0
TX packets:47900 errors:0 dropped:0 overruns:0 carrier:9
collisions:4878 txqueuelen:1000
RX bytes:109588235 (104.5 MB) TX bytes:10419914 (9.9 MB)
Interrupt:11 Base address:0xb800

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:6992 errors:0 dropped:0 overruns:0 frame:0
TX packets:6992 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:395142 (385.8 KB) TX bytes:395142 (385.8 KB)
resolve.conf only concerns dns. you say your loosing connectivity to the internet and too the printer. pc's on your local network go via the default (192.168.0.1) so i think your device there has problems. if it was a problem with your linux box you would see errors here:

RX packets:230383 errors:0 dropped:0 overruns:0 frame:0
TX packets:47900 errors:0 dropped:0 overruns:0 carrier:9

you shouldnt need to put internet dns servers in your linux box, if you do (as its not a dns server, or a gateway) you will loose dns resolution in your local lan. adding a worldwide dns server (say opendns or from your isp) wont hurt (if it cant lookup from 192.168.0.1 then it will go to the next dns), but doing this wont resolve a problem with your local lan.


another thing to try/test is too change the gateway of another pc on your lan to the linux ip (192.168.0.106) and test if you still loose connectivity to your printer. if you do, then its def your linux box, but from what youve said and the output of your ifconfig i think your router is the one having problems.

also what other devices are on your lan? do you have a switch between the gateway and your linux box? any other info would be good..
 
Old 08-28-2009, 07:55 AM   #6
vaadoo
LQ Newbie
 
Registered: Aug 2009
Posts: 7

Original Poster
Rep: Reputation: 0
192.168.0.1 is the router connected via ehternet
 
Old 08-28-2009, 08:19 AM   #7
evilted
Member
 
Registered: Aug 2009
Location: Ouagadougou, Burkina Faso
Distribution: centos
Posts: 92

Rep: Reputation: 18
Quote:
Originally Posted by vaadoo View Post
192.168.0.1 is the router connected via ehternet
yes i got that.. but like what router? is it a cisco/linksys/dlink/etc??

i was really after more information on the device at 192.168.0.1, because i think your problem is there, and not with the linux box.

typically a cheap router will die before a pc, thats not to say a pc wont die first, but in my experience routers arent generally looked after, whereas pc's are. as an example, i have 15 dlink's that are sitting in 45C heat, with a firmware that allows double the power. this means that those routers will die before any pc that i have - this i am sure of (the pc's are not overclocked and are sitting in airconditioned offices).
also, linux is far more stable that windows will ever be, so i would start by checking cables, and routers, maybe youve a pc on your lan spoofing your linux box. have you tried different ip's on your linux box? etc etc.. theres lots you can check..
 
Old 08-28-2009, 08:23 AM   #8
evilted
Member
 
Registered: Aug 2009
Location: Ouagadougou, Burkina Faso
Distribution: centos
Posts: 92

Rep: Reputation: 18
Quote:
Originally Posted by vaadoo View Post
I used to have no problems with having a stable internet connection until kernel upgrade (I think I am using the right terminology)
have you tried booting the previous kernel to see if your problem goes away? maybe theres a setting in the new kernel causing havoc on your network. ive had problems with this, and found that one kernel set 'accept source routing' to off, but for one net i look after i need this turned on..
 
Old 08-29-2009, 07:41 AM   #9
vaadoo
LQ Newbie
 
Registered: Aug 2009
Posts: 7

Original Poster
Rep: Reputation: 0
Its a DLink router. As far I know, the router doesn't seem to have any problems. I have changed the cable as well as fixed the /etc/network/interfaces file and here's the output

/$ cat /etc/network/interfaces
auto lo
iface lo inet loopback




auto eth0
iface eth0 inet dhcp


Lets see if it works. I was wondering if I could fix some files and make these changes permanent. Also, how do I increase the timeout or renewal of ip address requirements?

thanks
 
Old 08-29-2009, 08:09 PM   #10
vaadoo
LQ Newbie
 
Registered: Aug 2009
Posts: 7

Original Poster
Rep: Reputation: 0
I need your help again.
The internet went down (I believe when the system came up from a sleep mode).
When I ran the following command, I got some error messages below.

I had to resort my work around way of assigning a static ip address.

Please have a look at networking restart command and its output.

/$ sudo /etc/init.d/networking restart
[sudo] password for glore:
* Reconfiguring network interfaces... There is already a pid file /var/run/dhclient.eth0.pid with pid 16830
killed old client process, removed PID file
Internet Systems Consortium DHCP Client V3.0.6
Copyright 2004-2007 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/

Listening on LPF/eth0/00:60:08:2b:4c:84
Sending on LPF/eth0/00:60:08:2b:4c:84
Sending on Socket/fallback
DHCPRELEASE on eth0 to 192.168.0.1 port 67
There is already a pid file /var/run/dhclient.eth0.pid with pid 134519072
Internet Systems Consortium DHCP Client V3.0.6
Copyright 2004-2007 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/

Listening on LPF/eth0/00:60:08:2b:4c:84
Sending on LPF/eth0/00:60:08:2b:4c:84
Sending on Socket/fallback
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 5
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 5
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 5
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 5
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 11
No DHCPOFFERS received.
No working leases in persistent database - sleeping.

-------------------------------

thanks for all your help.
 
Old 09-02-2009, 09:28 PM   #11
vaadoo
LQ Newbie
 
Registered: Aug 2009
Posts: 7

Original Poster
Rep: Reputation: 0
I have upgraded to Ubuntu 9.04 but am still faced with the same problem.
Is there Anyone out there who understands my situation?
thanks
 
Old 09-03-2009, 08:40 PM   #12
vaadoo
LQ Newbie
 
Registered: Aug 2009
Posts: 7

Original Poster
Rep: Reputation: 0
Bump
 
  


Reply

Tags
connectivity, network, network connectivity


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Intermittent loss of wireless connectivity: failed to read scan data Leo Simon Ubuntu 2 06-14-2009 01:21 PM
intermittent wireless connectivity with bcm4306 maclenin Linux - Wireless Networking 2 01-11-2007 02:18 PM
Intermittent connection problem - network/apache jakepa2001 Linux - General 4 06-05-2005 10:43 AM
No network connectivity beyond network card linux8 simplimarvelous Linux - Networking 1 02-18-2003 10:22 PM
Intermittent network connectivity problem... does not make sense!!! please help!! SiliconBadger Linux - Networking 0 05-24-2002 10:17 AM


All times are GMT -5. The time now is 08:56 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
Open Source Consulting | Domain Registration