Ich habe eine schreckliche Woche damit, ein Problem mit meiner Ethernet-Verbindung zu lösen. Das Ethernet funktioniert 1 Minute lang einwandfrei, bevor ich die Verbindung verliere. Das Netzwerksymbol oben wird ständig als verbunden angezeigt, aber ich muss die Verbindung trennen und wieder herstellen, indem ich einige Sekunden / Minuten lang auf "Kabelverbindung 1" klicke.
Um dieses Problem zu umgehen, wird jede Minute ein Cron-Job ausgeführt, um die Verbindung zu den folgenden Codezeilen zu trennen und erneut herzustellen:
#!/bin/bash
sudo ifdown enp4s0
sudo ifup enp4s0
Bitte helfen Sie. Ich brauche eine dauerhaftere Lösung für eine stabile Ethernet-Verbindung.
lspci | grep -i realtek
04:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd.
RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 01)
lsmod | grep r816
r8168 499712 0
dmesg | grep r816
[ 2.207551] r8168: loading out-of-tree module taints kernel.
[ 2.207789] r8168: module verification failed: signature and/or required key missing - tainting kernel
[ 2.208146] r8168 Gigabit Ethernet driver 8.044.02-NAPI loaded
[ 2.208243] r8168 0000:04:00.0: Default use INTx.
[ 2.230190] r8168: This product is covered by one or more of the following patents: US6,570,884, US6,115,776, and US6,327,625.
[ 2.230194] r8168 Copyright (C) 2017 Realtek NIC software team <nicfae@realtek.com>
[ 2.305436] r8168 0000:04:00.0 enp4s0: renamed from eth0
[ 23.483150] r8168: enp4s0: link up
[ 866.740512] r8168: enp4s0: link up
[71714.965195] r8168: enp4s0: link up
[71773.494292] r8168: enp4s0: link up
sudo ethtool enp4s0
Settings for enp4s0:
Supported ports: [ TP ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Supported pause frame use: No
Supports auto-negotiation: Yes
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Advertised pause frame use: No
Advertised auto-negotiation: Yes
Speed: Unknown!
Duplex: Half
Port: Twisted Pair
PHYAD: 0
Transceiver: internal
Auto-negotiation: on
MDI-X: Unknown
Supports Wake-on: pumbg
Wake-on: ug
Current message level: 0x00000033 (51)
drv probe ifdown ifup
Link detected: no
ifconfig
enp4s0 Link encap:Ethernet HWaddr 00:26:18:11:78:a8
inet addr:192.168.26.30 Bcast:192.168.27.255 Mask:255.255.254.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:394947 errors:0 dropped:0 overruns:0 frame:0
TX packets:278710 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:270000748 (270.0 MB) TX bytes:37833932 (37.8 MB)
Interrupt:18 Base address:0xa000
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:38302 errors:0 dropped:0 overruns:0 frame:0
TX packets:38302 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1
RX bytes:3045435 (3.0 MB) TX bytes:3045435 (3.0 MB)
lshw
*-network
description: Ethernet interface
product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
vendor: Realtek Semiconductor Co., Ltd.
physical id: 0
bus info: pci@0000:04:00.0
logical name: enp4s0
version: 01
serial: 00:26:18:11:78:a8
size: 1Gbit/s
capacity: 1Gbit/s
width: 64 bits
clock: 33MHz
capabilities: bus_master cap_list rom ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
configuration: autonegotiation=on broadcast=yes driver=r8168 driverversion=8.044.02-NAPI duplex=full latency=0 link=yes multicast=yes port=twisted pair speed=1Gbit/s
resources: irq:18 ioport:d800(size=256) memory:f9fff000-f9ffffff memory:f9fc0000-f9fdffff
cat /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto enp4s0
allow-hotplug enp4s0
iface enp4s0 inet dhcp
pre-up ifconfig enp4s0 hw ether 00:26:18:11:78:A8
cat /etc/NetworkManager/NetworkManager.conf
[main]
plugins=ifupdown,keyfile,ofono
dns=dnsmasq
[ifupdown]
managed=true
uname -r
4.8.0-58-generic
Dinge, die ich getan habe:
1) Installieren Sie den r8168-dkms mit Synaptic.
2) Setzen Sie den Abschnitt "Methode" der IPv6-Einstellungen auf "Ignorieren".
3) Meine Internet-DNS-Server wurden auf 8.8.8.8,8.8.4.4 ... usw. Geändert.
4) Ändern Sie die "MTU" in 9000.
5) Die Schnittstellendatei wurde geändert in: auto lo iface lo inet loopback auto enp4s0 iface enp4s0 inet dhcp
sowie für statische.
6) sudo apt-get purge r8168-dkms von der Ubuntu 14.04 -Kabelverbindung wird weiterhin getrennt.
7) Alles auf https://unixblogger.com/2011/10/18/the-pain-of-an-realtek-rtl8111rtl8168-ethernet-card /
8) Installieren Sie eine ältere Version von r8168, dann:
sudo update-initramfs -u
echo "blacklist r8169" | sudo tee -a /etc/modprobe.d/blacklist.conf
9) Lesen Sie die Seiten von https: // ubuntuforums dot org / archive / index.php / t-2291730.html durch.
10) Alles auf https: // ubuntuforums dot org / showthread.php? T = 2248047
11) Kaltstart .
12)
sudo sh -c "echo 'net.ipv6.conf.all.disable_ipv6 = 1' >> /etc/sysctl.conf"
sudo sh -c "echo 'net.ipv6.conf.default.disable_ipv6 = 1' >> /etc/sysctl.conf"
sudo sh -c "echo 'net.ipv6.conf.lo.disable_ipv6 = 1' >> /etc/sysctl.conf"
sudo sysctl -p
sudo sed -i 's/false/true/g' /etc/NetworkManager/NetworkManager.conf
sudo reboot -i NOW
13) https: // nosemaj dot org / hardy-r8168
14) Testen Sie das Ethernet-Kabel mit anderen Geräten.
15) Weinen.
16) Fragte meine Mutter.
UPDATE # 1
dkms status
bbswitch, 0.8, 4.8.0-36-generic, x86_64: installed
bbswitch, 0.8, 4.8.0-58-generic, x86_64: installed
nvidia-375, 375.66, 4.8.0-36-generic, x86_64: installed
nvidia-375, 375.66, 4.8.0-58-generic, x86_64: installed
r8168, 8.041.00: added
modinfo r8168 | grep -i version
version: 8.044.02-NAPI
srcversion: 5388F61A23A68A548D001CF
vermagic: 4.8.0-58-generic SMP mod_unload modversions
sudo apt-get purge r8168-dkms
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
r8168-dkms*
0 upgraded, 0 newly installed, 1 to remove and 13 not upgraded.
After this operation, 1,109 kB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 243432 files and directories currently installed.)
Removing r8168-dkms (8.041.00-1) ...
------------------------------
Deleting module version: 8.041.00
completely from the DKMS tree.
------------------------------
Done.
Purging configuration files for r8168-dkms (8.041.00-1) ...
Zu entfernende Befehle:
sudo apt-get remove r8168-dkms
sudo apt-get purge r8168-dkms
sudo /sbin/modprobe -r r8168
Keiner dieser Befehle entfernte 8.044.
UPDATE # 2
dkms status
bbswitch, 0.8, 4.8.0-36-generic, x86_64: installed
bbswitch, 0.8, 4.8.0-58-generic, x86_64: installed
nvidia-375, 375.66, 4.8.0-36-generic, x86_64: installed
nvidia-375, 375.66, 4.8.0-58-generic, x86_64: installed
r8168, 8.041.00: added
sudo dkms build r8168/8.041.00 -k "$(uname -r)/$(uname -p)"
Kernel preparation unnecessary for this kernel. Skipping...
Building module:
cleaning build area....
make KERNELRELEASE=4.8.0-58-generic -C /lib/modules/4.8.0-58-generic/build M=/var/lib/dkms/r8168/8.041.00/build....(bad exit status: 2)
ERROR: Cannot create report: [Errno 17] File exists: '/var/crash/r8168-dkms.0.crash'
Error! Bad return status for module build on kernel: 4.8.0-58-generic (x86_64)
Consult /var/lib/dkms/r8168/8.041.00/build/make.log for more information.
cat /var/lib/dkms/r8168/8.041.00/build/make.log
DKMS make.log for r8168-8.041.00 for kernel 4.8.0-58-generic (x86_64)
Tue Jul 11 16:03:35 AST 2017
make: Entering directory '/usr/src/linux-headers-4.8.0-58-generic'
LD /var/lib/dkms/r8168/8.041.00/build/built-in.o
CC [M] /var/lib/dkms/r8168/8.041.00/build/r8168_n.o
/var/lib/dkms/r8168/8.041.00/build/r8168_n.c: In function ‘rtl8168_fix_features’:
/var/lib/dkms/r8168/8.041.00/build/r8168_n.c:4212:30: error: ‘NETIF_F_ALL_CSUM’ undeclared (first use in this function)
features &= ~NETIF_F_ALL_CSUM;
^
/var/lib/dkms/r8168/8.041.00/build/r8168_n.c:4212:30: note: each undeclared identifier is reported only once for each function it appears in
/var/lib/dkms/r8168/8.041.00/build/r8168_n.c: In function ‘rtl8168_start_xmit’:
/var/lib/dkms/r8168/8.041.00/build/r8168_n.c:24599:12: error: ‘struct net_device’ has no member named ‘trans_start’
dev->trans_start = jiffies;
^
scripts/Makefile.build:289: recipe for target '/var/lib/dkms/r8168/8.041.00/build/r8168_n.o' failed
make[1]: *** [/var/lib/dkms/r8168/8.041.00/build/r8168_n.o] Error 1
Makefile:1491: recipe for target '_module_/var/lib/dkms/r8168/8.041.00/build' failed
make: *** [_module_/var/lib/dkms/r8168/8.041.00/build] Error 2
make: Leaving directory '/usr/src/linux-headers-4.8.0-58-generic'
UPDATE # 3
Nachdem ich es mit r8168 V 8.042 versucht hatte und fehlgeschlagen war, habe ich Version 8.043.02 ausprobiert und hatte einige Erfolge, obwohl wir noch nicht bei der endgültigen Lösung sind.
sudo dkms build r8168/8.043.02 -k "$(uname -r)/$(uname -p)"
Module r8168/8.043.02 already built for kernel 4.8.0-58-generic/4
sudo dkms install r8168/8.043.02 -k "$(uname -r)/$(uname -p)"
Module r8168/8.043.02 already installed on kernel 4.8.0-58-generic/x86_64
dkms status
bbswitch, 0.8, 4.8.0-58-generic, x86_64: installed
nvidia-375, 375.66, 4.8.0-58-generic, x86_64: installed
r8168, 8.043.02, 4.8.0-58-generic, x86_64: installed (WARNING! Diff between built and installed module!)
UPDATE # 4
ls -al /var/lib/dkms/r8168
total 12
drwxr-xr-x 3 root root 4096 Jul 11 16:43 .
drwxr-xr-x 5 root root 4096 Jul 11 16:42 ..
drwxr-xr-x 4 root root 4096 Jul 11 16:43 8.043.02
lrwxrwxrwx 1 root root 32 Jul 11 16:43 kernel-4.8.0-58-generic-x86_64 -> 8.043.02/4.8.0-58-generic/x86_64
modinfo r8168 | grep -i version
version: 8.044.02-NAPI
srcversion: 5388F61A23A68A548D001CF
vermagic: 4.8.0-58-generic SMP mod_unload modversions
ls -al /lib/modules/4.8.0-58-generic/updates/dkms
total 18624
drwxr-xr-x 2 root root 4096 Jul 1 11:01 .
drwxr-xr-x 3 root root 4096 Jul 1 11:00 ..
-rw-r--r-- 1 root root 22720 Jul 1 11:00 bbswitch.ko
-rw-r--r-- 1 root root 85488 Jul 1 11:01 nvidia_375_drm.ko
-rw-r--r-- 1 root root 16735368 Jul 1 11:01 nvidia_375.ko
-rw-r--r-- 1 root root 1086360 Jul 1 11:01 nvidia_375_modeset.ko
-rw-r--r-- 1 root root 1124728 Jul 1 11:01 nvidia_375_uvm.ko
modinfo /lib/modules/4.8.0-58-generic/updates/dkms/r8168.ko
modinfo: ERROR: Module /lib/modules/4.8.0-58-generic/updates/dkms/r8168.ko not found.
UPDATE 5
Es scheint, als hätte dieser Befehl den 8.044-Treiber entfernt, und jetzt ist nur noch der 8.043.02-Treiber übrig.
sudo apt-get -y dist-upgrade
r8168-dkms
. Installieren Sie es neu und entfernen Sie alle Änderungen, die Sie vorgenommen haben ... wie MTU = 9000 usw. Bitte beschreiben Sie Ihre Netzwerkkonfiguration. Wohin geht das Netzwerkkabel vom Computer? Switch / Router / Modem?