Archive for the tag 'Command Line'

Testing Link Status from the Command Line

mii-tool and ethtool commands command will provide reports on the link status and duplex settings for supported NICs.

root@laptop:~# mii-tool
eth0: negotiated 100baseTx-FD flow-control, link ok

ethtool - Display or change ethernet card settings.
ethtool is used for querying settings of an ethernet device and changing them. ethX is the name of the ethernet device on which ethtool should operate. ethtool with a single argument specifying the device name prints current settings of the specified device.

root@laptop:~# ethtool eth0
Settings for eth0:
Supported ports: [ TP ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
Supports auto-negotiation: Yes
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
Advertised auto-negotiation: Yes
Speed: 100Mb/s
Duplex: Full
Port: Twisted Pair
PHYAD: 0
Transceiver: internal
Auto-negotiation: on
Supports Wake-on: g
Wake-on: d
Current message level: 0×00000000 (0)
Link detected: yes