Home | 簡體中文 | 繁體中文 | 雜文 | 打賞(Donations) | ITEYE 博客 | OSChina 博客 | Facebook | Linkedin | 知乎專欄 | Search | Email

8.8. ethtool - Display or change ethernet card settings

# 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: 1000Mb/s
	Duplex: Full
	Port: Twisted Pair
	PHYAD: 2
	Transceiver: internal
	Auto-negotiation: on
	Supports Wake-on: pumbg
	Wake-on: g
	Current message level: 0x00000001 (1)
	Link detected: yes

		

鑒別eth(x)

 簡單的方法:
一個插網綫,一個不插,運行 mii-tool 或 ethtool eth0,看狀態是否連接

另一種方法是:
tail -f /var/log/messages,當你向其中一個網口做插拔網綫的動作時,屏幕上會看到提示信息
		

最好的方法是將mac地址寫在啟動腳本內.