LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-28-2015, 09:49 AM   #1
esraam
Member
 
Registered: Apr 2015
Posts: 110

Rep: Reputation: Disabled
internet connection fails every few minutes


I am using a server connected to several clients with scientific linux 6 .
I am using the server ( a PC which uses Ethernet cable to connect ) .
I have a problem with internet connection.
It connects for few minutes then disconnects for few minutes then re-connects for fem minutes ( 2-3 ) minutes then disconnects again for few minutes
And so on , connect and disconnect , connect and disconnect.
The connection time is no longer than 2 to 3 minutes so I am unable to do any installs I need or do anything on the internet .

I tried to open :
System >> preferences >> network connections
eth0 edit and change the value of MTU
It was automatic at first and now I am trying to give it values .
I didn't feel this made any change till now .

Can Somebody help ?
How Can I stop the internet from disconnecting very continously ?
Thanks
 
Old 06-28-2015, 09:42 PM   #2
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,611

Rep: Reputation: 1111Reputation: 1111Reputation: 1111Reputation: 1111Reputation: 1111Reputation: 1111Reputation: 1111Reputation: 1111Reputation: 1111
Quote:
It connects for few minutes then disconnects for few minutes then re-connects for fem minutes ( 2-3 ) minutes then disconnects again for few minutes
And so on , connect and disconnect , connect and disconnect.
The connection time is no longer than 2 to 3 minutes so I am unable to do any installs I need or do anything on the internet .
Do you see the physical interface status drop when this happen? Or just LAN connectivity dropping?
Code:
ip link
I would suggest observing network-related messages from /var/log/messages. That might help capture what is occurring when the interface goes down.

Code:
tail -f /var/log/messages
You could also test the connected NIC with 'ethtool -t <eth-interface>' eg
Code:
ethtool -t eth0
 
Old 07-01-2015, 04:39 AM   #3
mmmscott
LQ Newbie
 
Registered: Jul 2015
Posts: 2

Rep: Reputation: Disabled
1492 or 1500 seem to be the common defaults but there is never an explanation of what they could / should be but perhaps the help desk of the ISP provider should be known FIRST admitting that you have a certain connection

Last edited by mmmscott; 07-01-2015 at 04:41 AM.
 
Old 07-02-2015, 05:55 AM   #4
esraam
Member
 
Registered: Apr 2015
Posts: 110

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by ferrari View Post
Do you see the physical interface status drop when this happen? Or just LAN connectivity dropping?
Code:
ip link
I would suggest observing network-related messages from /var/log/messages. That might help capture what is occurring when the interface goes down.

Code:
tail -f /var/log/messages
You could also test the connected NIC with 'ethtool -t <eth-interface>' eg
Code:
ethtool -t eth0
Code:
#ip link
gives :
1: lo: <LOOPBACK, UP, LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST, MULTICAST, UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP ql en 1000
link/ether 74:d4:35:11:13:90 brd ff:ff:ff:ff:ff:ff


Code:
 #tail -f /var/log/messages
gives no output , and waits waits waits until I press (ctrl+c)

going to the directory : /var/log
I found a file names ( messages ) with and arrow on the north east of it
trying to open it i got the following :

Couldn't display "/var/log/messages".
There is no application installed for character device files.
Do you want to search for application to open the file ( yes/No)

Pressing Yes gives some applications need to be installed but of course installation fails due to network failure problem .
Then I got a message :
Failed to find software
No new applications can be found to handle this type of file



Code:
 #ethtool -t eth0
gives :
Cannot test: Operation not supported


What shall I do now ?
Thanks
 
Old 07-02-2015, 03:54 PM   #5
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,611

Rep: Reputation: 1111Reputation: 1111Reputation: 1111Reputation: 1111Reputation: 1111Reputation: 1111Reputation: 1111Reputation: 1111Reputation: 1111
Well, the following suggests your link us 'UP'
Code:
2: eth0: <BROADCAST, MULTICAST, UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP ql en 1000
link/ether 74:d4:35:11:13:90 brd ff:ff:ff:ff:ff:ff
If the physical link was changing state, I would expect to observe kernel messages reporting this
Code:
dmesg --follow
With respect to the ethtool, maybe your NIC doesn't support testing. I don't know.
 
Old 07-02-2015, 03:55 PM   #6
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,611

Rep: Reputation: 1111Reputation: 1111Reputation: 1111Reputation: 1111Reputation: 1111Reputation: 1111Reputation: 1111Reputation: 1111Reputation: 1111
BTW, /var/log/messages is a text file, so any editor should be able to view it. (It's more likely that you just don't have a file association for it currently.)
 
Old 07-05-2015, 05:52 AM   #7
esraam
Member
 
