Ubuntu16.04无法有线连接,线缆被拔出。

包含网卡/无线网的网络问题和ADSL/校园网/宽带拨号支持及代理/共享等网络使用问题
回复
H奇点
帖子: 15
注册时间: 2016-11-09 13:52
系统: ubuntu

Ubuntu16.04无法有线连接,线缆被拔出。

#1

帖子 H奇点 » 2017-06-08 15:22

hui@hui-X455LJ:/etc/init.d$ ifconfig
eth0 Link encap:以太网 硬件地址 30:5a:3a:87:ef:4f
UP BROADCAST MULTICAST MTU:1500 跃点数:1
接收数据包:34245 错误:0 丢弃:0 过载:0 帧数:0
发送数据包:29232 错误:0 丢弃:0 过载:0 载波:0
碰撞:0 发送队列长度:1000
接收字节:13058772 (13.0 MB) 发送字节:4477018 (4.4 MB)

lo Link encap:本地环回
inet 地址:127.0.0.1 掩码:255.0.0.0
inet6 地址: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 跃点数:1
接收数据包:11820 错误:0 丢弃:0 过载:0 帧数:0
发送数据包:11820 错误:0 丢弃:0 过载:0 载波:0
碰撞:0 发送队列长度:1
接收字节:1301882 (1.3 MB) 发送字节:1301882 (1.3 MB)

hui@hui-X455LJ:~$ sudo vi /etc/init.d/rc.local
#! /bin/sh
### BEGIN INIT INFO
# Provides: rc.local
# Required-Start: $all
# Required-Stop:
# Default-Start: 2 3 4 5
# Default-Stop:
# Short-Description: Run /etc/rc.local if it exist
### END INIT INFO


PATH=/sbin:/usr/sbin:/bin:/usr/bin

. /lib/init/vars.sh
. /lib/lsb/init-functions

do_start() {
if [ -x /etc/rc.local ]; then
[ "$VERBOSE" != no ] && log_begin_msg "Running local boot scripts (/etc/rc.local)"
/etc/rc.local
ES=$?
[ "$VERBOSE" != no ] && log_end_msg $ES
return $ES
fi
}

case "$1" in
start)
do_start
;;
restart|reload|force-reload)
echo "Error: argument '$1' not supported" >&2
exit 3
;;
stop|status)
# No-op
exit 0
;;
*)
echo "Usage: $0 start|stop" >&2
exit 3
;;
esac
/sbin/ethtool -s eth0 autoneg off speed 100 duplex full


每次开机后运行:
hui@hui-X455LJ:~$ sudo ethtool -s eth0 autoneg off speed 100 duplex full
问题可以解决,每次都得这样做,很麻烦。求大神支招!!
头像
vickycq
帖子: 4507
注册时间: 2011-03-20 13:12
系统: Debian
来自: 山东省寿光县
联系:

Re: Ubuntu16.04无法有线连接,线缆被拔出。

#2

帖子 vickycq » 2017-06-08 15:29

执行以下指令将结果全部复制贴上来

代码: 全选

uname -a
cat /etc/issue
lspci -knn | grep -iA2 net
Debian 中文论坛 - forums.debiancn.org
欢迎所有 Debian GNU/Linux 用户
H奇点
帖子: 15
注册时间: 2016-11-09 13:52
系统: ubuntu

Re: Ubuntu16.04无法有线连接,线缆被拔出。

#3

帖子 H奇点 » 2017-06-08 17:05

hui@hui-X455LJ:~$ uname -a
Linux hui-X455LJ 4.4.0-31-generic #50-Ubuntu SMP Wed Jul 13 00:07:12 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
hui@hui-X455LJ:~$ cat /etc/issue
Ubuntu 16.04.1 LTS \n \l

hui@hui-X455LJ:~$ lspci -knn | grep -iA2 net
02:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:8168] (rev 10)
Subsystem: ASUSTeK Computer Inc. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [1043:200f]
Kernel driver in use: r8169
Kernel modules: r8169
03:00.0 Network controller [0280]: Broadcom Corporation BCM43142 802.11b/g/n [14e4:4365] (rev 01)
Subsystem: Lite-On Communications Inc BCM43142 802.11b/g/n [11ad:6675]
Kernel driver in use: wl
头像
vickycq
帖子: 4507
注册时间: 2011-03-20 13:12
系统: Debian
来自: 山东省寿光县
联系:

Re: Ubuntu16.04无法有线连接,线缆被拔出。

#4

帖子 vickycq » 2017-06-08 17:11

H奇点 写了:RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:8168] (rev 10)
Kernel driver in use: r8169
网卡 [10ec:8168] 使用 r8169 驱动时经常出现此种问题。尝试安装 r8168 驱动

代码: 全选

