This is a simple script used to check NIC settings. It uses ndd to determine link state, link speed and duplex. Solaris servers connected to Cisco switches generally have to be forced to 100FDX mode. If the NIC is advertizing that it will auto-negotiate the link it will invariably negotiate 100HDX and will perform poorly. The Cisco switch port should also be forced to 100FDX using "set port speed" and "set port mode". On the Solaris side the NIC can be forced to 100FDX via /etc/system. See the solaris configuration section on this site for more detail.



#!/usr/bin/ksh


if [ $# -lt 2 ]
then
        echo ""
        echo "USAGE: ./show-link.sh interface instance"
        echo ""
        exit 1
fi


IF="$1"
INST="$2"

ndd -set /dev/$IF instance $INST

SPEED=`ndd -get /dev/$IF link_speed`
DUPLEX=`ndd -get /dev/$IF link_mode`
STATUS=`ndd -get /dev/$IF link_status`


echo " "
echo " "
echo "Speed  Duplex Status"
echo "$SPEED       $DUPLEX       $STATUS"
echo " "
echo " "


Output

bash-2.03# ./showlink.sh hme 0
 
 
Speed  Duplex Status
1       1       1






You are visitor number 937