Registered: Apr 2015
Posts: 110

Original Poster
Rep: Reputation: Disabled
Code:
dmesg --follow
gives a huge output which exceeds the limit that can be posted here .
here are the first few lines :

class=dir
type=1400 audit(1435990681.885:4365): avc: denied { search } for pid=9230 comm="trivial-rewrite" name="yp" dev=dm-0 ino=3016424 scontext=system_u:system_rostfix_master_t:s0 tcontext=system_ubject_r:var_yp_t:s0 tclass=dir
type=1400 audit(1435990682.016:4366): avc: denied { search } for pid=9236 comm="bounce" name="yp" dev=dm-0 ino=3016424 scontext=system_u:system_rostfix_bounce_t:s0 tcontext=system_ubject_r:var_yp_t:s0 tclass=dir
type=1400 audit(1435990682.122:4367): avc: denied { search } for pid=9238 comm="bounce" name="yp" dev=dm-0 ino=3016424 scontext=system_u:system_rostfix_bounce_t:s0 tcontext=system_ubject_r:var_yp_t:s0 tclass=dir


Is this what you are looking for ?
can that help ?
 
Old 07-05-2015, 06:10 AM   #8
esraam
Member
 
Registered: Apr 2015
Posts: 110

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by ferrari View Post
BTW, /var/log/messages is a text file, so any editor should be able to view it. (It's more likely that you just don't have a file association for it currently.)
it really looks like a text file but with an arrow over it .
I don't know what the arrow means .
Shall I create a new one ?
What shall It contain for the internet to connect continuously ?
thanks
 
Old 07-05-2015, 06:48 AM   #9
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,611

Rep: Reputation: 1111Reputation: 1111Reputation: 1111Reputation: 1111Reputation: 1111Reputation: 1111Reputation: 1111Reputation: 1111Reputation: 1111
The dmesg output you captured is not relevant to your issue.

You should be able to examine /var/log/messages with an editor eg nano
Code:
sudo nano /var/log/messages
BTW, this file just consists of a log of the kernel messages generated for administrators to examine when there are problems.

It might be easier if next time you think the network is down, immediately capture the output of
Code:
ip addr
Code:
ip route
That will tell you the status of the ethernet link, IP address, and routing configuration. Maybe it is your router that is at fault here?
 
Old 07-05-2015, 07:50 AM   #10
esraam
Member
 
Registered: Apr 2015
Posts: 110

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by ferrari View Post
The dmesg output you captured is not relevant to your issue.

You should be able to examine /var/log/messages with an editor eg nano
Code:
sudo nano /var/log/messages
BTW, this file just consists of a log of the kernel messages generated for administrators to examine when there are problems.

It might be easier if next time you think the network is down, immediately capture the output of
Code:
ip addr
Code:
ip route
That will tell you the status of the ethernet link, IP address, and routing configuration. Maybe it is your router that is at fault here?
no , the router is working well .
It is a problem of clustering may be ?
nut I don't know how to solve it .
Quote:
The dmesg output you captured is not relevant to your issue.
HOW ?
I just typed the command line as you suggested ?
What shall I do ?

Code:
ip addr
gives :
1: lo: <LOOPBACK, UP, LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
inet :: 1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST, MULTICAST, UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP ql en 1000
link/ether 74:d4:35:11:13:90 brd ff:ff:ff:ff:ff:ff
inet 192.168.0.200/24 brd 192.168.0.255 scope global eth0
inet6 fe80::76d4::35ff:fell:1390/64 scope link
valid_lft forever preferred_lft forever

Code:
ip route
192.168.0.0/24 dev eth0 proto kernel scope link src 192.168.0.200 metric 1
default via 192.168.0.252 dev eth0 proto static


Can you figure out where the problem is ? or how can we solve it ?
Thanks
 
Old 07-05-2015, 07:55 AM   #11
esraam
Member
 
Registered: Apr 2015
Posts: 110

Original Poster
Rep: Reputation: Disabled
Code:
 
# nano /var/log/messages
opens an empty file with title above ( New Buffer )
and named below [" /var/log/messages" is a device file ]

" device" file ???
 
Old 07-05-2015, 03:57 PM   #12
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,611

Rep: Reputation: 1111Reputation: 1111Reputation: 1111Reputation: 1111Reputation: 1111Reputation: 1111Reputation: 1111Reputation: 1111Reputation: 1111
Quote:
Can you figure out where the problem is ? or how can we solve it ?
Thanks
No, so far there is not enough information to solve your problem. When you did 'ip link' and ip route' was your connection working at this time? The output confirms that eth0 is up and configured with an IP address. To be explicit, I did say run those commands when you think the connection is down.

As for /var/log/messages, I'm not sure why it is not present. Maybe syslog is not running? Are you the administrator? Remember I'm not in front of your computer, so difficult to diagnose via a forum.

Anyway,here's some documentation for your distro. There's a search engine built-in so you can look up '/var/log/messages', 'sys' log etc
http://linux.web.cern.ch/linux/scientific6/

Last edited by ferrari; 07-05-2015 at 04:02 PM.
 
Old 07-06-2015, 04:36 AM   #13
esraam
Member
 
Registered: Apr 2015
Posts: 110

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by ferrari View Post
No, so far there is not enough information to solve your problem. When you did 'ip link' and ip route' was your connection working at this time? The output confirms that eth0 is up and configured with an IP address. To be explicit, I did say run those commands when you think the connection is down.

As for /var/log/messages, I'm not sure why it is not present. Maybe syslog is not running? Are you the administrator? Remember I'm not in front of your computer, so difficult to diagnose via a forum.

Anyway,here's some documentation for your distro. There's a search engine built-in so you can look up '/var/log/messages', 'sys' log etc
http://linux.web.cern.ch/linux/scientific6/

well this is what i tried :
Code:
 
#ping yahoo.com
and got :
ping : unknown host yahoo.com
so I think the connection is know down

I also opened the browser and tried to open any websites but it fails .
so , No internet connection

I then tried iplink and iproute and got the above mentioned outputs !
I don't know what that means /
the connection is up but a problem prevents the computer from connecting ?
 
Old 07-06-2015, 05:40 AM   #14
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,611

Rep: Reputation: 1111Reputation: 1111Reputation: 1111Reputation: 1111Reputation: 1111Reputation: 1111Reputation: 1111Reputation: 1111Reputation: 1111
Now we're getting somewhere - it's been like herding cats so far! Your link is up, IP address and gateway routing appears to be valid, but you're not able to ping a host by name which indicates that DNS is not configured/working. You can probably ping by IP address ok. For example, the following probably works
Code:
ping 98.138.253.109
Check /etc/resolv.conf for valid nameserver with
Code:
grep -i nameserver /etc/resolv.conf
If nothing is returned, that is the problem. If you're using DHCP, this would normally be added automatically. Sometimes it's the router that acts as an intermediate DNS server, sometimes it's your ISP's domain name server.

Anyway, if it's missing, you could add a public nameserver manually with something like
Code:
echo "nameserver 8.8.8.8" >> /etc/resolv.conf
Then you should be able to browse again.

Last edited by ferrari; 07-06-2015 at 05:42 AM.
 
Old 07-06-2015, 06:07 AM   #15
esraam
Member
 
Registered: Apr 2015
Posts: 110

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by ferrari View Post
Now we're getting somewhere - it's been like herding cats so far! Your link is up, IP address and gateway routing appears to be valid, but you're not able to ping a host by name which indicates that DNS is not configured/working. You can probably ping by IP address ok. For example, the following probably works
Code:
ping 98.138.253.109
Check /etc/resolv.conf for valid nameserver with
Code:
grep -i nameserver /etc/resolv.conf
If nothing is returned, that is the problem. If you're using DHCP, this would normally be added automatically. Sometimes it's the router that acts as an intermediate DNS server, sometimes it's your ISP's domain name server.

Anyway, if it's missing, you could add a public nameserver manually with something like
Code:
echo "nameserver 8.8.8.8" >> /etc/resolv.conf
Then you should be able to browse again.
Code:
ping 157.55.152.112
gives :
PING 157.55.152.112 ( 157.55.152.112) 56(84) bytes of data
destination Net Unreachable ( ping to hotmail )

Code:
grep -i hotmail /etc/resolv.conf
nothing is returned .
in /etc/sysconfig/network-scripts/ifcfg-eth0
The BOOTPROTO = none ( not dhcp )

Code:
echo "yahoo 8.8.8.8" >> /etc/resolv.conf
returns nothing
then i tried
Code:
#ping yahoo.com
again gives
ping unknown host .

Opening google chrome and trying to open any website also fails !

Last edited by esraam; 07-06-2015 at 06:09 AM.
 
  


Reply


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with internet connection dropping after a few minutes. Kerryman Linux - Newbie 37 04-04-2014 05:12 PM
internet connection fails sniper8752 Linux - Virtualization and Cloud 3 02-11-2014 03:41 PM
Internet connection gets disconnected within 2-3 minutes asdandekar Ubuntu 4 01-29-2009 03:12 AM
internet connection fails sigiken Fedora 1 12-16-2007 12:17 AM
internet connection fails after a while.. krylkn Linux - Networking 1 04-12-2007 12:09 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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