通过命令行ethtool, 可以设置网卡的duplex模式, 若要使ethtool的参数永久保存,下次Linux启动时也生效,可以通过如下设置:(以Redhat/Fedora为例)
比如修改eth0的ethtool参数:
编辑 /etc/sysconfig/network-scripts/ifcfg-eth0, 加入:
ETHTOOL_OPTS=”speed 100 duplex full autoneg off”
执行:
# /etc/init.d/network restart
#ethtool eth0
然后可以通过 命令 ethtool eth0 查看是否已经生效.
这样就设置eth0为100M全双工为on, 自适应为off, 相当于如下命令行,但是仅在当次运行有效,下次重启计算机后需要重行执行。
# ethtool -s eth0 autoneg off
# ethtool -s eth0 duplex full
参考链接: Linux add ethtool duplex settings to a network card permanently

WordPress 函数参考 – get_bookmarks