There are three methods to change the driver speed and duplex mode capabilities in Solaris. With newer systems (i.e. with !GigE cards), it is easiest to use the [=nettune] script as the appropriate drivers aren't loaded by before [=/etc/system] is parsed.
First one is by using ndd command, second one is by specifying in /etc/system file and the third is creating an hme.conf (qfe.conf)
The new version of quad ethernet card uses qfe driver. Discussion below is for hme driver quad ethernet card. For qfe replace /dev/hme with /dev/qfe.
These changes will only survive until the until the next reboot. to make them permanent they must be set in /etc/system if you only have the one instance or /kernel/drv/hme.conf if you have multiple interfaces and you want to change other than instance 0. (a small startup script can be created to change the settings via ndd when multiple instances are involved).
Following commands set hme0 interface to 100Mbps halfduplex mode:
root# ndd -set /dev/hme instance 0 root# ndd -set /dev/hme adv_100T4_cap 0 root# ndd -set /dev/hme adv_100fdx_cap 0 root# ndd -set /dev/hme adv_100hdx_cap 1 root# ndd -set /dev/hme adv_10fdx_cap 0 root# ndd -set /dev/hme adv_10hdx_cap 0 root# ndd -set /dev/hme adv_autoneg_cap 0Following commands set hme1 interface to 10Mbps fullduplex mode:
root# ndd -set /dev/hme instance 1 root# ndd -set /dev/hme adv_100T4_cap 0 root# ndd -set /dev/hme adv_100fdx_cap 0 root# ndd -set /dev/hme adv_100hdx_cap 0 root# ndd -set /dev/hme adv_10fdx_cap 1 root# ndd -set /dev/hme adv_10hdx_cap 0 root# ndd -set /dev/hme adv_autoneg_cap 0
It is usually recommended that the script be called S95net-tune to indicate that this particular script is specific to tuning network parameters on that specific host.
If all the interfaces are going to have the same configuration then you can add those parameters in /etc/system file, reboot and it will take effect for all the instances of hme.
For example, the following lines in /etc/system file will force all the interfaces to 100-Mbps Full-duplex mode:
set hme:hme_adv_autoneg_cap=0 set hme:hme_adv_100T4_cap=0 set hme:hme_adv_100fdx_cap=1 set hme:hme_adv_100hdx_cap=0 set hme:hme_adv_10fdx_cap=0 set hme:hme_adv_10hdx_cap=0
Example of /kernel/drv/hme.conf to turn off autonegotiation, turn on 100 Full, force 100BaseTX port, change Interpacket gap. (The reg= entries will be unique for each instance.)
name="hme" class="sbus" reg=0xe,0x8c00000,0x00000108,0xe,0x8c02000,0x00002000,0xe, 0x8c04000,0x00002000,0xe,0x8c06000,0x00002000,0xe,0x8c07000,0x00000020 adv_autoneg_cap=0 adv_100fdx_cap=1 use_int_xcvr=1 ipg1=10 ipg2=8;
#!/bin/sh
# this scripts sets an interface to 100MB full duplex
IFACE=$1
INST=$2
NDD=/usr/sbin/ndd
${NDD} -set /dev/${IFACE} instance ${INST}
${NDD} -set /dev/${IFACE} adv_autoneg_cap 0
${NDD} -set /dev/${IFACE} adv_100T4_cap 0
${NDD} -set /dev/${IFACE} adv_100fdx_cap 1
${NDD} -set /dev/${IFACE} adv_100hdx_cap 0
${NDD} -set /dev/${IFACE} adv_10fdx_cap 0
${NDD} -set /dev/${IFACE} adv_10hdx_cap 0