永久黄网站色视频免费直播,yy6080三理论日本中文,亚洲无码免费在线观看视频,欧美日韩精品一区二区在线播放

LINUX網(wǎng)卡(設(shè)置網(wǎng)卡速度及模式)

Ethtool是用于查詢及設(shè)置網(wǎng)卡參數(shù)的命令。
概要:
ethtool ethX //查詢ethX網(wǎng)口基本設(shè)置
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]\ //設(shè)置網(wǎng)口速率10/100/1000M
[duplex half|full]\ //設(shè)置網(wǎng)口半/全雙工
[autoneg on|off]\ //設(shè)置網(wǎng)口是否自協(xié)商
[port tp|aui|bnc|mii]\ //設(shè)置網(wǎng)口類型
[phyad N]\
[xcvr internal|exteral]\
[wol p|u|m|b|a|g|s|d...]\
[sopass xx:yy:zz:aa:bb:cc]\
[msglvl N]

舉例:
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
/sbin/ethtool
2)[root@linux /]# rpm -qf /sbin/ethtool
ethtool-1.6-5
3)怎樣使ethtool設(shè)置永久保存在網(wǎng)絡(luò)設(shè)備中?
解決方法一:
ethtool設(shè)置可通過(guò)/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之中。

歡迎轉(zhuǎn)載,但請(qǐng)保留此信息
[我的Linux,讓Linux更易用] CentOS精簡(jiǎn)版,集成lamp,lnmp版,wdcp,wdcdn,wddns,一鍵安裝包,集群負(fù)載均衡LVS,智能DNS/CDN,性能優(yōu)化
本文連接:http://www.fsowen.com/old/linux-ethtool