All interfaces to 100Mb Full-Duplex (Solaris)

From S23Wiki
Jump to: navigation, search
#!/bin/sh
#       Set speed to 100mbs for all ports on hme cards
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
#EOF
# and qfe
#
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
#for nic in 0
#do
#/usr/sbin/ndd -set /dev/ge instance ${nic}
#/usr/sbin/ndd -set /dev/ge adv_1000autoneg_cap 0
#/usr/sbin/ndd -set /dev/ge adv_1000fdx_cap 1
#/usr/sbin/ndd -set /dev/ge adv_1000hdx_cap 0
#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

#! /bin/sh

# 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 }'`

# this will not do interfaces above single digits
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

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