All interfaces to 100Mb Full-Duplex (Solaris)

for nic in 0 do /usr/sbin/ndd -set /dev/hme instance ${nic} /usr/sbin/ndd -set /dev/hme adv_100fdx_cap 1 /usr/sbin/ndd -set /dev/hme adv_100hdx_cap 0 /usr/sbin/ndd -set /dev/hme adv_10fdx_cap 0 /usr/sbin/ndd -set /dev/hme adv_10hdx_cap 0 /usr/sbin/ndd -set /dev/hme adv_autoneg_cap 0 done for nic in 0 1 2 3 do /usr/sbin/ndd -set /dev/qfe instance ${nic} /usr/sbin/ndd -set /dev/qfe adv_100fdx_cap 1 /usr/sbin/ndd -set /dev/qfe adv_100hdx_cap 0 /usr/sbin/ndd -set /dev/qfe adv_10fdx_cap 0 /usr/sbin/ndd -set /dev/qfe adv_10hdx_cap 0 /usr/sbin/ndd -set /dev/qfe adv_autoneg_cap 0 done
 * 1) !/bin/sh
 * 2)       Set speed to 100mbs for all ports on hme cards
 * EOF
 * 1) and qfe
 * 1) for nic in 0
 * do
 * 1) /usr/sbin/ndd -set /dev/ge instance ${nic}
 * 2) /usr/sbin/ndd -set /dev/ge adv_1000autoneg_cap 0
 * 3) /usr/sbin/ndd -set /dev/ge adv_1000fdx_cap 1
 * 4) /usr/sbin/ndd -set /dev/ge adv_1000hdx_cap 0
 * 5) done

Here is on for the new ipge gig interfaces probably best NOT TO DO THIS its recommended to leave gig interfaces to auto negotiate, but for reference:

#!/bin/sh

ndd -set /dev/ipge instance 0 ndd -set /dev/ipge adv_1000fdx_cap 0 ndd -set /dev/ipge adv_1000hdx_cap 0 ndd -set /dev/ipge adv_100fdx_cap 1 ndd -set /dev/ipge adv_100hdx_cap 0 ndd -set /dev/ipge adv_10fdx_cap 0 ndd -set /dev/ipge adv_10hdx_cap 0 ndd -set /dev/ipge adv_autoneg_cap 0

Yet Another helpful tool is the setndd.sh by Mike Dermarco
 * 1) ! /bin/sh


 * 1) read all interface configs from system

echo "setting all network interfaces to 100/Full"

types="hme|qfe|eri|ce|dmfe|bge"

iface=`/usr/sbin/ifconfig -au | egrep $types | awk -F: '{ print $1 }'`

for interface in ${iface} do driver=`echo ${interface} | sed "s/[0-9]//"` instance=`echo ${interface} | sed "s/[a-z]*//"` if [ "$driver" = "bge" ] || [ "$driver" = "dmfe" ] ; then driver="$driver$instance" else /usr/sbin/ndd -set /dev/${driver} instance ${instance} fi   /usr/sbin/ndd -set /dev/${driver} adv_1000fdx_cap 0 /usr/sbin/ndd -set /dev/${driver} adv_1000hdx_cap 0 /usr/sbin/ndd -set /dev/${driver} adv_100fdx_cap 1 /usr/sbin/ndd -set /dev/${driver} adv_100hdx_cap 0 /usr/sbin/ndd -set /dev/${driver} adv_10fdx_cap 0 /usr/sbin/ndd -set /dev/${driver} adv_10hdx_cap 0 /usr/sbin/ndd -set /dev/${driver} adv_autoneg_cap 0 done
 * 1) this will not do interfaces above single digits

echo "All network interfaces have been set to 100/Full"