位置: 编程技术 - 正文
推荐整理分享CentOS下ethtool命令详解(centos7 ethtool),希望有所帮助,仅作参考,欢迎阅读内容。
文章相关热门搜索词:centos etc,centos ethtool命令,centos e,centos7 eth0,centos ethtool命令,centos7 ethtool,centos7 ethtool,centos eth0,内容如对您有帮助,希望把文章链接给更多的朋友!
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 ||] [duplex half|full] [autoneg on|off] //设置网口速率//M、设置网口半/全双工、设置网口是否自协商
使用举例:
1)[root@linux /]# ethtool eth1
Settings for eth1:
Supported ports: [ TP ]
Supported link modes: baseT/Half baseT/Full
baseT/Half baseT/Full
baseT/Full
Supports auto-negotiation: Yes
Advertised link modes: baseT/Half baseT/Full
baseT/Half baseT/Full
baseT/Full
Advertised auto-negotiation: Yes
Speed: Mb/s
Duplex: Full
Port: Twisted Pair
PHYAD: 0
Transceiver: internal
Auto-negotiation: on
Supports Wake-on: umbg
Wake-on: d
Link detected: yes
2)[root@linux /]# ethtool -i eth1
driver: e
version: 5.0.-k1
firmware-version: N/A
bus-info: :.1
3)[root@linux /]# ethtool -S eth1
NIC statistics:
rx_packets:
tx_packets:
rx_bytes:
tx_bytes:
rx_errors: 0
tx_errors: 0
rx_dropped: 0
tx_dropped: 0
multicast: 0
collisions: 0
rx_length_errors: 0
rx_over_errors: 0
rx_crc_errors: 0
rx_frame_errors: 0
rx_fifo_errors: 0
rx_missed_errors: 0
tx_aborted_errors: 0
tx_carrier_errors: 0
tx_fifo_errors: 0
tx_heartbeat_errors: 0
tx_window_errors: 0
4)[root@linux /]# ethtool -s eth1 autoneg off speed duplex full
相关参考:
1)[root@linux /]# which ethtool //查询 ethtool 存放的路径
/sbin/ethtool
2)[root@linux /]# rpm -qf /sbin/ethtool //查询 ethtool 的版本信息
ethtool-1.6-5
3)将 ethtool 设置永久保存在网络设备的方法
解决方法一:
ethtool 设置可通过 /etc/sysconfig/network-scripts/ifcfg-ethX 文件保存,从而在设备下次启动时激活选项。
例如:ethtool -s eth0 speed duplex full autoneg off
此指令将eth0设备设置为全双工自适应,速度为Mbs。若要eth0启动时设置这些参数, 修改文件/etc/sysconfig/network-scripts/ifcfg-eth0 ,添加如下一行:
ETHTOOL_OPTS="speed duplex full autoneg off"
解决方法二:
将ethtool设置写入/etc/rc.d/rc.local之中。
centos6.5关闭NetworkManager服务的方法 系统:centos6.5minidesktop安装完毕之后重启网卡的时候出现如下报错[root@localhost~]#servicenetworkrestart正在关闭接口eth0:设备状态:3(断开连接)[确定]关闭环回
设置CentOS服务的开机启动顺序的方法 我们知道,在CentOS系统中,系统服务的启动脚本一般放在/etc/init.d目录下。不同的开机模式,则分别对应到/etc/rcx.d目录下。其实/etc/rcx.d上的文件,一般
CentOS如何关闭在线登录用户?CentOS关闭在线登录用户的方法 在使用电脑的时候,发现自己的电脑上有其他的用户登陆。如果其他用户用的是自己的名字,那么就能通过who去查询出来,但是如果登陆的都是root用户
标签: centos7 ethtool
本文链接地址:https://www.jiuchutong.com/biancheng/357115.html 转载请保留说明!友情链接: 武汉网站建设