sudo apt install r8168-dkms
重新启动计算机
Debian 中文论坛 - forums.debiancn.org
欢迎所有 Debian GNU/Linux 用户
H奇点
帖子: 15
注册时间: 2016-11-09 13:52
系统: ubuntu

Re: Ubuntu16.04无法有线连接,线缆被拔出。

#5

帖子 H奇点 » 2017-06-08 19:04

搞定了,谢谢!!
zaneven
帖子: 4
注册时间: 2017-08-09 9:08
系统: Ubuntu16.04

Re: Ubuntu16.04无法有线连接,线缆被拔出。

#6

帖子 zaneven » 2017-08-09 9:52

vickycq 写了:执行以下指令将结果全部复制贴上来

代码: 全选

uname -a
cat /etc/issue
lspci -knn | grep -iA2 net
你好,可以看看我的问题,一直显示有线电缆被拔出

enp0s25 Link encap:以太网 硬件地址 48:4d:7e:e6:3f:d3
UP BROADCAST MULTICAST MTU:1500 跃点数:1
接收数据包:0 错误:0 丢弃:0 过载:0 帧数:0
发送数据包:0 错误:0 丢弃:0 过载:0 载波:0
碰撞:0 发送队列长度:1000
接收字节:0 (0.0 B) 发送字节:0 (0.0 B)
中断:20 Memory:f7100000-f7120000

lo Link encap:本地环回
inet 地址:127.0.0.1 掩码:255.0.0.0
inet6 地址: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 跃点数:1
接收数据包:4004 错误:0 丢弃:0 过载:0 帧数:0
发送数据包:4004 错误:0 丢弃:0 过载:0 载波:0
碰撞:0 发送队列长度:1
接收字节:297632 (297.6 KB) 发送字节:297632 (297.6 KB)

caupd@caupd-Precision-Tower-5810:~$ uname -a
Linux caupd-Precision-Tower-5810 4.8.0-36-generic #36~16.04.1-Ubuntu SMP Sun Feb 5 09:39:57 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
caupd@caupd-Precision-Tower-5810:~$ lspci -knn | grep -iA2 net
00:19.0 Ethernet controller [0200]: Intel Corporation Ethernet Connection I217-LM [8086:153a] (rev 05)
Subsystem: Dell Ethernet Connection I217-LM [1028:0617]
Kernel driver in use: e1000e
Kernel modules: e1000e
caupd@caupd-Precision-Tower-5810:~$ sudo lshw -C net
*-network
description: Ethernet interface
product: Ethernet Connection I217-LM
vendor: Intel Corporation
physical id: 19
bus info: pci@0000:00:19.0
logical name: enp0s25
version: 05
serial: 48:4d:7e:e6:3f:d3
capacity: 1Gbit/s
width: 32 bits
clock: 33MHz
capabilities: pm msi bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
configuration: autonegotiation=on broadcast=yes driver=e1000e driverversion=3.2.6-k firmware=0.13-4 latency=0 link=no multicast=yes port=twisted pair
resources: irq:30 memory:f7100000-f711ffff memory:f7139000-f7139fff ioport:f020(size=32)
joyeyi
帖子: 5
注册时间: 2017-11-09 10:42
系统: win7+ubuntu16.04

Re: Ubuntu16.04无法有线连接,线缆被拔出。

#7

帖子 joyeyi » 2017-11-09 11:18

您好,我也遇到和您一模一样的问题,请问您最终是如何解决的呢?
zaneven 写了:
vickycq 写了:执行以下指令将结果全部复制贴上来

代码: 全选

uname -a
cat /etc/issue
lspci -knn | grep -iA2 net
你好,可以看看我的问题,一直显示有线电缆被拔出

enp0s25 Link encap:以太网 硬件地址 48:4d:7e:e6:3f:d3
UP BROADCAST MULTICAST MTU:1500 跃点数:1
接收数据包:0 错误:0 丢弃:0 过载:0 帧数:0
发送数据包:0 错误:0 丢弃:0 过载:0 载波:0
碰撞:0 发送队列长度:1000
接收字节:0 (0.0 B) 发送字节:0 (0.0 B)
中断:20 Memory:f7100000-f7120000

lo Link encap:本地环回
inet 地址:127.0.0.1 掩码:255.0.0.0
inet6 地址: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 跃点数:1
接收数据包:4004 错误:0 丢弃:0 过载:0 帧数:0
发送数据包:4004 错误:0 丢弃:0 过载:0 载波:0
碰撞:0 发送队列长度:1
接收字节:297632 (297.6 KB) 发送字节:297632 (297.6 KB)

