我使用的是 Ubuntu 16.04。我尝试了各种方法来保持以太网连接,但效果并不好。到目前为止,唯一有效的方法是
sudo ethtool --change enp1s0 speed 100 duplex full autoneg off
但这并非永久性的解决方案。
答案1
把这个放进去/etc/rc.local
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
ethtool --change enp1s0 speed 100 duplex full autoneg off
exit 0
出于好奇:你知道为什么必须强制以太网设置吗?电缆的另一端不自动协商吗?是网卡质量不好吗?