You are not logged in.
Hi:
When I power-on my computer (desktop) every morning, it is trying to connect to the network for several minutes (wired connection). So I must unplug the modem to plug it again... after that my computer gets connected to the network and I can use internet. This only happens when I power-on the computer by the first time every day.
The connection settings say this:
https://orig00.deviantart.net/3ecd/f/20 … c9mnem.png
And when I check /etc/network/interfaces it shows this:
auto lo
iface lo inet loopback
If I add this:
auto eth0
iface eth0 inet dhcp
then I can't connect to internet.
What another thing should I check?
Thanks
Last edited by Head_on_a_Stick (2018-04-24 18:10:27)
Offline
If I add this:
auto eth0 iface eth0 inet dhcp
then I can't connect to internet.
Is the interface actually called eth0?
List all interfaces with
ip link
If you use this method it will stop NetworkManager (the connection icon in the systray) from managing the connection and you will have to use the command line instead, is that what you want?
NetworkManager is usually very reliable (albeit entirely unnecessary with a wired connection) so we should probably investigate why it's failing.
You can check the journal for the current boot:
sudo journalctl -xe
What is your hardware and drivers?
lspci -knn | grep -iA2 net
There are several types of cards that just don't work very well with GNU/Linux, unfortunately.
Offline
Hi:
Is the interface actually called eth0?
List all interfaces with
ip link
Yes, ip link shows "lo" and "eth0"
If you use this method it will stop NetworkManager (the connection icon in the systray) from managing the connection and you will have to use the command line instead, is that what you want?
NetworkManager is usually very reliable (albeit entirely unnecessary with a wired connection) so we should probably investigate why it's failing.
I just realised that about NetworkManaging.
You can check the journal for the current boot:
sudo journalctl -xe
That command shows this:
abr 24 09:49:43 debian systemd[1]: Time has been changed
-- Subject: Time change
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- The system clock has been changed to REALTIME microseconds after January 1st, 1970.
abr 24 09:49:43 debian systemd[591]: Time has been changed
-- Subject: Time change
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- The system clock has been changed to REALTIME microseconds after January 1st, 1970.
abr 24 09:50:25 debian sudo[1230]: copper : TTY=pts/0 ; PWD=/home/copper ; USER=root ; COMMAND=/usr/bin/nano /etc/network/interfaces
abr 24 09:50:25 debian sudo[1230]: pam_unix(sudo:session): session opened for user root by copper(uid=0)
abr 24 09:50:34 debian sudo[1230]: pam_unix(sudo:session): session closed for user root
abr 24 09:54:49 debian sudo[1342]: copper : TTY=pts/0 ; PWD=/home/copper ; USER=root ; COMMAND=/bin/journalctl -xe
abr 24 09:54:49 debian sudo[1342]: pam_unix(sudo:session): session opened for user root by copper(uid=0)
What is your hardware and drivers?
lspci -knn | grep -iA2 net
There are several types of cards that just don't work very well with GNU/Linux, unfortunately.
00:04.0 Ethernet controller [0200]: Silicon Integrated Systems [SiS] 190 Ethernet Adapter [1039:0190]
Subsystem: Silicon Integrated Systems [SiS] Device [1039:0191]
Kernel driver in use: sis190
My computer is a bit old
And I just realised that I don't need unplug the modem... if I do /etc/init.d/networking restart so I can recover the connection.
Offline
You can check the journal for the current boot:
sudo journalctl -xe
That command shows this:
There should be more output than that, you can use the arrow keys to scroll around or
sudo journalctl -xe --no-pager
Offline
You should check journalctl -u NetworkManager since it's probably the garbage built-in DHCP client which fails to get/renew the lease. I've had the same problem with several routers. The solution was to install dhclient and configure in /etc/NetworkManager/conf.d/dhcp-client.conf
[main]
dhcp=dhclient
then reboot or restart the service. Symptomatic for my problems were
1. ip link → network interface was UP but
2. ip addr → no network address
3. journalctl -u NetworkManager showed DHCP timeouts.
Check by just executing sudo dhclient $interface when you reproduce the problem.
Offline
There's times where dhclient just dies for some reason and thus losing the connection. Can you simply reconnect with sudo dhclient $interface where interface is what you using to connect?
Real Men Use Linux
Offline
Or ditch dhcp entirely and assign static IPs.
# /etc/network/interfaces
auto eth0
iface etho inet static
address $address
netmask $netmask
gateway $gateway
Replace $address with the desired IP address (run `ip r` to see the address being used currently), $netmask with the netmask (probably 255.255.255.0, or add the CIDR after the address) and $gateway with the IP address of your router.
Last edited by Head_on_a_Stick (2018-04-25 06:06:38)
Offline
Hi:
Thank you all for the answers. I am not sure but it seems NTP was generating some type of conflict. So I disabled NTP and setted date and time manually... and this morning my PC didn't have problems connecting to the net. I'll check it again tomorrow.
Edited: I was right... the problem with the wired connection is gone after diabling NTP.
Last edited by copper (2018-04-26 12:28:07)
Offline