Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Wired connection stops working after a while

New to Debian (Or Linux in general)? Ask your questions here!
Message
Author
ouroboros
Posts: 19
Joined: 2024-02-18 14:42

Re: Wired connection stops working after a while

#21 Post by ouroboros »

I get wifi from a wireless router which is connected by a cat5 cable to the same managed switch.

CwF
Global Moderator
Global Moderator
Posts: 2719
Joined: 2018-06-20 15:16
Location: Colorado
Has thanked: 41 times
Been thanked: 201 times

Re: Wired connection stops working after a while

#22 Post by CwF »

Take a look

Code: Select all

$  journalctl -b 0 -g net --no-pager

arzgi
Posts: 1198
Joined: 2008-02-21 17:03
Location: Finland
Been thanked: 32 times

Re: Wired connection stops working after a while

#23 Post by arzgi »

ouroboros wrote: 2024-02-25 16:51 I get wifi from a wireless router which is connected by a cat5 cable to the same managed switch.
So you have a router after all. Can you connect the cat5 cable from your computer to the wireless router?

ouroboros
Posts: 19
Joined: 2024-02-18 14:42

Re: Wired connection stops working after a while

#24 Post by ouroboros »

CwF wrote:Take a look

Code: Select all

$  journalctl -b 0 -g net --no-pager

Code: Select all

$ sudo journalctl -b 0 -g net --no-pager

