Tuesday, October 13, 2009

How to know the interface speed and duplex in your linux.

[tatshuya]# 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: 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: g
Current message level: 0x00000007 (7)
Link detected: yes


If you want to force speed to 1000 and duplex to full you can set like this.
ethtool -s eth0 speed 1000 duplex full autoneg off

-- TaTsHuYa --

No comments: