linux检测网卡步骤,linux网卡检测命令
linux下查看網(wǎng)卡是否有物理網(wǎng)線連接的命令
這個比較有用,幫助判斷網(wǎng)絡(luò)故障
/sbin/mii-tool
mii-tool(這是Linux下專門設(shè)置網(wǎng)卡工作模式的命令)
1. 查看網(wǎng)卡的工作模式,輸入命令:
mii-tool -v
SIOCGMIIREG on eth0 failed: Input/output error
eth0: negotiated 100baseTx-FD, link ok
product info: vendor 00:50:43, model 11 rev 1
basic mode: ? autonegotiation enabled
basic status: autonegotiation complete, link ok
capabilities: 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD
advertising: ?100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD flow-control
link partner: 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD
SIOCGMIIREG on eth1 failed: Input/output error
eth1: negotiated 100baseTx-FD, link ok
product info: vendor 00:50:43, model 11 rev 1
basic mode: ? autonegotiation enabled
basic status: autonegotiation complete, link ok
capabilities: 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD
advertising: ?100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD flow-control
link partner: 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD
從以上信息中可以看出,這兩塊網(wǎng)卡工作在100M全雙工自適應模式下,“100BaseTx-FD”意為100M Full Duplex。
2. 更改網(wǎng)卡的工作模式,輸入命令:
mii-tool -F media [interface]
media可選的模式有100baseTx-FD、100baseTx-HD、10baseT-FD、10baseT-HD等。
Interface代表所選擇的網(wǎng)卡,如eth0、eth1等,默認為eth0。
例如,設(shè)置網(wǎng)卡工作在10M半雙工模式下,輸入命令:
$ mii-tool -F 10baseT-HD eth0
3. 恢復網(wǎng)卡的自適應工作模式,輸入命令:
mii-tool -r eth0
更詳細的使用方法可以用mii-tool -h來獲得。
mii-tool: invalid option -- h
usage: mii-tool [-VvRrwl] [-A media,... | -F media] [interface ...]
-V, --version ? ? ? ? ? ? ? display version information
-v, --verbose ? ? ? ? ? ? ? more verbose output
-R, --reset ? ? ? ? ? ? ? ? reset MII to poweron state
-r, --restart ? ? ? ? ? ? ? restart autonegotiation
-w, --watch ? ? ? ? ? ? ? ? monitor for link status changes
-l, --log ? ? ? ? ? ? ? ? ? with -w, write events to syslog
-A, --advertise=media,... ? advertise only specified media
-F, --force=media ? ? ? ? ? force specified media technology
media: 100baseT4, 100baseTx-FD, 100baseTx-HD, 10baseT-FD, 10baseT-HD,
(to advertise both HD and FD) 100baseTx, 10baseT
?
總結(jié)
以上是生活随笔為你收集整理的linux检测网卡步骤,linux网卡检测命令的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: linux ssh服务的优化,SSH服务
- 下一篇: linux 查明文密码,win10系统查