Feb 25 19:48:35 Debian kernel: NET: Registered PF_NETLINK/PF_ROUTE protocol family
Feb 25 19:48:35 Debian kernel: audit: initializing netlink subsys (disabled)
Feb 25 19:48:35 Debian kernel: NetLabel: Initializing
Feb 25 19:48:35 Debian kernel: NetLabel:  domain hash size = 128
Feb 25 19:48:35 Debian kernel: NetLabel:  protocols = UNLABELED CIPSOv4 CALIPSO
Feb 25 19:48:35 Debian kernel: NetLabel:  unlabeled traffic allowed by default
Feb 25 19:48:35 Debian kernel: NET: Registered PF_INET protocol family
Feb 25 19:48:35 Debian kernel: NET: Registered PF_UNIX/PF_LOCAL protocol family
Feb 25 19:48:35 Debian kernel: NET: Registered PF_XDP protocol family
Feb 25 19:48:35 Debian kernel: NET: Registered PF_INET6 protocol family
Feb 25 19:48:35 Debian kernel: NET: Registered PF_PACKET protocol family
Feb 25 19:48:35 Debian audit[484]: AVC apparmor="STATUS" operation="profile_load" profile="unconfined" name="/usr/lib/NetworkManager/nm-dhcp-client.action" pid=484 comm="apparmor_parser"
Feb 25 19:48:35 Debian audit[484]: AVC apparmor="STATUS" operation="profile_load" profile="unconfined" name="/usr/lib/NetworkManager/nm-dhcp-helper" pid=484 comm="apparmor_parser"
Feb 25 19:48:35 Debian systemd[1]: Starting systemd-timesyncd.service - Network Time Synchronization...
Feb 25 19:48:36 Debian systemd[1]: Started systemd-timesyncd.service - Network Time Synchronization.
Feb 25 19:48:36 Debian kernel: NET: Registered PF_BLUETOOTH protocol family
Feb 25 19:48:36 Debian systemd[1]: Starting networking.service - Raise network interfaces...
Feb 25 19:48:37 Debian avahi-daemon[683]: Network interface enumeration completed.
Feb 25 19:48:37 Debian kernel: Bluetooth: BNEP (Ethernet Emulation) ver 1.3
Feb 25 19:48:37 Debian systemd[1]: Finished networking.service - Raise network interfaces.
Feb 25 19:48:37 Debian systemd[1]: Starting NetworkManager.service - Network Manager...
Feb 25 19:48:37 Debian NetworkManager[783]: <info>  [1708886917.2096] NetworkManager (version 1.42.4) is starting... (boot:d0cd36f9-3742-45d9-9782-a37dde26a7c9)
Feb 25 19:48:37 Debian NetworkManager[783]: <info>  [1708886917.2096] Read config: /etc/NetworkManager/NetworkManager.conf (lib: no-mac-addr-change.conf)
Feb 25 19:48:37 Debian systemd[1]: Started NetworkManager.service - Network Manager.
Feb 25 19:48:37 Debian NetworkManager[783]: <info>  [1708886917.2119] bus-manager: acquired D-Bus service "org.freedesktop.NetworkManager"
Feb 25 19:48:37 Debian systemd[1]: Reached target network.target - Network.
Feb 25 19:48:37 Debian systemd[1]: Starting NetworkManager-wait-online.service - Network Manager Wait Online...
Feb 25 19:48:37 Debian NetworkManager[783]: <info>  [1708886917.2195] monitoring ifupdown state file '/run/network/ifstate'.
Feb 25 19:48:37 Debian kernel: NET: Registered PF_QIPCRTR protocol family
Feb 25 19:48:37 Debian audit[792]: AVC apparmor="DENIED" operation="capable" profile="/usr/sbin/cupsd" pid=792 comm="cupsd" capability=12  capname="net_admin"
Feb 25 19:48:37 Debian NetworkManager[783]: <info>  [1708886917.2635] Loaded device plugin: NMWwanFactory (/usr/lib/x86_64-linux-gnu/NetworkManager/1.42.4/libnm-device-plugin-wwan.so)
Feb 25 19:48:37 Debian NetworkManager[783]: <info>  [1708886917.2661] Loaded device plugin: NMTeamFactory (/usr/lib/x86_64-linux-gnu/NetworkManager/1.42.4/libnm-device-plugin-team.so)
Feb 25 19:48:37 Debian NetworkManager[783]: <info>  [1708886917.2673] Loaded device plugin: NMWifiFactory (/usr/lib/x86_64-linux-gnu/NetworkManager/1.42.4/libnm-device-plugin-wifi.so)
Feb 25 19:48:37 Debian NetworkManager[783]: <info>  [1708886917.2691] Loaded device plugin: NMBluezManager (/usr/lib/x86_64-linux-gnu/NetworkManager/1.42.4/libnm-device-plugin-bluetooth.so)
Feb 25 19:48:37 Debian NetworkManager[783]: <info>  [1708886917.2700] Loaded device plugin: NMAtmManager (/usr/lib/x86_64-linux-gnu/NetworkManager/1.42.4/libnm-device-plugin-adsl.so)
Feb 25 19:48:37 Debian NetworkManager[783]: <info>  [1708886917.2704] manager: Networking is enabled by state file
Feb 25 19:48:37 Debian dbus-daemon[688]: [system] Activating via systemd: service name='org.freedesktop.nm_dispatcher' unit='dbus-org.freedesktop.nm-dispatcher.service' requested by ':1.12' (uid=0 pid=783 comm="/usr/sbin/NetworkManager --no-daemon")
Feb 25 19:48:37 Debian NetworkManager[783]: <info>  [1708886917.2720] settings: Loaded settings plugin: ifupdown ("/usr/lib/x86_64-linux-gnu/NetworkManager/1.42.4/libnm-settings-plugin-ifupdown.so")
Feb 25 19:48:37 Debian NetworkManager[783]: <info>  [1708886917.2720] ifupdown:       interface-parser: parsing file /etc/network/interfaces
Feb 25 19:48:37 Debian NetworkManager[783]: <info>  [1708886917.2721] ifupdown:       interface-parser: finished parsing file /etc/network/interfaces
Feb 25 19:48:37 Debian systemd[1]: Starting NetworkManager-dispatcher.service - Network Manager Script Dispatcher Service...
Feb 25 19:48:37 Debian NetworkManager[783]: <info>  [1708886917.2772] manager: (lo): new Loopback device (/org/freedesktop/NetworkManager/Devices/1)
Feb 25 19:48:37 Debian NetworkManager[783]: <info>  [1708886917.2791] manager: (eno1): new Ethernet device (/org/freedesktop/NetworkManager/Devices/2)
Feb 25 19:48:37 Debian systemd[1]: Started NetworkManager-dispatcher.service - Network Manager Script Dispatcher Service.
Feb 25 19:48:37 Debian NetworkManager[783]: <info>  [1708886917.5194] manager: (wlo1): new 802.11 Wi-Fi device (/org/freedesktop/NetworkManager/Devices/3)
Feb 25 19:48:37 Debian dbus-daemon[688]: [system] Activating via systemd: service name='fi.w1.wpa_supplicant1' unit='wpa_supplicant.service' requested by ':1.12' (uid=0 pid=783 comm="/usr/sbin/NetworkManager --no-daemon")
Feb 25 19:48:38 Debian NetworkManager[783]: <info>  [1708886918.0617] manager: (p2p-dev-wlo1): new 802.11 Wi-Fi P2P device (/org/freedesktop/NetworkManager/Devices/4)
Feb 25 19:48:38 Debian NetworkManager[783]: <warn>  [1708886918.0625] device (wlo1): wifi-scan: active scanning for networks due to profiles with wifi.hidden=yes. This makes you trackable
Feb 25 19:48:38 Debian kernel: NET: Registered PF_ALG protocol family
Feb 25 19:48:39 Debian kernel: IPv6: ADDRCONF(NETDEV_CHANGE): eno1: link becomes ready
Feb 25 19:48:39 Debian NetworkManager[783]: <info>  [1708886919.2062] manager: NetworkManager state is now CONNECTING
Feb 25 19:48:39 Debian NetworkManager[783]: <info>  [1708886919.7078] manager: NetworkManager state is now CONNECTED_SITE
Feb 25 19:48:39 Debian NetworkManager[783]: <info>  [1708886919.7099] manager: NetworkManager state is now CONNECTED_GLOBAL
Feb 25 19:48:40 Debian systemd[1913]: Listening on dirmngr.socket - GnuPG network certificate management daemon.
Feb 25 19:48:41 Debian wpa_supplicant[1864]: wlo1: CTRL-EVENT-SUBNET-STATUS-UPDATE status=0
Feb 25 19:48:41 Debian kernel: IPv6: ADDRCONF(NETDEV_CHANGE): wlo1: link becomes ready
Feb 25 19:48:41 Debian NetworkManager[783]: <info>  [1708886921.7236] device (wlo1): Activation: (wifi) Stage 2 of 5 (Device Configure) successful. Connected to wireless network "VIII"
Feb 25 19:48:41 Debian systemd[1]: Finished NetworkManager-wait-online.service - Network Manager Wait Online.
Feb 25 19:48:41 Debian systemd[1]: Reached target network-online.target - Network is Online.
Feb 25 19:48:49 Debian systemd[1998]: Listening on dirmngr.socket - GnuPG network certificate management daemon.
Feb 25 19:48:52 Debian systemd[1]: NetworkManager-dispatcher.service: Deactivated successfully.
Feb 25 19:48:59 Debian systemd[1913]: Closed dirmngr.socket - GnuPG network certificate management daemon.
Feb 25 19:49:21 Debian dbus-daemon[688]: [system] Activating via systemd: service name='org.freedesktop.nm_dispatcher' unit='dbus-org.freedesktop.nm-dispatcher.service' requested by ':1.12' (uid=0 pid=783 comm="/usr/sbin/NetworkManager --no-daemon")
Feb 25 19:49:21 Debian systemd[1]: Starting NetworkManager-dispatcher.service - Network Manager Script Dispatcher Service...
Feb 25 19:49:21 Debian systemd[1]: Started NetworkManager-dispatcher.service - Network Manager Script Dispatcher Service.
Feb 25 19:49:31 Debian systemd[1]: NetworkManager-dispatcher.service: Deactivated successfully.
Feb 25 19:54:40 Debian sudo[13266]: ouroboros : TTY=pts/0 ; PWD=/home/ouroboros ; USER=root ; COMMAND=/usr/bin/journalctl -b 0 -g net --no-pager
Feb 25 19:57:34 Debian sudo[17761]: ouroboros : TTY=pts/0 ; PWD=/home/ouroboros ; USER=root ; COMMAND=/usr/bin/journalctl -b 0 -g net --no-pager

ouroboros
Posts: 19
Joined: 2024-02-18 14:42

Re: Wired connection stops working after a while

#25 Post by ouroboros »

arzgi wrote: Can you connect the cat5 cable from your computer to the wireless router?
I think I could do that. But this isn't a desired permanent setup, just to be clear.

ouroboros
Posts: 19
Joined: 2024-02-18 14:42

Re: Wired connection stops working after a while

#26 Post by ouroboros »

Before I mentioned that I tried setting up a static ip but the connection was slow. I then deleted this setting. But now, for some reason, ifconfig shows the exact same ipv4 address i set up earlier and the speed is normal. This is accidental and I would still like to find the reason for the primary problem.

I would also like to mention that I will be able to resume testing and posting only on friday as I will be going to another place without ethernet.

arzgi
Posts: 1198
Joined: 2008-02-21 17:03
Location: Finland
Been thanked: 32 times

Re: Wired connection stops working after a while

#27 Post by arzgi »

ouroboros wrote: 2024-02-25 19:10 Before I mentioned that I tried setting up a static ip but the connection was slow. I then deleted this setting. But now, for some reason, ifconfig shows the exact same ipv4 address i set up earlier and the speed is normal. This is accidental and I would still like to find the reason for the primary problem.

I would also like to mention that I will be able to resume testing and posting only on friday as I will be going to another place without ethernet.
Was it after you connected the cable to the wifi router? Then it is not an accident.

