输入mii-tool可以查看网线是否连接到网卡
#mii-tool
eth0: negotiated 100baseTx-FD, link ok
有时驱动可能不支持会出错下列错误
#mii-tool
SIOCGMIIPHY on ‘eth0’ failed: Operation not supported
no MII interfaces found
可以使用ethtool查看
#ethtool eth0
Settings for eth0:
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: 100Mb/s
Duplex: Full
Port: Twisted Pair
PHYAD: 0
Transceiver: internal
Auto-negotiation: on
Supports Wake-on: pumbg
Wake-on: g
Current message level: 0x00000033 (51)
Link detected: yes
Link detected: yes为正常no为失败
No Responses (yet)
Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.