caupd@caupd-Precision-Tower-5810:~$ uname -a
Linux caupd-Precision-Tower-5810 4.8.0-36-generic #36~16.04.1-Ubuntu SMP Sun Feb 5 09:39:57 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
caupd@caupd-Precision-Tower-5810:~$ lspci -knn | grep -iA2 net
00:19.0 Ethernet controller [0200]: Intel Corporation Ethernet Connection I217-LM [8086:153a] (rev 05)
Subsystem: Dell Ethernet Connection I217-LM [1028:0617]
Kernel driver in use: e1000e
Kernel modules: e1000e
caupd@caupd-Precision-Tower-5810:~$ sudo lshw -C net
*-network
description: Ethernet interface
product: Ethernet Connection I217-LM
vendor: Intel Corporation
physical id: 19
bus info: pci@0000:00:19.0
logical name: enp0s25
version: 05
serial: 48:4d:7e:e6:3f:d3
capacity: 1Gbit/s
width: 32 bits
clock: 33MHz
capabilities: pm msi bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
configuration: autonegotiation=on broadcast=yes driver=e1000e driverversion=3.2.6-k firmware=0.13-4 latency=0 link=no multicast=yes port=twisted pair
resources: irq:30 memory:f7100000-f711ffff memory:f7139000-f7139fff ioport:f020(size=32)
joyeyi
帖子: 5
注册时间: 2017-11-09 10:42
系统: win7+ubuntu16.04

Re: Ubuntu16.04无法有线连接,线缆被拔出。

#8

帖子 joyeyi » 2017-11-09 11:19

您好,我也遇到和您一模一样的问题,请问您最终是如何解决的呢?
zaneven 写了:
vickycq 写了:执行以下指令将结果全部复制贴上来

代码: 全选

uname -a
cat /etc/issue
lspci -knn | grep -iA2 net
你好,可以看看我的问题,一直显示有线电缆被拔出

enp0s25 Link encap:以太网 硬件地址 48:4d:7e:e6:3f:d3
UP BROADCAST MULTICAST MTU:1500 跃点数:1
接收数据包:0 错误:0 丢弃:0 过载:0 帧数:0
发送数据包:0 错误:0 丢弃:0 过载:0 载波:0
碰撞:0 发送队列长度:1000
接收字节:0 (0.0 B) 发送字节:0 (0.0 B)
中断:20 Memory:f7100000-f7120000

lo Link encap:本地环回
inet 地址:127.0.0.1 掩码:255.0.0.0
inet6 地址: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 跃点数:1
接收数据包:4004 错误:0 丢弃:0 过载:0 帧数:0
发送数据包:4004 错误:0 丢弃:0 过载:0 载波:0
碰撞:0 发送队列长度:1
接收字节:297632 (297.6 KB) 发送字节:297632 (297.6 KB)

caupd@caupd-Precision-Tower-5810:~$ uname -a
Linux caupd-Precision-Tower-5810 4.8.0-36-generic #36~16.04.1-Ubuntu SMP Sun Feb 5 09:39:57 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
caupd@caupd-Precision-Tower-5810:~$ lspci -knn | grep -iA2 net
00:19.0 Ethernet controller [0200]: Intel Corporation Ethernet Connection I217-LM [8086:153a] (rev 05)
Subsystem: Dell Ethernet Connection I217-LM [1028:0617]
Kernel driver in use: e1000e
Kernel modules: e1000e
caupd@caupd-Precision-Tower-5810:~$ sudo lshw -C net
*-network
description: Ethernet interface
product: Ethernet Connection I217-LM
vendor: Intel Corporation
physical id: 19
bus info: pci@0000:00:19.0
logical name: enp0s25
version: 05
serial: 48:4d:7e:e6:3f:d3
capacity: 1Gbit/s
width: 32 bits
clock: 33MHz
capabilities: pm msi bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
configuration: autonegotiation=on broadcast=yes driver=e1000e driverversion=3.2.6-k firmware=0.13-4 latency=0 link=no multicast=yes port=twisted pair
resources: irq:30 memory:f7100000-f711ffff memory:f7139000-f7139fff ioport:f020(size=32)
头像
yuzh652800
帖子: 673
注册时间: 2008-03-12 8:41
来自: nenu.Ani

Re: Ubuntu16.04无法有线连接,线缆被拔出。

#9

帖子 yuzh652800 » 2020-08-10 18:39

vickycq 写了: 2017-06-08 17:11
H奇点 写了:RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:8168] (rev 10)
Kernel driver in use: r8169
网卡 [10ec:8168] 使用 r8169 驱动时经常出现此种问题。尝试安装 r8168 驱动

代码: 全选

sudo apt install r8168-dkms
重新启动计算机
按照这个办法在Zorin 15.2下,成功解决问题。
不能假定每个人都爱用命令行。
只要支持Linux的,我们都应该支持。
回复