If you still need that managed switch, I suggest you put it behind your wifi router.

ouroboros
Posts: 19
Joined: 2024-02-18 14:42

Re: Wired connection stops working after a while

#28 Post by ouroboros »

arzgi wrote: 2024-02-26 12:48 Was it after you connected the cable to the wifi router? Then it is not an accident.
I didn't yet touch the wifi router. Setup is the same as with Windows.

arzgi
Posts: 1198
Joined: 2008-02-21 17:03
Location: Finland
Been thanked: 32 times

Re: Wired connection stops working after a while

#29 Post by arzgi »

ouroboros wrote: 2024-02-26 19:31
arzgi wrote: 2024-02-26 12:48 Was it after you connected the cable to the wifi router? Then it is not an accident.
I didn't yet touch the wifi router. Setup is the same as with Windows.
Use Windows or change router and switch vise versa, these are the options. In layman's terms router is much smarter than any switch. Don't know what Windows does, I don't even care.

I think even Windows would work after changing router/switch.

arzgi
Posts: 1198
Joined: 2008-02-21 17:03
Location: Finland
Been thanked: 32 times

Re: Wired connection stops working after a while

#30 Post by arzgi »

Iron wire then.

Connecting a switch to WAN (your ISP) is a highly unconventional way, I have heard no one else doing that, it means clients connected to the switch are in your ISP's net, wifi-router's clients would in be your LAN, and there is no way clients in two different sub nets can communicate. Routers are designed to work between networks.

And as a side note, when you are working in someone other's net, be careful what to do, that you don't burn your fingers.

Consumer grade routers usually have 4 rj-45 ports, one is to connect to the WAN, three for you own usage, if that is not enough, you need a switch. But then all your clients would be 192.168.x.x network, and I, and many others, like to sync between laptops, pcs, phones and access for example a printer which is in the same network.

Perhaps you would need to buy some network-cables, cat6 cables would be most suitable, cat5 cables are cheaper, but then you would loose some speed.

Your router seems to be configured to work out of the box, just change the router's password, and wifi-password and you are good to proceed.

ouroboros
Posts: 19
Joined: 2024-02-18 14:42

Re: Wired connection stops working after a while

#31 Post by ouroboros »

I tried to ask dhclient to renew my ip address https://serverfault.com/questions/42799 ... hcp-server.

Code: Select all

