个人做网站可以盈利么,建站宝盒免费下载,短故事网站模板,家族公司怎么注册Filesystem Packages-console-network-ethtool 命令描述#xff1a; ethtool 是用于查询及设置网卡参数的命令。
使用命令#xff1a;
ethtool ethx //查询ethx网口基本设置#xff0c;其中 x 是对应网卡的编号#xff0c;如eth0、eth1等等
ethtool –…Filesystem Packages-console-network-ethtool 命令描述 ethtool 是用于查询及设置网卡参数的命令。
使用命令
ethtool ethx //查询ethx网口基本设置其中 x 是对应网卡的编号如eth0、eth1等等
ethtool –h //显示ethtool的命令帮助(help) ethtool –i ethX //查询ethX网口的相关信息
ethtool –d ethX //查询ethX网口注册性信息
ethtool –r ethX //重置ethX网口到自适应模式
ethtool –S ethX //查询ethX网口收发包统计
ethtool –s ethX [speed 10|100|1000] [duplex half|full] [autoneg on|off] //设置网口速率10/100/1000M、设置网口半/全双工、设置网口是否自协商
ethtool -E eth0 magic 0x10798086 offset 0x10 value 0x1A 修改网卡EEPROM内容0x1079 网卡device id , 0x8086网卡verdor id
ethtool -e eth0 : dump网卡EEPROM内容 修改端口速率ethtool -s
这个命令多用于手工设置网络速率一般千兆网卡支持10|100|1000三个速率单位是Mbps。
用法ethtool -s eth0 speed 1000 duplex full autoneg off
效果将设备号eth0对应的物理端口设置为速率为1000Mbps全双工工作模式同时关闭自动协商。
注若需要永久更改有两种方法
1. 将上述命令写入/etc/rc.local文件中开机自动执行
2. 在/etc/sysconfig/network-scripts/ifcfg-eth0中添加一行ETHTOOL_OPTSspeed 1000 duplex full autoneg off。这里仅仅以eth0为例其他设备号同理。 相关参考 1[rootlinux /]# which ethtool //查询 ethtool 存放的路径 /sbin/ethtool 2[rootlinux /]# rpm -qf /sbin/ethtool //查询 ethtool 的版本信息 ethtool-1.6-5 3将 ethtool 设置永久保存在网络设备的方法 解决方法一: ethtool 设置可通过 /etc/sysconfig/network-scripts/ifcfg-ethX 文件保存从而在设备下次启动时激活选项。 例如ethtool -s eth0 speed 100 duplex full autoneg off 此指令将eth0设备设置为全双工自适应速度为100Mbs。若要eth0启动时设置这些参数, 修改文件/etc/sysconfig/network-scripts/ifcfg-eth0 添加如下一行: ETHTOOL_OPTSspeed 100 duplex full autoneg off 解决方法二: 将ethtool设置写入/etc/rc.d/rc.local之中。 典型用法查询网络端口位置ethtool -p
多用于管理多网口的服务器主机由于背板的网络端口数量大有时候不知道那个物理端口对应eth0或其他设备号我们就可以使用这个命令来查询。
用法ethtool -p eth0 效果设备号eth0对应的物理端口的两个指示灯会闪烁