国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 系統(tǒng) > CentOS > 正文

CentOS下ethtool命令詳解

2020-06-21 12:46:05
字體:
供稿:網(wǎng)友

ethtool 是用于查詢及設(shè)置網(wǎng)卡參數(shù)的命令。

使用概要:

ethtool ethx       //查詢ethx網(wǎng)口基本設(shè)置,其中 x 是對(duì)應(yīng)網(wǎng)卡的編號(hào),如eth0、eth1等等

ethtool –h        //顯示ethtool的命令幫助(help)

ethtool –i ethX    //查詢ethX網(wǎng)口的相關(guān)信息 

ethtool –d ethX    //查詢ethX網(wǎng)口注冊(cè)性信息

ethtool –r ethX    //重置ethX網(wǎng)口到自適應(yīng)模式

ethtool –S ethX    //查詢ethX網(wǎng)口收發(fā)包統(tǒng)計(jì)

ethtool –s ethX [speed 10|100|1000] [duplex half|full]  [autoneg on|off]        //設(shè)置網(wǎng)口速率10/100/1000M、設(shè)置網(wǎng)口半/全雙工、設(shè)置網(wǎng)口是否自協(xié)商

使用舉例:

1)[root@linux /]# ethtool eth1

Settings for eth1:

Supported ports: [ TP ]

Supported link modes:   10baseT/Half 10baseT/Full 

                                100baseT/Half 100baseT/Full 

                                1000baseT/Full 

Supports auto-negotiation: Yes

Advertised link modes: 10baseT/Half 10baseT/Full 

                                100baseT/Half 100baseT/Full 

                                1000baseT/Full 

Advertised auto-negotiation: Yes

Speed: 1000Mb/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: e1000

version: 5.0.43-k1

firmware-version: N/A

bus-info: 06:08.1

3)[root@linux /]# ethtool -S eth1

NIC statistics:

rx_packets: 58068300

tx_packets: 87124083

rx_bytes: 1589713008

tx_bytes: 2165825901

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 100 duplex full

相關(guān)參考:

1)[root@linux /]# which ethtool        //查詢 ethtool 存放的路徑

    /sbin/ethtool

2)[root@linux /]# rpm -qf /sbin/ethtool        //查詢 ethtool 的版本信息

   ethtool-1.6-5

3)將 ethtool 設(shè)置永久保存在網(wǎng)絡(luò)設(shè)備的方法

解決方法一:

ethtool 設(shè)置可通過 /etc/sysconfig/network-scripts/ifcfg-ethX 文件保存,從而在設(shè)備下次啟動(dòng)時(shí)激活選項(xiàng)。 

例如:ethtool -s eth0 speed 100 duplex full autoneg off

此指令將eth0設(shè)備設(shè)置為全雙工自適應(yīng),速度為100Mbs。若要eth0啟動(dòng)時(shí)設(shè)置這些參數(shù), 修改文件/etc/sysconfig/network-scripts/ifcfg-eth0 ,添加如下一行: 

ETHTOOL_OPTS="speed 100 duplex full autoneg off"

解決方法二:

將ethtool設(shè)置寫入/etc/rc.d/rc.local之中。


發(fā)表評(píng)論 共有條評(píng)論
用戶名: 密碼:
驗(yàn)證碼: 匿名發(fā)表
主站蜘蛛池模板: 温宿县| 荣昌县| 福鼎市| 苍山县| 项城市| 永寿县| 云南省| 泉州市| 西昌市| 南宫市| 深圳市| 沁水县| 会同县| 西青区| 依安县| 蚌埠市| 宜黄县| 泉州市| 五台县| 奈曼旗| 新晃| 马尔康县| 晴隆县| 阜阳市| 西和县| 汶川县| 闸北区| 华蓥市| 陕西省| 延吉市| 保德县| 宁城县| 和林格尔县| 云龙县| 民和| 永平县| 武平县| 五寨县| 临武县| 揭西县| 类乌齐县|