ouroboros@Debian:~$ sudo dhclient -r eno1                        
Killed old client process

Code: Select all

ouroboros@Debian:~$ sudo dhclient eno1
The last command just didn't finish at all.

Does anyone have any idea why is dhcp service acting this way?

arzgi
Posts: 1198
Joined: 2008-02-21 17:03
Location: Finland
Been thanked: 32 times

Re: Wired connection stops working after a while

#32 Post by arzgi »

You can use just

Code: Select all

sudo dhclient  -r
sudo dhclient
This way you don't need to know your NIC names, to see those

Code: Select all

ip a

ouroboros
Posts: 19
Joined: 2024-02-18 14:42

Re: Wired connection stops working after a while

#33 Post by ouroboros »

arzgi wrote: 2024-03-02 09:58 You can use just

Code: Select all

sudo dhclient  -r
sudo dhclient
This way you don't need to know your NIC names, to see those

Code: Select all

ip a
The last command took really long to finish but ip didn't change. Connection became slower after. Had to disconnect and reconnect to make it work at normal speeds. For some reason it doesn't renew ip. What could cause this? Should I try replacing/reinstalling dhclient?

arzgi
Posts: 1198
Joined: 2008-02-21 17:03
Location: Finland
Been thanked: 32 times

Re: Wired connection stops working after a while

#34 Post by arzgi »

I can't comment as I don't know how is your LAN now configured. You can try reinstalling dhclient, but usually problems with it refer more to network problems.

ouroboros
Posts: 19
Joined: 2024-02-18 14:42

Re: Wired connection stops working after a while

#35 Post by ouroboros »

So I tried putting wifi router between my laptop and the network switch. It fixed everything. I got new ipv4, could even get ipv6 without any trouble and dhclient could successfully renew my ip address.

Now I would like to know whether It is a requirement that there has to be a router between my laptop and a network switch for Debian (or any Linux distro) to work correctly? And what has been causing the problem? Everything worked fine on Windows10. I'd rather have a setup without a wifi router or any other router. But If I have to get one (I hope It doesn't have to be a wifi router) to get Debian working, which one would you recommend.

arzgi
Posts: 1198
Joined: 2008-02-21 17:03
Location: Finland
Been thanked: 32 times

Re: Wired connection stops working after a while

#36 Post by arzgi »

Generally, what works in windows often does not work with Linux, In your case I would just be happy to find a working solution, I think I gave the answer in my previous posts in the thread.

And there is no sense to connect the switch first, I am not sure if you even need that switch. It somehow confuses you.

ouroboros
Posts: 19
Joined: 2024-02-18 14:42

Re: Wired connection stops working after a while

#37 Post by ouroboros »

arzgi wrote: 2024-03-09 09:39 And there is no sense to connect the switch first, I am not sure if you even need that switch. It somehow confuses you.
Well that's how the ISP configured it. Maybe its an fiber optical modem and switch in one device? Should I be thinking about replacing it? What is the name of the device that could replace that switch?

arzgi
Posts: 1198
Joined: 2008-02-21 17:03
Location: Finland
Been thanked: 32 times

Re: Wired connection stops working after a while

#38 Post by arzgi »

Test if net works if you remove completely the switch. Switches only multiple signal to one port to all other ports, I have not used managed switches, but I would guess they can do some grouping etc.

And you asked suggested replacement for your wifi-router, if it is working, would not change. Only exception would be if it is so old, that will not get any firmware updates*. In that case, I suggest buying a new. All the routers you can buy from stores are wifi.-routers. Perhaps Cisco or some other company that makes product more to the business usage have routers with out wifi, but their price would be many times higher, and a bit overkill to home usage.

You can still make a router for example of some Rasberry Pi, or like, or even if you have some spare computer, to witch you can install two NICs, Debian can be made to work as router as well. The easiest solution would be to buy other wifi-router, but if you like to tinker and learn, you have more options.

* And if your wifi-router does not support openwrt.

EDIT; and you can shut down the wifi from routers, if you don't need it.

Post Reply