NIXway.net
 
 

Linux如何设置网卡双工(Duplex)参数

通过命令行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

2010年06月22日 | 分类: Linux系统管理. | 本文链接 | RSS feed. | 评论 | 引用 | | 查看(191)

发表评论

您的邮箱 不会 被公开. 标注 * 的不能为空

*
*

NIXway Groups.
邮 件: info@nixway.net
京ICP备06047741号