Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Ethernet keeps timing out
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Xander314
n00b
n00b


Joined: 16 Apr 2012
Posts: 61

PostPosted: Sat Feb 11, 2017 2:36 pm    Post subject: Ethernet keeps timing out Reply with quote

I am setting up my main box after replacing the SSD, and I'm mainly doing this over SSH from my laptop. Whenever I leave it alone for a while (e.g. emerging a big package), the SSH connection has been interrupted by the time I return. On further investigation on the main box itself, it seems the whole connection has failed somehow. However,
Code:
ifconfig eth0
still shows the connection as active with an IP assigned. If I run
Code:
ping www.google.com

then it hangs for a while then starts running normally. After this starts working, I can successfully connect via SSH again.

I would appreciate any suggestions as I'm not really sure where to start with this. I wonder if the ethernet adapter is going into some kind of power saving mode when the connection becomes idle. However, that would be odd since I'm using the exact same kernel config and kernel as before I started reinstalling. I apologise for the lack of information but I'm not really sure where to start debugging this.
Back to top
View user's profile Send private message
szatox
Veteran
Veteran


Joined: 27 Aug 2013
Posts: 1717

PostPosted: Sat Feb 11, 2017 3:55 pm    Post subject: Reply with quote

Looks more like a shitty connection.
You could try launching mtr instead of ping. Let it run for some time, perhaps it would show you where that problem occurs.
Back to top
View user's profile Send private message
ct85711
Veteran
Veteran


Joined: 27 Sep 2005
Posts: 1691

PostPosted: Sat Feb 11, 2017 3:59 pm    Post subject: Reply with quote

Quote:
still shows the connection as active with an IP assigned

By active IP, is it a normal IP address that you get or a trash IP like 169.x.x.x... The 169.x.x.x address is the APIPA (trash address), a good indicator you lost your IP address.

When your you internet is down, did you ping like 8.8.8.8 to see if that works? That can tell you that the DNS servers you are using may be the issue.

If pinging 8.8.8.8 doesn't work, try pinging to see if you can ping your default gateway (you must have a normal IP address, you can get the info from ifconfig, otherwise the address typically ends with .1 or .254

Each part helps narrow down the more common issues, like DHCP, DNS; if you can't ping to your default gateway, you may want to check your modem/router...
Back to top
View user's profile Send private message
Roman_Gruber
Advocate
Advocate


Joined: 03 Oct 2006
Posts: 3806
Location: Austro Bavaria

PostPosted: Sun Feb 12, 2017 1:20 pm    Post subject: Reply with quote

Check that your ssh client has a setting to send keepalive packets to the server, and configure /etc/ssh/sshd_config for these settings

*) ClientAliveInterval
*) ClientAliveCountMax
Back to top
View user's profile Send private message
Xander314
n00b
n00b


Joined: 16 Apr 2012
Posts: 61

PostPosted: Wed Feb 15, 2017 9:28 pm    Post subject: Reply with quote

Quote:

Check that your ssh client has a setting to send keepalive packets to the server, and configure /etc/ssh/sshd_config for these settings

*) ClientAliveInterval
*) ClientAliveCountMax

These are set. I think this is a problem with the network rather than SSH itself.

Quote:

By active IP, is it a normal IP address that you get or a trash IP like 169.x.x.x... The 169.x.x.x address is the APIPA (trash address), a good indicator you lost your IP address.

It was the correct IP assigned by my network administrator (via DHCP).

Thanks for the responses, but the problem seems to have disappeared so can't really pursue this in more depth for now.
Back to top
View user's profile Send private message
Princess Nell
l33t
l33t


Joined: 15 Apr 2005
Posts: 738

PostPosted: Wed Feb 15, 2017 10:48 pm    Post subject: Reply with quote

Are you using NetworkManager by any chance? This might be completely unrelated, but I've been having some strange problems after the latest upgrade that only went away after downgrading to the previous version. The symptom is that the new version, 1.4.4-r1, didn't acquire an ip address on the ethernet interface, despite the interface being up and activity lights on at both ends. Downgrading to 1.4.0-r1 seems to have fixed it. Stranger yet, the upgrade happened four days ago, I used the machine every day since, and the problem only appeared today.
Back to top
View user's profile Send private message
Xander314
n00b
n00b


Joined: 16 Apr 2012
Posts: 61

PostPosted: Thu Feb 16, 2017 1:43 am    Post subject: Reply with quote

No, just netifrc with dhcpcd.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum