How to find half duplex or full duplex

Hi,

How to find whether the server is running with half duplex or full duplex. I tried with the following command ndd -get /dev/ but am not getting any output,. Is the command correct?
Also let me know how to change from half to full duplex.

try:

dladm show-dev (you need root priv probably)

this is the output I get:

~> sudo dladm show-dev
hme0            link: unknown   speed: 0     Mbps       duplex: unknown
qfe0            link: unknown   speed: 100   Mbps       duplex: full
qfe1            link: unknown   speed: 0     Mbps       duplex: unknown
qfe2            link: unknown   speed: 0     Mbps       duplex: unknown
qfe3            link: unknown   speed: 0     Mbps       duplex: unknown

---------- Post updated at 12:32 AM ---------- Previous update was at 12:28 AM ----------

[/COLOR]or to do it your way it would be
(say your interface is qfe0)

ndd -set /dev/qfe instance 0
ndd -get /dev/qfe link_speed
ndd -get /dev/qfe link_mode

then your output will only be a 0 or 1

# ndd -get /dev/qfe link_mode

Interpretation:
0 -- half-duplex
1 -- full-duplex

# ndd -get /dev/qfe link_speed

Interpretation:
0 -- 10 Mbit
1 -- 100 Mbit
1000 -- 1 Gbit

Forgot the setting part:

ndd -set /dev/qfe adv_autoneg_cap 0    #autoneg off
ndd -set /dev/qfe adv_10hdx_cap 0       #10M half duplex
ndd -set /dev/qfe adv_10fdx_cap 0        #10M full duplex
ndd -set /dev/qfe adv_100hdx_cap 0     #100M half duplex
ndd -set /dev/qfe adv_100fdx_cap 1      #100M full duplex

OR

you can make it all easier, and just get ethtool :slight_smile:
download:

info:
http://gd.tuwien.ac.at/linuxcommand.org/man_pages/ethtool8.html

1 Like