请问各位兄弟,在Linux中怎么看网卡是全双工工作还是半双工工作?
mii-tool
Linux:~ # mii-tool
eth0: no link
eth1: no autonegotiation, 100baseTx-HD, link ok
Linux:~ #
Linux:~ # mii-tool -F
mii-tool: option requires an argument -- F
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
Linux:~ # mii-tool
eth0: no link
eth1: no autonegotiation, 100baseTx-HD, link ok
Linux:~ # mii-tool -F 100baseTx-HD
//切换网卡得状态为半双工状态
Linux:~ # mii-tool
eth0: 100 Mbit, half duplex, no link
eth1: 100 Mbit, half duplex, link ok