I am currently running solaris 2.9 O.S. and am trying to find the command that will show me what current speed and duplex settings have been configured for the NIC cards.
for i in `ifconfig -a | egrep "^eri" | awk '/^[a-z]*[0-9]*: / {print $1}' | sed s/://`
do
device=`echo $i | sed s/[0-9]*$//`
instance=0
ndd -set /dev/$device instance $instance
duplex=`ndd -get /dev/$device link_mode`
speed=`ndd -get /dev/$device link_speed`
autoneg=`ndd -get /dev/$device adv_autoneg_cap`
case "$speed" in
"0" echo "$i is at 10 mbit \c";;
"1" echo "$i is at 100 mbit \c";;
*) echo "$i is at ??? mbit \c";;
esac
case "$duplex" in
"0" echo "half duplex \c";;
"1" echo "full duplex \c";;
*) echo "??? duplex \c";;
esac
case "$autoneg" in
"0" echo "with auto negotiation";;
"1" echo "without auto negotiation";;
*) echo "??? auto negotiation";;
esac
done
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.